Commit 92b23685 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

MacOSX intf work

* vout_Control implemented for macosx
* position slider fixed
* p_input manage loops fixed (buttons, playstatus etc)
* float on top works again
* visual filters work
* deinterlace filter selection broken
* fullscreen button is not being updated atm
* potential deadlocks between intf thread and vout thread???
* the window title might not always be updated.

OSX devs, please test as much as you can. This was all fairly low level stuff.
We need to test it properly.
parent 94cdda13
...@@ -52,13 +52,16 @@ struct intf_sys_t ...@@ -52,13 +52,16 @@ struct intf_sys_t
NSAutoreleasePool * o_pool; NSAutoreleasePool * o_pool;
NSPort * o_sendport; NSPort * o_sendport;
/* the current input */
input_thread_t * p_input;
/* special actions */ /* special actions */
vlc_bool_t b_playing; vlc_bool_t b_playing;
vlc_bool_t b_mute; vlc_bool_t b_mute;
int i_play_status;
/* interface update */ /* interface update */
vlc_bool_t b_intf_update; vlc_bool_t b_intf_update;
vlc_bool_t b_play_status;
vlc_bool_t b_playlist_update; vlc_bool_t b_playlist_update;
vlc_bool_t b_current_title_update; vlc_bool_t b_current_title_update;
vlc_bool_t b_fullscreen_update; vlc_bool_t b_fullscreen_update;
...@@ -245,7 +248,7 @@ struct intf_sys_t ...@@ -245,7 +248,7 @@ struct intf_sys_t
- (void)setupMenus; - (void)setupMenus;
- (void)updateMessageArray; - (void)updateMessageArray;
- (void)playStatusUpdated:(BOOL)b_pause; - (void)playStatusUpdated:(int) i_status;
- (void)setSubmenusEnabled:(BOOL)b_enabled; - (void)setSubmenusEnabled:(BOOL)b_enabled;
- (void)manageVolumeSlider; - (void)manageVolumeSlider;
- (IBAction)timesliderUpdate:(id)sender; - (IBAction)timesliderUpdate:(id)sender;
......
This diff is collapsed.
...@@ -71,8 +71,9 @@ static int ControlVideo ( vout_thread_t *, int, va_list ); ...@@ -71,8 +71,9 @@ static int ControlVideo ( vout_thread_t *, int, va_list );
static int CoCreateWindow ( vout_thread_t * ); static int CoCreateWindow ( vout_thread_t * );
static int CoDestroyWindow ( vout_thread_t * ); static int CoDestroyWindow ( vout_thread_t * );
static int CoToggleFullscreen ( vout_thread_t * );
static int CoToggleFullscreen ( vout_thread_t * );
static int CoSetWindowOnTop ( vout_thread_t *, BOOL );
static void VLCHideMouse ( vout_thread_t *, BOOL ); static void VLCHideMouse ( vout_thread_t *, BOOL );
static void QTScaleMatrix ( vout_thread_t * ); static void QTScaleMatrix ( vout_thread_t * );
...@@ -582,12 +583,13 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -582,12 +583,13 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/ *****************************************************************************/
static int ControlVideo( vout_thread_t *p_vout, int i_query, va_list args ) static int ControlVideo( vout_thread_t *p_vout, int i_query, va_list args )
{ {
vlc_bool_t b_arg;
switch( i_query ) switch( i_query )
{ {
case VOUT_SET_ZOOM:
return VLC_SUCCESS;
case VOUT_SET_STAY_ON_TOP: case VOUT_SET_STAY_ON_TOP:
b_arg = va_arg( args, vlc_bool_t );
CoSetWindowOnTop( p_vout, b_arg );
return VLC_SUCCESS; return VLC_SUCCESS;
case VOUT_CLOSE: case VOUT_CLOSE:
...@@ -798,7 +800,29 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) ...@@ -798,7 +800,29 @@ static int CoToggleFullscreen( vout_thread_t *p_vout )
} }
[o_pool release]; [o_pool release];
return( 0 ); return 0;
}
/*****************************************************************************
* CoSetWindowOnTop: Switches the "always on top" state of the video window
*****************************************************************************
* Returns 0 on success, 1 otherwise
*****************************************************************************/
static int CoSetWindowOnTop( vout_thread_t *p_vout, BOOL b_on_top )
{
if( p_vout->p_sys->o_window )
{
if( b_on_top )
{
[p_vout->p_sys->o_window setLevel: NSStatusWindowLevel];
}
else
{
[p_vout->p_sys->o_window setLevel: NSNormalWindowLevel];
}
return VLC_SUCCESS;
}
return VLC_EGENERIC;
} }
/***************************************************************************** /*****************************************************************************
...@@ -1103,13 +1127,11 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -1103,13 +1127,11 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
val.b_bool = VLC_FALSE; val.b_bool = VLC_FALSE;
var_Set( p_vout, "video-on-top", val ); var_Set( p_vout, "video-on-top", val );
[p_vout->p_sys->o_window setLevel: NSNormalWindowLevel];
} }
else else
{ {
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_vout, "video-on-top", val ); var_Set( p_vout, "video-on-top", val );
[p_vout->p_sys->o_window setLevel: NSStatusWindowLevel];
} }
} }
......
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