/*****************************************************************************
* vout.m: MacOS X video output module
*****************************************************************************
- * Copyright (C) 2001-2007 the VideoLAN team
+ * Copyright (C) 2001-2008 the VideoLAN team
* $Id$
*
* Authors: Colin Delacroix <colin@zoy.org>
return self;
}
-- (BOOL)setVout: (vout_thread_t *) vout s
- ubView: (NSView *) view
+- (BOOL)setVout: (vout_thread_t *) vout
+ subView: (NSView *) view
frame: (NSRect *) frame
{
int i_device;
- (void)updateTitle
{
- NSMutableString * o_title = nil, * o_mrl = nil;
+ NSString * o_title = nil;
+ NSMutableString * o_mrl = nil;
input_thread_t * p_input;
if( p_vout == NULL )
return;
}
+ char *psz_nowPlaying = input_item_GetNowPlaying ( input_GetItem( p_input ) );
char *psz_name = input_item_GetName( input_GetItem( p_input ) );
char *psz_uri = input_item_GetURI( input_GetItem( p_input ) );
- if( psz_name != NULL )
- o_title = [NSMutableString stringWithUTF8String: psz_name];
+ if( psz_nowPlaying != NULL )
+ o_title = [NSString stringWithUTF8String: psz_nowPlaying];
+ else if( psz_name != NULL )
+ o_title = [NSString stringWithUTF8String: psz_name];
+
if( psz_uri != NULL )
o_mrl = [NSMutableString stringWithUTF8String: psz_uri];
- free( psz_name );
- free( psz_uri );
+
+ FREENULL( psz_nowPlaying );
+ FREENULL( psz_name );
+ FREENULL( psz_uri );
+
if( o_title == nil )
o_title = o_mrl;
}
else
{
- [o_window setTitle: [NSString stringWithCString: VOUT_TITLE]];
+ [o_window setTitle: [NSString stringWithUTF8String: VOUT_TITLE]];
}
vlc_object_release( p_input );
}
- (void)manage
{
/* Disable Screensaver, when we're playing something, but allow it on pause */
+ if( !VLCIntf || !VLCIntf->p_sys || !VLCIntf->p_sys->i_play_status )
+ return;
+
if( VLCIntf->p_sys->i_play_status == PLAYING_S )
UpdateSystemActivity( UsrActivity );
}