mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
osxvideosink: reset the embed property for backward compatilibity
This commit is contained in:
parent
7cc93e9195
commit
a3cf0ab5f5
2 changed files with 14 additions and 9 deletions
|
@ -77,6 +77,7 @@ struct _GstOSXVideoSink {
|
||||||
NSView *superview;
|
NSView *superview;
|
||||||
guint cocoa_timeout;
|
guint cocoa_timeout;
|
||||||
gboolean keep_par;
|
gboolean keep_par;
|
||||||
|
gboolean embed;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstOSXVideoSinkClass {
|
struct _GstOSXVideoSinkClass {
|
||||||
|
|
|
@ -268,14 +268,18 @@ gst_osx_video_sink_osxwindow_create (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
@selector(addToSuperview:), osxvideosink->superview, NO);
|
@selector(addToSuperview:), osxvideosink->superview, NO);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* the view wasn't added to a superview. It's possible that the
|
if (osxvideosink->embed) {
|
||||||
* application handled have-ns-view, stored our view internally and is
|
/* the view wasn't added to a superview. It's possible that the
|
||||||
* going to add it to a superview later (webkit does that now).
|
* 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,
|
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);
|
@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)];
|
[osxwindow->gstview setNavigation: GST_NAVIGATION(osxvideosink)];
|
||||||
|
@ -446,7 +450,7 @@ gst_osx_video_sink_set_property (GObject * object, guint prop_id,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case ARG_EMBED:
|
case ARG_EMBED:
|
||||||
/* Ignore, just here for backwards compatibility */
|
osxvideosink->embed = g_value_get_boolean(value);
|
||||||
break;
|
break;
|
||||||
case ARG_FORCE_PAR:
|
case ARG_FORCE_PAR:
|
||||||
osxvideosink->keep_par = g_value_get_boolean(value);
|
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) {
|
switch (prop_id) {
|
||||||
case ARG_EMBED:
|
case ARG_EMBED:
|
||||||
g_value_set_boolean (value, TRUE);
|
g_value_set_boolean (value, osxvideosink->embed);
|
||||||
break;
|
break;
|
||||||
case ARG_FORCE_PAR:
|
case ARG_FORCE_PAR:
|
||||||
g_value_set_boolean (value, osxvideosink->keep_par);
|
g_value_set_boolean (value, osxvideosink->keep_par);
|
||||||
|
|
Loading…
Reference in a new issue