mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
osxvideo: fix build on Mac OSX Mavericks and put new window in front
GetCurrentProcess/SetFrontProcess/TransformProcessType was deprecated and now removed in Mac OSX 10.9. orderFrontRegardless is used to make the video window the most front window.
This commit is contained in:
parent
b2bf1f1882
commit
e96f0c03ef
2 changed files with 18 additions and 25 deletions
|
@ -777,7 +777,6 @@ gst_osx_video_sink_get_type (void)
|
||||||
-(void) createInternalWindow
|
-(void) createInternalWindow
|
||||||
{
|
{
|
||||||
GstOSXWindow *osxwindow = osxvideosink->osxwindow;
|
GstOSXWindow *osxwindow = osxvideosink->osxwindow;
|
||||||
ProcessSerialNumber psn;
|
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
unsigned int mask;
|
unsigned int mask;
|
||||||
|
|
||||||
|
@ -794,12 +793,6 @@ gst_osx_video_sink_get_type (void)
|
||||||
rect.size.width = (float) osxwindow->width;
|
rect.size.width = (float) osxwindow->width;
|
||||||
rect.size.height = (float) osxwindow->height;
|
rect.size.height = (float) osxwindow->height;
|
||||||
|
|
||||||
|
|
||||||
if (!GetCurrentProcess(&psn)) {
|
|
||||||
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
|
||||||
SetFrontProcess(&psn);
|
|
||||||
}
|
|
||||||
|
|
||||||
osxwindow->win =[[[GstOSXVideoSinkWindow alloc]
|
osxwindow->win =[[[GstOSXVideoSinkWindow alloc]
|
||||||
initWithContentNSRect: rect
|
initWithContentNSRect: rect
|
||||||
styleMask: mask
|
styleMask: mask
|
||||||
|
@ -807,7 +800,7 @@ gst_osx_video_sink_get_type (void)
|
||||||
defer: NO
|
defer: NO
|
||||||
screen: nil] retain];
|
screen: nil] retain];
|
||||||
GST_DEBUG("VideoSinkWindow created, %p", osxwindow->win);
|
GST_DEBUG("VideoSinkWindow created, %p", osxwindow->win);
|
||||||
[osxwindow->win makeKeyAndOrderFront:NSApp];
|
[osxwindow->win orderFrontRegardless];
|
||||||
osxwindow->gstview =[osxwindow->win gstView];
|
osxwindow->gstview =[osxwindow->win gstView];
|
||||||
[osxwindow->win setDelegate:[[GstWindowDelegate alloc]
|
[osxwindow->win setDelegate:[[GstWindowDelegate alloc]
|
||||||
initWithSink:osxvideosink]];
|
initWithSink:osxvideosink]];
|
||||||
|
|
Loading…
Reference in a new issue