[totem] Set the display on the video sink



commit e79427f5fb75656ee9f7888e9a6d1ffce3f3caad
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 16 11:56:40 2009 +0000

    Set the display on the video sink
    
    When creating the video sink, make sure it gets assigned the
    same display as passed to --display on the command-line.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=570651

 src/backend/bacon-video-widget-gst-0.10.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index e45aa9c..bb711dc 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -6746,6 +6746,15 @@ bacon_video_widget_new (int width, int height,
         video_sink = gst_element_factory_make ("ximagesink", "video-sink");
       }
     }
+
+    /* Set the display if the video sink supports it */
+    if (g_object_class_find_property (G_OBJECT_GET_CLASS (video_sink), "display")) {
+      const char *display;
+
+      display = gdk_get_display_arg_name();
+      if (display != NULL)
+	g_object_set (G_OBJECT (video_sink), "display", display, NULL);
+    }
 /* FIXME: April fool's day puzzle */
 #if 0
     if (video_sink) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]