summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-05-16 21:52:45 +0200
committerAlessandro Decina <alessandro.decina@collabora.co.uk>2012-05-23 11:43:32 +0200
commit04e8a9fa574cc6058f290b08b833e111d167271c (patch)
tree1536930ea31eed66fd753d62091678c1c33dc686 /sys
parentb0e664ca7bac61f62378fcb434561fc60bf57f2b (diff)
downloadgstreamer-plugins-good-04e8a9fa574cc6058f290b08b833e111d167271c.tar.gz
osxvideosink: reset the embed property for backward compatilibity
Diffstat (limited to 'sys')
-rw-r--r--sys/osxvideo/osxvideosink.h1
-rw-r--r--sys/osxvideo/osxvideosink.m22
2 files changed, 14 insertions, 9 deletions
diff --git a/sys/osxvideo/osxvideosink.h b/sys/osxvideo/osxvideosink.h
index 6c65ee9e2..73906caf4 100644
--- a/sys/osxvideo/osxvideosink.h
+++ b/sys/osxvideo/osxvideosink.h
@@ -77,6 +77,7 @@ struct _GstOSXVideoSink {
NSView *superview;
guint cocoa_timeout;
gboolean keep_par;
+ gboolean embed;
};
struct _GstOSXVideoSinkClass {
diff --git a/sys/osxvideo/osxvideosink.m b/sys/osxvideo/osxvideosink.m
index f68a522b5..942bddccc 100644
--- a/sys/osxvideo/osxvideosink.m
+++ b/sys/osxvideo/osxvideosink.m
@@ -268,14 +268,18 @@ gst_osx_video_sink_osxwindow_create (GstOSXVideoSink * osxvideosink, gint width,
@selector(addToSuperview:), osxvideosink->superview, NO);
} else {
- /* the view wasn't added to a superview. It's possible that the
- * application handled have-ns-view, stored our view internally and is
- * going to add it to a superview later (webkit does that now).
- */
- gst_osx_video_sink_start_cocoa_event_poller (osxvideosink);
- gst_osx_video_sink_call_from_main_thread(osxvideosink->osxvideosinkobject,
+ if (osxvideosink->embed) {
+ /* the view wasn't added to a superview. It's possible that the
+ * application handled have-ns-view, stored our view internally and is
+ * going to add it to a superview later (webkit does that now).
+ */
+ GST_INFO_OBJECT (osxvideosink, "no superview");
+ } else {
+ gst_osx_video_sink_start_cocoa_event_poller (osxvideosink);
+ gst_osx_video_sink_call_from_main_thread(osxvideosink->osxvideosinkobject,
@selector(createInternalWindow), nil, YES);
- GST_INFO_OBJECT (osxvideosink, "no superview");
+ GST_INFO_OBJECT (osxvideosink, "No superview, creating an internal window.");
+ }
}
}
[osxwindow->gstview setNavigation: GST_NAVIGATION(osxvideosink)];
@@ -446,7 +450,7 @@ gst_osx_video_sink_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_EMBED:
- /* Ignore, just here for backwards compatibility */
+ osxvideosink->embed = g_value_get_boolean(value);
break;
case ARG_FORCE_PAR:
osxvideosink->keep_par = g_value_get_boolean(value);
@@ -472,7 +476,7 @@ gst_osx_video_sink_get_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_EMBED:
- g_value_set_boolean (value, TRUE);
+ g_value_set_boolean (value, osxvideosink->embed);
break;
case ARG_FORCE_PAR:
g_value_set_boolean (value, osxvideosink->keep_par);