mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
osxvideosink: allow switching views at runtime.
This commit is contained in:
parent
c209a6ab40
commit
3fdd51952b
1 changed files with 9 additions and 0 deletions
|
@ -424,11 +424,20 @@ gst_osx_video_sink_set_xwindow_id (GstXOverlay * overlay, gulong window_id)
|
|||
|
||||
if (osxvideosink->superview) {
|
||||
GST_INFO_OBJECT (osxvideosink, "old xwindow id %p", osxvideosink->superview);
|
||||
if (osxvideosink->osxwindow) {
|
||||
[osxvideosink->osxwindow->gstview
|
||||
performSelectorOnMainThread:@selector(removeFromSuperview:)
|
||||
withObject:(id)nil waitUntilDone:YES];
|
||||
}
|
||||
[osxvideosink->superview release];
|
||||
}
|
||||
|
||||
GST_INFO_OBJECT (osxvideosink, "set xwindow id 0x%lx", window_id);
|
||||
osxvideosink->superview = [((NSView *) window_id) retain];
|
||||
if (osxvideosink->osxwindow) {
|
||||
[osxvideosink->osxwindow->gstview performSelectorOnMainThread:@selector(addToSuperview:)
|
||||
withObject:osxvideosink->superview waitUntilDone:YES];
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue