Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

backend: Use librygel-renderer for UPnP

  • Loading branch information...
commit 28c91907f5b63a2b7c84592d86e4102af9bba853 1 parent c6c7d97
phako authored July 02, 2012
2  configure.in
@@ -225,6 +225,8 @@ PKG_CHECK_MODULES([DEPENDENCY],[
225 225
 
226 226
 PKG_CHECK_MODULES(MM, $MM)
227 227
 
  228
+PKG_CHECK_MODULES([RYGEL], [rygel-renderer-1.0])
  229
+
228 230
 PKG_CHECK_MODULES([GTK],[gtk+-3.0 gthread-2.0])
229 231
 GTK_LIBS="$GTK_LIBS $EXTRA_BACKEND_LIBS"
230 232
 AC_SUBST(GTK_LIBS)
2  src/backend/Makefile.am
@@ -68,12 +68,14 @@ libbaconvideowidget_la_CPPFLAGS = \
68 68
 libbaconvideowidget_la_CFLAGS = \
69 69
 	$(DEPENDENCY_CFLAGS)		\
70 70
 	$(MM_CFLAGS)			\
  71
+	$(RYGEL_CFLAGS) \
71 72
 	$(MISSING_PLUGINS_CFLAGS)	\
72 73
 	$(AM_CFLAGS)
73 74
 
74 75
 libbaconvideowidget_la_LIBADD =				\
75 76
 	$(top_builddir)/src/gst/libtotemgsthelpers.la	\
76 77
 	$(MM_LIBS)					\
  78
+	$(RYGEL_LIBS) \
77 79
 	$(GST_LIBS)					\
78 80
 	$(EXTRA_BACKEND_LIBS)				\
79 81
 	$(X_LIBS)					\
13  src/backend/bacon-video-widget-gst-0.10.c
@@ -67,6 +67,8 @@
67 67
 #include <mx/mx.h>
68 68
 #include "totem-aspect-frame.h"
69 69
 
  70
+#include <rygel-renderer.h>
  71
+
70 72
 /* system */
71 73
 #include <unistd.h>
72 74
 #include <time.h>
@@ -274,6 +276,8 @@ struct BaconVideoWidgetPrivate
274 276
 
275 277
   /* for stepping */
276 278
   float                        rate;
  279
+
  280
+  RygelPlaybinRenderer        *renderer;
277 281
 };
278 282
 
279 283
 static void bacon_video_widget_set_property (GObject * object,
@@ -2464,6 +2468,11 @@ bacon_video_widget_finalize (GObject * object)
2464 2468
   g_type_class_unref (g_type_class_peek (BVW_TYPE_METADATA_TYPE));
2465 2469
   g_type_class_unref (g_type_class_peek (BVW_TYPE_DVD_EVENT));
2466 2470
 
  2471
+  if (bvw->priv->renderer) {
  2472
+    g_object_unref (bvw->priv->renderer);
  2473
+    bvw->priv->renderer = NULL;
  2474
+  }
  2475
+
2467 2476
   if (bvw->priv->bus) {
2468 2477
     /* make bus drop all messages to make sure none of our callbacks is ever
2469 2478
      * called again (main loop might be run again to display error dialog) */
@@ -6057,6 +6066,10 @@ bacon_video_widget_new (GError ** error)
6057 6066
     return NULL;
6058 6067
   }
6059 6068
 
  6069
+  bvw->priv->renderer = rygel_playbin_renderer_new_wrap (bvw->priv->play, "Totem UPnP Renderer");
  6070
+  rygel_playbin_renderer_add_interface (bvw->priv->renderer, "eth0");
  6071
+  rygel_playbin_renderer_add_interface (bvw->priv->renderer, "wlan0");
  6072
+
6060 6073
   bvw->priv->bus = gst_element_get_bus (bvw->priv->play);
6061 6074
 
6062 6075
   /* Add the download flag, for streaming buffering,

0 notes on commit 28c9190

Please sign in to comment.
Something went wrong with that request. Please try again.