#import "AppleRemote.h"
#import "eyetv.h"
#import "simple_prefs.h"
+#import "vlm.h"
#import <vlc_input.h>
#import <vlc_interface.h>
o_prefs = nil;
o_open = [[VLCOpen alloc] init];
o_wizard = [[VLCWizard alloc] init];
+ o_vlm = [[VLCVLMController alloc] init];
o_extended = nil;
o_bookmarks = [[VLCBookmarks alloc] init];
o_embedded_list = [[VLCEmbeddedList alloc] init];
o_size_with_playlist = [o_window contentRectForFrameRect:[o_window frame]].size;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
val.b_bool = false;
/* Kill the playlist, so that it doesn't accept new request
* such as the play request from vlc.c (we are a blocking interface). */
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
vlc_object_kill( p_playlist );
pl_Release( p_intf );
return nil;
}
+- (id)getVLM
+{
+ return o_vlm;
+}
+
- (id)getBookmarks
{
if( o_bookmarks )
vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_LOW );
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", PlaylistChanged, self );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self );
vlc_mutex_unlock( &p_intf->change_lock );
msleep( INTF_IDLE_SLEEP );
+
[pool release];
}
bool b_seekable = false;
bool b_chapters = false;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
/* TODO: fix i_size use */
b_plmul = p_playlist->items.i_size > 1;
[self setScrollField: aString stopAfter:-1];
[[[self getControls] getFSPanel] setStreamTitle: aString];
- [[o_controls getVoutView] updateTitle];
+ [[o_controls voutView] updateTitle];
[o_playlist updateRowSelection];
p_intf->p_sys->b_current_title_update = FALSE;
- (void)setupMenus
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
input_thread_t * p_input = playlist_CurrentInput( p_playlist );
if( p_input != NULL )
{
- (void)resetScrollField
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
input_thread_t * p_input = playlist_CurrentInput( p_playlist );
i_end_scroll = -1;
if( p_input && vlc_object_alive (p_input) )
{
NSString *o_temp;
- if( input_item_GetNowPlaying ( p_playlist->status.p_item->p_input ) )
- o_temp = [NSString stringWithUTF8String:
- input_item_GetNowPlaying ( p_playlist->status.p_item->p_input )];
+ playlist_item_t * p_item = playlist_CurrentPlayingItem( p_playlist );
+ if( input_item_GetNowPlaying( p_item->p_input ) )
+ o_temp = [NSString stringWithUTF8String:input_item_GetNowPlaying( p_item->p_input )];
else
- o_temp = [NSString stringWithUTF8String:
- p_playlist->status.p_item->p_input->psz_name];
+ o_temp = [NSString stringWithUTF8String:p_item->p_input->psz_name];
[self setScrollField: o_temp stopAfter:-1];
[[[self getControls] getFSPanel] setStreamTitle: o_temp];
vlc_object_release( p_input );
default:
return;
}
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = playlist_CurrentInput( p_playlist );
if( p_input != NULL )
{
}
}
+- (IBAction)showVLM:(id)sender
+{
+ if( !nib_vlm_loaded )
+ nib_vlm_loaded = [NSBundle loadNibNamed:@"VLM" owner:self];
+
+ [o_vlm showVLMWindow];
+}
+
- (IBAction)showExtended:(id)sender
{
if( o_extended == nil )
return;
}
- NSArray * ourPreferences = [NSArray arrayWithObjects:@"org.videolan.vlc.plist", @"VLC"];
+ NSArray * ourPreferences = [NSArray arrayWithObjects:@"org.videolan.vlc.plist", @"VLC", nil];
/* Move the file to trash so that user can find them later */
[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:preferences destination:nil files:ourPreferences tag:0];