Commit e4250156 authored by hartman's avatar hartman
Browse files

* When choosing a autogenerated menuitem, we now create a new thread to

  do the actual execution of this command. this is a (very ugly) workaround
  to the problem we were having with the deinterlace menu on osx.

  It works now, but now i'm running into the black screen and continous
  "late picture skipped (-218000)" again which is also plagueing us when you
  enter fullscreen with a filter enabled. This ought to be fixed before 0.6.0
  as well.
parent 66b8fa49
......@@ -2,7 +2,7 @@
* controls.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.h,v 1.5 2003/06/01 23:48:17 hartman Exp $
* $Id: controls.h,v 1.6 2003/06/03 22:21:46 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -64,6 +64,7 @@
var:(const char *)psz_variable
selector:(SEL)pf_callback;
- (IBAction)toggleVar:(id)sender;
- (int)toggleVarThread:(id)_o_data;
@end
......
......@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.40 2003/06/01 23:48:17 hartman Exp $
* $Id: controls.m,v 1.41 2003/06/03 22:21:46 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -569,16 +569,32 @@
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
VLCMenuExt *o_data = [[o_mi representedObject] pointerValue];
[NSThread detachNewThreadSelector: @selector(toggleVarThread:)
toTarget: self withObject: o_data];
return;
}
- (int)toggleVarThread: (id)_o_data
{
vlc_object_t *p_object;
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
VLCMenuExt *o_data = (VLCMenuExt *)_o_data;
vlc_thread_set_priority( [NSApp getIntf] , VLC_THREAD_PRIORITY_LOW );
p_object = (vlc_object_t *)vlc_object_get( [NSApp getIntf],
[o_data objectID] );
if( p_object == NULL ) return;
var_Set( p_object, strdup([o_data name]), [o_data value] );
vlc_object_release( p_object );
return;
if( p_object != NULL )
{
var_Set( p_object, strdup([o_data name]), [o_data value] );
vlc_object_release( p_object );
[o_pool release];
return VLC_TRUE;
}
[o_pool release];
return VLC_EGENERIC;
}
@end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment