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:
Thijs Vermeir 2014-03-05 13:35:19 +01:00 committed by Sebastian Dröge
parent b2bf1f1882
commit e96f0c03ef
2 changed files with 18 additions and 25 deletions

View file

@ -777,7 +777,6 @@ gst_osx_video_sink_get_type (void)
-(void) createInternalWindow
{
GstOSXWindow *osxwindow = osxvideosink->osxwindow;
ProcessSerialNumber psn;
NSRect rect;
unsigned int mask;
@ -794,12 +793,6 @@ gst_osx_video_sink_get_type (void)
rect.size.width = (float) osxwindow->width;
rect.size.height = (float) osxwindow->height;
if (!GetCurrentProcess(&psn)) {
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
SetFrontProcess(&psn);
}
osxwindow->win =[[[GstOSXVideoSinkWindow alloc]
initWithContentNSRect: rect
styleMask: mask
@ -807,7 +800,7 @@ gst_osx_video_sink_get_type (void)
defer: NO
screen: nil] retain];
GST_DEBUG("VideoSinkWindow created, %p", osxwindow->win);
[osxwindow->win makeKeyAndOrderFront:NSApp];
[osxwindow->win orderFrontRegardless];
osxwindow->gstview =[osxwindow->win gstView];
[osxwindow->win setDelegate:[[GstWindowDelegate alloc]
initWithSink:osxvideosink]];