[vlc-commits] minimal_macosx: Fix compilation, adapt to recent darwinvlc changes
David Fuhrmann
git at videolan.org
Wed Jun 24 22:52:53 CEST 2015
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Jun 24 22:49:54 2015 +0200| [5c253d54d6f3e4ca5d75a599dd6b50a2edd3750d] | committer: David Fuhrmann
minimal_macosx: Fix compilation, adapt to recent darwinvlc changes
Removes useless killerthread and signal handling. Removes start
in fullscreen, as this is not correctly working.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c253d54d6f3e4ca5d75a599dd6b50a2edd3750d
---
modules/gui/minimal_macosx/intf.m | 44 ++++---------------------------------
1 file changed, 4 insertions(+), 40 deletions(-)
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index d6c73b3..7c69e4e 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -33,8 +33,9 @@
#endif
#include <unistd.h>
-#import <vlc_playlist.h>
-#import <vlc_vout_window.h>
+#include <vlc_common.h>
+#include <vlc_playlist.h>
+#include <vlc_vout_window.h>
#import "intf.h"
#import "VLCMinimalVoutWindow.h"
@@ -50,6 +51,7 @@ static void Run (intf_thread_t *p_intf);
int OpenIntf (vlc_object_t *p_this)
{
intf_thread_t *p_intf = (intf_thread_t*) p_this;
+ msg_Dbg(p_intf, "Using minimal macosx interface");
p_intf->p_sys = malloc(sizeof(intf_sys_t));
if (p_intf->p_sys == NULL)
@@ -83,43 +85,12 @@ extern OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn);
extern OSErr CPSEnableForegroundOperation(CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
extern OSErr CPSSetFrontProcess(CPSProcessSerNum *psn);
-/*****************************************************************************
- * KillerThread: Thread that kill the application
- *****************************************************************************/
-static void * KillerThread(void *user_data)
-{
- NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
-
- intf_thread_t *p_intf = user_data;
-
- for(;;)
- pause();
-
- /* We are dead, terminate */
- [NSApp terminate: nil];
- [o_pool release];
- return NULL;
-}
/*****************************************************************************
* Run: main loop
*****************************************************************************/
static void Run(intf_thread_t *p_intf)
{
- sigset_t set;
-
- /* Make sure the "force quit" menu item does quit instantly.
- * VLC overrides SIGTERM which is sent by the "force quit"
- * menu item to make sure deamon mode quits gracefully, so
- * we un-override SIGTERM here. */
- sigemptyset(&set);
- sigaddset(&set, SIGTERM);
- pthread_sigmask(SIG_UNBLOCK, &set, NULL);
-
- /* Setup a thread that will monitor the module killing */
- pthread_t killer_thread;
- pthread_create(&killer_thread, NULL, KillerThread, p_intf);
-
CPSProcessSerNum PSN;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
@@ -127,9 +98,6 @@ static void Run(intf_thread_t *p_intf)
if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
if (!CPSSetFrontProcess(&PSN))
[NSApplication sharedApplication];
- [NSApp run];
-
- pthread_join(killer_thread, NULL);
[pool release];
}
@@ -161,10 +129,6 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
msg_Dbg(p_wnd, "returning video window with proposed position x=%i, y=%i, width=%i, height=%i", cfg->x, cfg->y, cfg->width, cfg->height);
p_wnd->handle.nsobject = [o_window contentView];
- // TODO: find a cleaner way for "start in fullscreen"
- if (var_GetBool(pl_Get(p_wnd), "fullscreen"))
- [o_window performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO];
-
p_wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
p_wnd->control = WindowControl;
More information about the vlc-commits
mailing list