Skip to content

Commit

Permalink
backend: Use librygel-renderer for UPnP
Browse files Browse the repository at this point in the history
  • Loading branch information
phako committed Jul 3, 2012
1 parent c6c7d97 commit 28c9190
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure.in
Expand Up @@ -225,6 +225,8 @@ PKG_CHECK_MODULES([DEPENDENCY],[

PKG_CHECK_MODULES(MM, $MM)

PKG_CHECK_MODULES([RYGEL], [rygel-renderer-1.0])

PKG_CHECK_MODULES([GTK],[gtk+-3.0 gthread-2.0])
GTK_LIBS="$GTK_LIBS $EXTRA_BACKEND_LIBS"
AC_SUBST(GTK_LIBS)
Expand Down
2 changes: 2 additions & 0 deletions src/backend/Makefile.am
Expand Up @@ -68,12 +68,14 @@ libbaconvideowidget_la_CPPFLAGS = \
libbaconvideowidget_la_CFLAGS = \
$(DEPENDENCY_CFLAGS) \
$(MM_CFLAGS) \
$(RYGEL_CFLAGS) \
$(MISSING_PLUGINS_CFLAGS) \
$(AM_CFLAGS)

libbaconvideowidget_la_LIBADD = \
$(top_builddir)/src/gst/libtotemgsthelpers.la \
$(MM_LIBS) \
$(RYGEL_LIBS) \
$(GST_LIBS) \
$(EXTRA_BACKEND_LIBS) \
$(X_LIBS) \
Expand Down
13 changes: 13 additions & 0 deletions src/backend/bacon-video-widget-gst-0.10.c
Expand Up @@ -67,6 +67,8 @@
#include <mx/mx.h>
#include "totem-aspect-frame.h"

#include <rygel-renderer.h>

/* system */
#include <unistd.h>
#include <time.h>
Expand Down Expand Up @@ -274,6 +276,8 @@ struct BaconVideoWidgetPrivate

/* for stepping */
float rate;

RygelPlaybinRenderer *renderer;
};

static void bacon_video_widget_set_property (GObject * object,
Expand Down Expand Up @@ -2464,6 +2468,11 @@ bacon_video_widget_finalize (GObject * object)
g_type_class_unref (g_type_class_peek (BVW_TYPE_METADATA_TYPE));
g_type_class_unref (g_type_class_peek (BVW_TYPE_DVD_EVENT));

if (bvw->priv->renderer) {
g_object_unref (bvw->priv->renderer);
bvw->priv->renderer = NULL;
}

if (bvw->priv->bus) {
/* make bus drop all messages to make sure none of our callbacks is ever
* called again (main loop might be run again to display error dialog) */
Expand Down Expand Up @@ -6057,6 +6066,10 @@ bacon_video_widget_new (GError ** error)
return NULL;
}

bvw->priv->renderer = rygel_playbin_renderer_new_wrap (bvw->priv->play, "Totem UPnP Renderer");
rygel_playbin_renderer_add_interface (bvw->priv->renderer, "eth0");
rygel_playbin_renderer_add_interface (bvw->priv->renderer, "wlan0");

bvw->priv->bus = gst_element_get_bus (bvw->priv->play);

/* Add the download flag, for streaming buffering,
Expand Down

0 comments on commit 28c9190

Please sign in to comment.