gtk: Sync properties from the sink to the widget upon widget creation
authorSebastian Dröge <sebastian@centricular.com>
Mon, 15 Jun 2015 18:13:57 +0000 (20:13 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 15 Jun 2015 18:13:57 +0000 (20:13 +0200)
ext/gtk/gstgtkglsink.c
ext/gtk/gstgtksink.c

index 660bf03..1f2a9e9 100644 (file)
@@ -169,10 +169,10 @@ gst_gtk_gl_sink_get_widget (GstGtkGLSink * gtk_sink)
   gtk_sink->widget = (GtkGstGLWidget *) gtk_gst_gl_widget_new ();
   gtk_sink->bind_force_aspect_ratio =
       g_object_bind_property (gtk_sink, "force-aspect-ratio", gtk_sink->widget,
-      "force-aspect-ratio", G_BINDING_BIDIRECTIONAL);
+      "force-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
   gtk_sink->bind_pixel_aspect_ratio =
       g_object_bind_property (gtk_sink, "pixel-aspect-ratio", gtk_sink->widget,
-      "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL);
+      "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
 
   /* Take the floating ref, otherwise the destruction of the container will
    * make this widget disapear possibly before we are done. */
index 67fe7de..09487b7 100644 (file)
@@ -166,10 +166,10 @@ gst_gtk_sink_get_widget (GstGtkSink * gtk_sink)
   gtk_sink->widget = (GtkGstWidget *) gtk_gst_widget_new ();
   gtk_sink->bind_aspect_ratio =
       g_object_bind_property (gtk_sink, "force-aspect-ratio", gtk_sink->widget,
-      "force-aspect-ratio", G_BINDING_BIDIRECTIONAL);
+      "force-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
   gtk_sink->bind_pixel_aspect_ratio =
       g_object_bind_property (gtk_sink, "pixel-aspect-ratio", gtk_sink->widget,
-      "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL);
+      "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
 
   /* Take the floating ref, other wise the destruction of the container will
    * make this widget disapear possibly before we are done. */