#define PL_LOCK vlc_object_lock( p_playlist )
#define PL_UNLOCK vlc_object_unlock( p_playlist )
-VLC_EXPORT( playlist_t *, __pl_Yield, ( vlc_object_t * ) );
-#define pl_Yield( a ) __pl_Yield( VLC_OBJECT(a) )
+VLC_EXPORT( playlist_t *, __pl_Hold, ( vlc_object_t * ) );
+#define pl_Hold( a ) __pl_Hold( VLC_OBJECT(a) )
VLC_EXPORT( void, __pl_Release, ( vlc_object_t * ) );
#define pl_Release(a) __pl_Release( VLC_OBJECT(a) )
#define pl_CurrentInput(a) __pl_CurrentInput( VLC_OBJECT(a) )
static inline input_thread_t * __pl_CurrentInput( vlc_object_t * p_this )
{
- playlist_t * p_playlist = pl_Yield( p_this );
+ playlist_t * p_playlist = pl_Hold( p_this );
if( !p_playlist ) return NULL;
input_thread_t * p_input = playlist_CurrentInput( p_playlist );
pl_Release( p_this );
if( p_sys->i_track < 0 && i_mrl_tracknum <= 0 )
{
/* We only do separate items if the whole disc is requested */
- playlist_t *p_playlist = pl_Yield( p_access );
+ playlist_t *p_playlist = pl_Hold( p_access );
i_ret = -1;
if( p_playlist )
#endif
if (! p_cdda->b_nav_mode ) {
- p_playlist = pl_Yield( p_access );
+ p_playlist = pl_Hold( p_access );
}
if( b_single_track || p_cdda->b_nav_mode ) {
if( psz_name == NULL )
return VLC_ENOMEM;
- playlist_t *p_playlist = pl_Yield( p_access );
+ playlist_t *p_playlist = pl_Hold( p_access );
input_thread_t *p_input = (input_thread_t*)vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
playlist_item_t *p_item_in_category;
if( config_GetInt(p_this, SOUT_CFG_PREFIX "bonjour") )
{
char *psz_txt, *psz_name;
- playlist_t *p_playlist = pl_Yield( p_access );
+ playlist_t *p_playlist = pl_Hold( p_access );
char *psz_uri = input_item_GetURI( p_playlist->status.p_item->p_input );
char *psz_newuri = psz_uri;
mtime_t i_seconds;
vlc_value_t time;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
/* Get new URL */
p_current_item = p_playlist->status.p_item;
#endif
/* Find the playlist */
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
/* Retrieve navigation history from playlist */
if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||
#endif
/* Find the playlist */
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
/* Retrieve navigation history from playlist */
if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||
r->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
}
- var_SetInteger( pl_Yield( p_input ), "item-change", p_item->i_id );
+ var_SetInteger( pl_Hold( p_input ), "item-change", p_item->i_id );
pl_Release( p_input );
free( psz_comment );
i++;
DBUS_METHOD( Quit )
{ /* exits vlc */
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
playlist_Stop( p_playlist );
pl_Release( ((vlc_object_t*) p_this) );
vlc_object_kill(((vlc_object_t*)p_this)->p_libvlc);
vlc_value_t position;
dbus_int32_t i_pos;
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
PL_LOCK;
input_thread_t *p_input = p_playlist->p_input;
dbus_error_free( &error );
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
+ p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
PL_LOCK;
input_thread_t *p_input = p_playlist->p_input;
DBUS_METHOD( Next )
{ /* next playlist item */
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
playlist_Next( p_playlist );
pl_Release( ((vlc_object_t*) p_this) );
REPLY_SEND;
DBUS_METHOD( Prev )
{ /* previous playlist item */
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
playlist_Prev( p_playlist );
pl_Release( ((vlc_object_t*) p_this) );
REPLY_SEND;
DBUS_METHOD( Stop )
{ /* stop playing */
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p_this) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
playlist_Stop( p_playlist );
pl_Release( ((vlc_object_t*) p_this) );
REPLY_SEND;
DBUS_METHOD( Pause )
{
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
playlist_Pause( p_playlist );
pl_Release( (vlc_object_t*) p_this );
REPLY_SEND;
DBUS_METHOD( Play )
{
REPLY_INIT;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
PL_LOCK;
input_thread_t *p_input = p_playlist->p_input;
{
REPLY_INIT;
OUT_ARGUMENTS;
- playlist_t* p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t* p_playlist = pl_Hold( (vlc_object_t*) p_this );
PL_LOCK;
if( p_playlist->status.p_item )
GetInputMeta( p_playlist->status.p_item->p_input, &args );
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ p_playlist = pl_Hold( (vlc_object_t*) p_this );
playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND |
( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) ,
PLAYLIST_END, true, false );
REPLY_INIT;
OUT_ARGUMENTS;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
dbus_int32_t i_position = p_playlist->i_current_index;
pl_Release( (vlc_object_t*) p_this );
dbus_int32_t i_position;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
PL_LOCK;
dbus_message_get_args( p_from, &error,
REPLY_INIT;
OUT_ARGUMENTS;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
dbus_int32_t i_elements = p_playlist->current.i_size;
pl_Release( (vlc_object_t*) p_this );
dbus_error_init( &error );
dbus_int32_t i_position;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
dbus_message_get_args( p_from, &error,
DBUS_TYPE_INT32, &i_position,
}
val.b_bool = ( b_loop == TRUE ) ? true : false ;
- p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ p_playlist = pl_Hold( (vlc_object_t*) p_this );
var_Set ( p_playlist, "loop", val );
pl_Release( ((vlc_object_t*) p_this) );
val.b_bool = ( b_repeat == TRUE ) ? true : false ;
- p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ p_playlist = pl_Hold( (vlc_object_t*) p_this );
var_Set ( p_playlist, "repeat", val );
pl_Release( ((vlc_object_t*) p_this) );
val.b_bool = ( b_random == TRUE ) ? true : false ;
- p_playlist = pl_Yield( (vlc_object_t*) p_this );
+ p_playlist = pl_Hold( (vlc_object_t*) p_this );
var_Set ( p_playlist, "random", val );
pl_Release( ((vlc_object_t*) p_this) );
dbus_connection_flush( p_conn );
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
PL_LOCK;
var_AddCallback( p_playlist, "playlist-current", TrackChange, p_intf );
var_AddCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf );
static void Close ( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t*) p_this;
- playlist_t *p_playlist = pl_Yield( p_intf );;
+ playlist_t *p_playlist = pl_Hold( p_intf );;
input_thread_t *p_input;
PL_LOCK;
SIGNAL_INIT("TrackListChange");
OUT_ARGUMENTS;
- playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_data );
+ playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_data );
dbus_int32_t i_elements = p_playlist->current.i_size;
pl_Release( (vlc_object_t*) p_data );
p_sys->b_meta_read = false;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = p_playlist->p_input;
if( !p_input )
{
intf_sys_t* p_sys = p_intf->p_sys;
dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST;
- playlist_t* p_playlist = pl_Yield( p_intf );
+ playlist_t* p_playlist = pl_Hold( p_intf );
if( !b_playlist_locked ) PL_LOCK;
if( p_playlist->current.i_size > 0 )
playlist_t* p_playlist = NULL;
input_thread_t* p_input = NULL;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( lock )
PL_LOCK;
case GESTURE(RIGHT,LEFT,NONE,NONE):
{
input_thread_t * p_input;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_object_release( p_playlist );
}
break;
case GESTURE(LEFT,DOWN,NONE,NONE):
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
playlist_Prev( p_playlist );
vlc_object_release( p_playlist );
break;
case GESTURE(RIGHT,DOWN,NONE,NONE):
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
vlc_value_t val, list, list2;
int i_count, i;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_value_t val, list, list2;
int i_count, i;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_object_release( p_playlist );
vout_thread_t *p_vout = NULL;
vlc_value_t val;
int i;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
int canc = vlc_savecancel();
vlc_cleanup_push( __pl_Release, p_intf );
{
vlc_value_t val;
char psz_bookmark_name[11];
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
sprintf( psz_bookmark_name, "bookmark%i", i_num );
var_Create( p_intf, psz_bookmark_name, VLC_VAR_STRING|VLC_VAR_DOINHERIT );
static void SetBookmark( intf_thread_t *p_intf, int i_num )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
char psz_bookmark_name[11];
sprintf( psz_bookmark_name, "bookmark%i", i_num );
var_Create( p_intf, psz_bookmark_name,
return( VLC_ENOMEM );
}
- p_sys->p_playlist = pl_Yield( p_this );
+ p_sys->p_playlist = pl_Hold( p_this );
p_sys->p_input = NULL;
p_sys->p_vlm = NULL;
p_sys->psz_address = psz_address;
FIND_ANYWHERE );
if( p_input )
{
- p_playlist = pl_Yield( p_input );
+ p_playlist = pl_Hold( p_input );
}
}
/* New input has been registered */
p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input )
{
- p_playlist = pl_Yield( p_input );
+ p_playlist = pl_Hold( p_input );
char cmd[6];
switch( p_playlist->status.i_status )
{
vlc_value_t val;
intf_thread_t *p_intf = (intf_thread_t*)p_this;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
PL_LOCK;
if( p_playlist->p_input )
VLC_UNUSED(oldval); VLC_UNUSED(newval);
playlist_t *p_playlist;
- p_playlist = pl_Yield( p_this );
+ p_playlist = pl_Hold( p_this );
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
return VLC_EGENERIC;
}
- p_playlist = pl_Yield( p_this );
+ p_playlist = pl_Hold( p_this );
if( p_playlist->p_input )
{
fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
// only do something if user clicked the same item twice
if ( fLastClickedItem == item )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
playlist_Goto( p_playlist, i );
void
PlaylistView::RebuildList()
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
// remove all items
BListItem * item;
BListItem*
PlaylistView::_PlayingItem() const
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( !p_playlist )
{
{
if ( item == playingItem )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( !p_playlist )
{
if( rebuild )
fListView->RebuildList();
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
fListView->SetCurrent( p_playlist->i_index );
fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING );
pl_Release( p_intf );
if ( [o_command isEqualToString:@"GetURL"] || [o_command isEqualToString:@"OpenURL"] )
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return nil;
NSString *o_command = [[self commandDescription] commandName];
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return nil;
- (IBAction)play:(id)sender
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
bool empty;
PL_LOCK;
{
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
var_Get( p_playlist, "random", &val );
val.b_bool = !val.b_bool;
- (void)shuffle
{
vlc_value_t val;
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
var_Get( p_playlist, "random", &val );
[o_btn_shuffle setState: val.b_bool];
vlc_object_release( p_playlist );
{
vlc_value_t looping,repeating;
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
var_Get( p_playlist, "repeat", &repeating );
var_Get( p_playlist, "loop", &looping );
{
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
var_Get( p_playlist, "repeat", &val );
if (!val.b_bool)
{
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
var_Get( p_playlist, "loop", &val );
if (!val.b_bool)
}
else
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
if( [o_title isEqualToString: _NS("Fullscreen")] ||
[sender isKindOfClass:[NSButton class]] )
BOOL bEnabled = TRUE;
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf;
- 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( [[o_mi title] isEqualToString: _NS("Faster")] ||
- (BOOL)windowShouldClose:(id)sender
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
aout_instance_t *p_aout = (aout_instance_t *)p_object;
if( !p_object )
{
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
}
psz_string = var_GetNonEmptyString( p_object, "audio-filter" );
vlc_object_t *p_object = vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
if( (BOOL)config_GetInt( p_intf, "macosx-eq-keep" ) == YES )
psz_string = config_GetPsz( p_intf, "audio-filter" );
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
var_Create( p_object, "equalizer-preamp", VLC_VAR_FLOAT |
VLC_VAR_DOINHERIT );
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
char psz_values[102];
memset( psz_values, 0, 102 );
vlc_object_t *p_object= vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
char psz_values[102];
memset( psz_values, 0, 102 );
vlc_object_t *p_object = vlc_object_find( p_intf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
var_SetFloat( p_object, "equalizer-preamp", f_preamp );
VLC_OBJECT_AOUT, FIND_ANYWHERE );
aout_instance_t *p_aout = (aout_instance_t *)p_object;
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( p_intf );
+ p_object = (vlc_object_t *)pl_Hold( p_intf );
var_SetBool( p_object, "equalizer-2pass", b_2p );
if( ( [o_ckb_enable state] ) && ( p_aout != NULL ) )
vlc_object_t *p_object= vlc_object_find( VLCIntf,
VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_object == NULL )
- p_object = (vlc_object_t *)pl_Yield( VLCIntf );
+ p_object = (vlc_object_t *)pl_Hold( VLCIntf );
[o_window setExcludedFromWindowsMenu: TRUE];
id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp orderedWindows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
vout_thread_t *p_real_vout;
{
/* save the preferences to make sure that our module-changes will up on
* next launch again */
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
int returnedValue;
NSArray * theModules;
theModules = [[NSArray alloc] initWithObjects: @"main",
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 );
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 );
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;
- (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;
default:
return;
}
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_input = playlist_CurrentInput( p_playlist );
if( p_input != NULL )
{
}
- (void)awakeFromNib
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
[o_outline_view setTarget: self];
[o_outline_view setDelegate: self];
[o_outline_view setDataSource: self];
{
int i_return = 0;
playlist_item_t *p_item = NULL;
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
assert( outlineView == o_outline_view );
if( !item )
{
playlist_item_t *p_return = NULL, *p_item = NULL;
NSValue *o_value;
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
PL_LOCK;
if( item == nil )
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
{
int i_return = 0;
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
if( item == nil )
{
- (void)awakeFromNib
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
int i;
[[[[VLCMain sharedInstance] getWizard] getPlaylistWizard] reloadOutlineView];
[[[[VLCMain sharedInstance] getBookmarks] getDataTable] reloadData];
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
if( playlist_CurrentSize( p_playlist ) >= 2 )
{
- (void)playModeUpdated
{
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
bool loop = var_GetBool( p_playlist, "loop" );
bool repeat = var_GetBool( p_playlist, "repeat" );
unsigned int j;
// FIXME: unsafe
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
playlist_item_t *p_item, *p_temp_item;
NSMutableArray *o_array = [NSMutableArray array];
locked:(BOOL)b_locked
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
playlist_item_t *p_temp_item = p_item;
if( p_node == p_item )
- (IBAction)savePlaylist:(id)sender
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
NSSavePanel *o_save_panel = [NSSavePanel savePanel];
NSString * o_name = [NSString stringWithFormat: @"%@", _NS("Untitled")];
- (IBAction)playItem:(id)sender
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
playlist_item_t *p_item;
playlist_item_t *p_node = NULL;
int i_count;
NSMutableArray *o_to_preparse;
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
o_to_preparse = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
i_count = [o_to_preparse count];
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
NSString *o_string = [o_mi representedObject];
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
if( !playlist_IsServicesDiscoveryLoaded( p_playlist, [o_string UTF8String] ) )
playlist_ServicesDiscoveryAdd( p_playlist, [o_string UTF8String] );
else
o_to_delete = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
i_count = [o_to_delete count];
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
PL_LOCK;
for( int i = 0; i < i_count; i++ )
- (void)sortNode:(int)i_mode
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
playlist_item_t * p_item;
if( [o_outline_view selectedRow] > -1 )
- (input_item_t *)createItem:(NSDictionary *)o_one_item
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
input_item_t *p_input;
int i;
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue
{
int i_item;
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
PL_LOCK;
for( i_item = 0; i_item < (int)[o_array count]; i_item++ )
- (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue
{
int i_item;
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
for( i_item = 0; i_item < (int)[o_array count]; i_item++ )
{
- (NSMutableArray *)subSearchItem:(playlist_item_t *)p_item
{
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
playlist_item_t *p_selected_item;
int i_current, i_selected_row;
- (IBAction)searchItem:(id)sender
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
id o_result;
unsigned int i;
int i_mode = 0, i_type;
intf_thread_t *p_intf = VLCIntf;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
/* Check whether the selected table column header corresponds to a
sortable table column*/
forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
{
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
id o_playing_item;
NSAutoreleasePool * ourPool = [[NSAutoreleasePool alloc] init];
/* simply adds a new node to the end of the playlist */
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
vlc_thread_set_priority( p_playlist, VLC_THREAD_PRIORITY_LOW );
int ret_v;
- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item
{
id o_value = [super outlineView: outlineView child: index ofItem: item];
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
if( playlist_CurrentSize( p_playlist ) >= 2 )
{
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
{
unsigned int i;
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
/* First remove the items that were moved during the last drag & drop
operation */
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(int)index
{
- playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_t *p_playlist = pl_Hold( VLCIntf );
NSPasteboard *o_pasteboard = [info draggingPasteboard];
if( !p_playlist ) return NSDragOperationNone;
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(int)index
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
NSPasteboard *o_pasteboard = [info draggingPasteboard];
/* Drag & Drop inside the playlist */
{
if( !input_item_IsPreparsed( p_item ) )
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
playlist_PreparseEnqueue( p_playlist, p_item );
pl_Release( VLCIntf );
}
- (IBAction)saveMetaData:(id)sender
{
- playlist_t * p_playlist = pl_Yield( VLCIntf );
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
vlc_value_t val;
if( !p_item ) goto error;
- (void)enterFullscreen
{
/* Save the settings for next playing item */
- playlist_t * p_playlist = pl_Yield( p_real_vout );
+ playlist_t * p_playlist = pl_Hold( p_real_vout );
var_SetBool( p_playlist, "fullscreen", true );
pl_Release( p_real_vout );
}
- (void)leaveFullscreen
{
/* Save the settings for next playing item */
- playlist_t * p_playlist = pl_Yield( p_real_vout );
+ playlist_t * p_playlist = pl_Hold( p_real_vout );
var_SetBool( p_playlist, "fullscreen", false );
pl_Release( p_real_vout );
}
{
intf_thread_t * p_intf = VLCIntf;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
int x = 0;
int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
static void Run( intf_thread_t *p_intf )
{
intf_sys_t *p_sys = p_intf->p_sys;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
p_sys->p_playlist = p_playlist;
int i_key;
return 0; \
} while(0)
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_sys->i_box_type == BOX_PLAYLIST )
{
{
intf_sys_t *p_sys = p_intf->p_sys;
input_thread_t *p_input = p_sys->p_input;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
int y = 0;
int h;
int y_end;
static playlist_item_t *PlaylistGetRoot( intf_thread_t *p_intf )
{
intf_sys_t *p_sys = p_intf->p_sys;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
playlist_item_t *p_item;
switch( p_sys->i_current_view )
static void PlaylistRebuild( intf_thread_t *p_intf )
{
intf_sys_t *p_sys = p_intf->p_sys;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
PL_LOCK;
VLC_UNUSED(p_this); VLC_UNUSED(psz_variable);
VLC_UNUSED(oval); VLC_UNUSED(nval);
intf_thread_t *p_intf = (intf_thread_t *)param;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
p_intf->p_sys->b_need_update = true;
p_intf->p_sys->p_node = p_playlist->status.p_node;
vlc_object_release( p_playlist );
static inline bool PlaylistIsPlaying( intf_thread_t *p_intf,
playlist_item_t *p_item )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
playlist_item_t *p_played_item = p_playlist->status.p_item;
vlc_object_release( p_playlist );
return( p_item != NULL && p_played_item != NULL &&
* If it's neither of these, then return
*/
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
PL_LOCK;
if( p_playlist->status.p_item == NULL )
static void PlayPause( intf_thread_t *p_intf )
{
input_thread_t *p_input = p_intf->p_sys->p_input;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
vlc_value_t val;
if( p_input )
gtk_tree_view_column_set_sort_column_id(p_column, 2);
#endif
/* update the playlist */
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
p_playlist_store = gtk_list_store_new (3,
G_TYPE_STRING, /* Filename */
G_TYPE_STRING, /* Time */
p_intf->p_sys->b_playing = 1;
/* update playlist interface */
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if (p_playlist != NULL)
{
p_liststore = gtk_list_store_new (3,
int i_id , i_pos=0;
GtkTreeView *p_tvplaylist = NULL;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL)
{ /* Bail out when VLC's playlist object is not found. */
void onPlay(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if (p_playlist)
{
void onStop(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if (p_playlist)
{
playlist_Stop( p_playlist );
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) );
GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview);
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
void onUpdatePlaylist(GtkButton *button, gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
GtkTreeView *p_tvplaylist = NULL;
if( p_playlist == NULL )
void onDeletePlaylist(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
GtkTreeView *p_tvplaylist;
/* Delete an arbitrary item from the playlist */
void onClearPlaylist(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
GtkTreeView *p_tvplaylist;
int item;
}
/* Update the playlist */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
/* Get all the options. */
input_item_SetPublisher( p_input, qtu( publisher_text->text() ) );
input_item_SetDescription( p_input, qtu( description_text->text() ) );
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
PL_LOCK;
p_playlist->p_private = &p_export;
setContextMenuPolicy( Qt::ActionsContextMenu );
CONNECT( this, updateRequested(), this, doUpdate() );
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
var_AddCallback( p_playlist, "item-change",
downloadCoverCallback, this );
pl_Release( p_this );
{
if( p_input )
{
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
playlist_AskForArtEnqueue( p_playlist, p_input );
pl_Release( p_this );
}
else
{
/* we are working as a dialogs provider */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
p_input = playlist_CurrentInput( p_playlist );
if( p_input )
{
p_intf->p_sys->p_mi = NULL;
/* Access to the playlist */
- p_intf->p_sys->p_playlist = pl_Yield( p_intf );
+ p_intf->p_sys->p_playlist = pl_Hold( p_intf );
/* Listen to the messages */
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
/* one settings to rule them all */
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->p_sys->p_input = NULL;
- p_intf->p_sys->p_playlist = pl_Yield( p_intf );
+ p_intf->p_sys->p_playlist = pl_Hold( p_intf );
// Initialize "singleton" objects
p_intf->p_sys->p_logger = NULL;
// Do nothing is skins2 is not the main interface
if( var_Type( p_intf, "skin-to-load" ) == VLC_VAR_STRING )
{
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
// Make sure the item is deleted afterwards
/// \bug does not always work
p_playlist->status.p_item->i_flags |= PLAYLIST_REMOVE_FLAG;
TCHAR szFile[MAX_PATH] = _T("\0");
static TCHAR szFilter[] = _T("wav (*.wav)\0*.wav\0mp3 (*.mp3 *.mpga)\0*.mp3;*.mpga\0All (*.*)\0*.*\0");
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
memset( &ofn, 0, sizeof(OPENFILENAME) );
if( !SUCCEEDED( SHGetMalloc(&p_malloc) ) ) goto error;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( !p_playlist ) goto error;
memset( &bi, 0, sizeof(BROWSEINFO) );
void Interface::OnPlayStream( void )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
if( !playlist_IsEmpty(p_playlist) )
void Interface::OnStopStream( void )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_Stop( p_playlist );
void Interface::OnPrevStream( void )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_Prev( p_playlist );
void Interface::OnNextStream( void )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_Next( p_playlist );
vlc_mutex_lock( &p_item->p_input->lock );
bool b_old_enabled = !(p_item->i_flags & PLAYLIST_DBL_FLAG);
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist != NULL )
{
b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 );
}
else
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist && !playlist_IsEmpty( p_playlist ) )
{
AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") );
ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );*/
/* Update the playlist */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
/* for( int i = 0; i < i_args; i++ )
// random, loop, repeat buttons states
vlc_value_t val;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( !p_playlist ) break;
var_Get( p_playlist , "random", &val );
return CDRF_NOTIFYITEMDRAW;
case CDDS_ITEMPREPAINT: //Before an item is drawn
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return CDRF_DODEFAULT;
if( (int)lplvcd->nmcd.dwItemSpec == p_playlist->i_current_index )
{
b_need_update = false;
}
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
/* Update the colour of items */
**********************************************************************/
void Playlist::Rebuild()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
int i_focused =
**********************************************************************/
void Playlist::UpdateItem( int i )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
**********************************************************************/
void Playlist::DeleteItem( int item )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_DeleteFromInput( p_playlist, item, FALSE );
if( p_arg->i_results && p_arg->psz_results[0] )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
if( p_arg->i_results && p_arg->psz_results[0] )
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
void Playlist::OnEnableSelection()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
for( long item = ListView_GetItemCount( hListView ) - 1;
void Playlist::OnDisableSelection()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
for( long item = ListView_GetItemCount( hListView ) - 1;
void Playlist::OnActivateItem( int i_item )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_Skip( p_playlist, i_item - p_playlist->i_current_index );
void Playlist::ShowInfos( HWND hwnd, int i_item )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
PL_LOCK;
********************************************************************/
void Playlist::OnUp()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
/* We use the first selected item, so find it */
void Playlist::OnDown()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
/* We use the first selected item, so find it */
int bState = SendMessage( hwndTB, TB_GETSTATE, Random_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "random", val );
int bState = SendMessage( hwndTB, TB_GETSTATE, Loop_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "loop", val );
int bState = SendMessage( hwndTB, TB_GETSTATE, Repeat_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "repeat", val );
********************************************************************/
void Playlist::OnSort( UINT event )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
switch( event )
void Playlist::OnColSelect( int iSubItem )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
switch( iSubItem )
int i_popup_item =
ListView_GetNextItem( hListView, -1, LVIS_SELECTED | LVNI_ALL );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
if( i_popup_item != -1 )
int i_popup_item =
ListView_GetNextItem( hListView, -1, LVIS_SELECTED | LVNI_ALL );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
playlist_item_t *p_item =
i_old_rate = INPUT_RATE_DEFAULT;
/* Register callback for the intf-popupmenu variable */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist != NULL )
{
var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
Timer::~Timer()
{
/* Unregister callback */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist != NULL )
{
var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return;
void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return;
main_sizer->Add( main_panel, 1, wxEXPAND );
SetSizer( main_sizer );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
/* Some global changes happened -> Rebuild all */
BookmarksDialog::~BookmarksDialog()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
var_DelCallback( p_playlist, "playlist-current",
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
p_intf = _p_intf;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
b_stats = config_GetInt(p_intf, "stats");
/* Initializations */
if( mdate() - last_update < 400000L ) return;
last_update = mdate();
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( !p_playlist ) return;
input_thread_t *p_input = p_playlist->p_input ;
}
/* Update the playlist */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
for( int i = 0; i < (int)mrl.GetCount(); i++ )
i_sort_mode = MODE_NONE;
b_need_update = false;
i_items_to_append = 0;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
SetIcon( *p_intf->p_sys->p_icon );
openSizer->Fit(open_panel);
mainSizer->Add( open_panel );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
if( !playlist_IsEmpty( p_playlist ) )
if( i != -1 )
{
long data = listview->GetItemData( i );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
playlist_item_t * p_item = playlist_ItemGetById( p_playlist, (int)data, false );
free( psz_sap_option );
}
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
input_item_t *p_input = input_item_New( p_playlist, mrl,
*****************************************************************************/
void InputManager::UpdateInput()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist != NULL )
{
LockPlaylist( p_intf->p_sys, p_playlist );
void Interface::PlayStream()
{
wxCommandEvent dummy;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
if( !playlist_IsEmpty(p_playlist) )
}
void Interface::StopStream()
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return;
void Interface::PrevStream()
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return;
void Interface::NextStream()
{
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return;
const wxArrayString& filenames )
{
/* Add dropped files to the playlist */
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL )
{
return FALSE;
unsigned int i_last_separator = 0; \
ArrayOfInts ai_objects; \
ArrayOfStrings as_varnames; \
- playlist_t *p_playlist = pl_Yield( p_intf ); \
+ playlist_t *p_playlist = pl_Hold( p_intf ); \
if( !p_playlist ) \
return; \
input_thread_t *p_input = p_playlist->p_input
if( event.GetId() >= Play_Event && event.GetId() <= Stop_Event )
{
input_thread_t *p_input;
- playlist_t * p_playlist = pl_Yield( p_intf );
+ playlist_t * p_playlist = pl_Hold( p_intf );
if( !p_playlist ) return;
switch( event.GetId() )
i_cached_item_id = -1;
i_update_counter = 0;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( p_playlist == NULL ) return;
var_Create( p_intf, "random", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
vlc_mutex_init( &p_sys->lock );
vlc_cond_init( &p_sys->wait );
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
PL_LOCK;
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
PL_UNLOCK;
intf_thread_t *p_intf = ( intf_thread_t* ) p_this;
intf_sys_t *p_sys = p_intf->p_sys;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( p_playlist )
{
PL_LOCK;
p_sys->b_meta_read = false;
p_sys->b_submit = false;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
PL_LOCK;
p_input = p_playlist->p_input;
intf_sys_t *p_sys = p_this->p_sys;
- p_playlist = pl_Yield( p_this );
+ p_playlist = pl_Hold( p_this );
PL_LOCK;
p_input = p_playlist->p_input;
if( !p_input )
input_thread_t *p_input_thread = (input_thread_t *)
vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
input_item_t *p_current_input = input_GetItem( p_input_thread );
- playlist_t *p_playlist = pl_Yield( p_demux );
+ playlist_t *p_playlist = pl_Hold( p_demux );
luaL_register( L, "vlc", p_reg_parse );
playlist_t *vlclua_get_playlist_internal( lua_State *L )
{
vlc_object_t *p_this = vlclua_get_this( L );
- return pl_Yield( p_this );
+ return pl_Hold( p_this );
}
void vlclua_release_playlist_internal( playlist_t *p_playlist )
snprintf (buf, sizeof (buf), "%s/vlc48x48.png", data_path);
p_sys->default_icon = (CFDataRef) readFile( buf );
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
[p_sys->p_pool release];
free( p_sys );
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this );
pl_Release( p_this );
}
char *psz_artist = NULL;
char *psz_album = NULL;
input_thread_t *p_input;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
p_input = p_playlist->p_input;
pl_Release( p_this );
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this );
pl_Release( p_this );
}
char *psz_artist = NULL;
char *psz_album = NULL;
input_thread_t *p_input;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
p_input = p_playlist->p_input;
pl_Release( p_this );
}
msg_Dbg( p_intf, "using format: %s", p_intf->p_sys->psz_format );
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "item-change", ItemChange, p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
static void Close( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
/* clear the MSN stuff ... else it looks like we're still playing
* something although VLC (or the MSN plugin) is closed */
char *psz_album = NULL;
char *psz_buf = NULL;
input_thread_t *p_input;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
p_input = p_playlist->p_input;
pl_Release( p_this );
p_intf->p_sys->notification = NULL;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
intf_thread_t *p_intf = ( intf_thread_t* ) p_this;
intf_sys_t *p_sys = p_intf->p_sys;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this );
pl_Release( p_this );
{ /* libnotify callback, called when the "Next" button is pressed */
VLC_UNUSED(psz);
notify_notification_close (notification, NULL);
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p) );
playlist_Next( p_playlist );
pl_Release( ((vlc_object_t*) p) );
}
{ /* libnotify callback, called when the "Previous" button is pressed */
VLC_UNUSED(psz);
notify_notification_close (notification, NULL);
- playlist_t *p_playlist = pl_Yield( ((vlc_object_t*) p) );
+ playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p) );
playlist_Prev( p_playlist );
pl_Release( ((vlc_object_t*) p) );
}
p_intf->p_sys->i_id = -1;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "item-change", ItemChange, p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
static void Close( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- playlist_t *p_playlist = pl_Yield( p_this );
+ playlist_t *p_playlist = pl_Hold( p_this );
PL_LOCK;
var_DelCallback( p_playlist, "item-change", ItemChange, p_intf );
#endif
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", PlaylistNext, p_this );
var_AddCallback( p_playlist, "item-change", PlaylistNext, p_this );
pl_Release( p_intf );
static void Close( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- playlist_t *p_playlist = pl_Yield( p_intf );
+ playlist_t *p_playlist = pl_Hold( p_intf );
var_DelCallback( p_playlist, "playlist-current", PlaylistNext, p_this );
var_DelCallback( p_playlist, "item-change", PlaylistNext, p_this );
pl_Release( p_intf );
if( p_intf->p_sys->b_need_update == true )
{
p_intf->p_sys->b_need_update = false;
- p_playlist = pl_Yield( p_intf );
+ p_playlist = pl_Hold( p_intf );
if( playlist_IsEmpty( p_playlist ) )
{
services_discovery_t *p_sd = ( services_discovery_t* )p_this;
services_discovery_sys_t *p_sys = ( services_discovery_sys_t * )
malloc( sizeof( services_discovery_sys_t ) );
- playlist_t *p_playlist = pl_Yield( p_sd );
+ playlist_t *p_playlist = pl_Hold( p_sd );
p_sd->p_sys = p_sys;
p_sys->p_playlist = p_playlist;
*****************************************************************************/
static void AddStateVariableCallback(filter_t *p_filter)
{
- playlist_t *p_playlist = pl_Yield( p_filter );
+ playlist_t *p_playlist = pl_Hold( p_filter );
input_thread_t *p_input = p_playlist->p_input;
if(p_input)
{
*****************************************************************************/
static void DelStateVariableCallback( filter_t *p_filter )
{
- playlist_t *p_playlist = pl_Yield( p_filter );
+ playlist_t *p_playlist = pl_Hold( p_filter );
input_thread_t *p_input = p_playlist->p_input;
if(p_input)
{
break;
case CACA_EVENT_QUIT:
{
- p_playlist = pl_Yield( p_vout );
+ p_playlist = pl_Hold( p_vout );
if( p_playlist )
{
playlist_Stop( p_playlist );
if( (newval.b_bool && !p_vout->p_sys->b_wallpaper) ||
(!newval.b_bool && p_vout->p_sys->b_wallpaper) )
{
- playlist_t *p_playlist = pl_Yield( p_vout );
+ playlist_t *p_playlist = pl_Hold( p_vout );
if( p_playlist )
{
/* the user wants to close the window */
case WM_CLOSE:
{
- playlist_t * p_playlist = pl_Yield( p_vout );
+ playlist_t * p_playlist = pl_Hold( p_vout );
if( p_playlist )
{
playlist_Stop( p_playlist );
case SDL_QUIT:
{
#if 0
- playlist_t *p_playlist = pl_Yield( p_vout );
+ playlist_t *p_playlist = pl_Hold( p_vout );
if( p_playlist != NULL )
{
playlist_Stop( p_playlist );
== p_vout->p_sys->p_win->wm_delete_window ) )
{
/* the user wants to close the window */
- playlist_t * p_playlist = pl_Yield( p_vout );
+ playlist_t * p_playlist = pl_Hold( p_vout );
if( p_playlist != NULL )
{
playlist_Stop( p_playlist );
var_Get( p_libvlc, "open", &val );
if ( val.psz_string != NULL && *val.psz_string )
{
- playlist_t *p_playlist = pl_Yield( p_libvlc );
+ playlist_t *p_playlist = pl_Hold( p_libvlc );
playlist_AddExt( p_playlist, val.psz_string, NULL, PLAYLIST_INSERT, 0,
-1, NULL, 0, true, pl_Unlocked );
pl_Release( p_libvlc );
playlist_ServicesDiscoveryKillAll( p_playlist );
/* Free playlist */
- /* Any thread still running must not assume pl_Yield() succeeds. */
+ /* Any thread still running must not assume pl_Hold() succeeds. */
msg_Dbg( p_libvlc, "removing playlist" );
priv->p_playlist = NULL;
- vlc_object_kill( p_playlist ); /* <-- memory barrier for pl_Yield() */
+ vlc_object_kill( p_playlist ); /* <-- memory barrier for pl_Hold() */
vlc_thread_join( p_playlist );
vlc_object_release( p_playlist );
/* TODO: write an internal function of this one, to avoid
* unnecessary lookups. */
- playlist_t *p_playlist = pl_Yield( p_vlc );
+ playlist_t *p_playlist = pl_Hold( p_vlc );
playlist_AddExt( p_playlist, ppsz_argv[i_opt], NULL, PLAYLIST_INSERT,
0, -1, ( i_options ? &ppsz_argv[i_opt + 1] : NULL ),
i_options, true, pl_Unlocked );
playlist_ServicesDiscoveryRemove
playlist_TreeMove
__pl_Release
-__pl_Yield
+__pl_Hold
resolve_xml_special_chars
sdp_AddAttribute
sdp_AddMedia
#ifndef NDEBUG
if (i_type == VLC_OBJECT_PLAYLIST)
msg_Err (p_this, "using vlc_object_find(VLC_OBJECT_PLAYLIST) "
- "instead of pl_Yield()");
+ "instead of pl_Hold()");
#endif
return vlc_object_find (p_this->p_libvlc, i_type,
(i_mode & ~0x000f)|FIND_CHILD);
if( !p_this ) return 0;
/* Add files to the playlist */
- p_playlist = pl_Yield( p_this );
+ p_playlist = pl_Hold( p_this );
if( !p_playlist ) return 0;
if( pwm_data->lpData )
* Playlist control
*****************************************************************************/
-playlist_t *__pl_Yield( vlc_object_t *p_this )
+playlist_t *__pl_Hold( vlc_object_t *p_this )
{
playlist_t *pl;
pl = libvlc_priv (p_this->p_libvlc)->p_playlist;
assert( VLC_OBJECT(pl) != p_this /* This does not make sense to yield the playlist
- using pl_Yield. use vlc_object_hold in this case */ );
+ using pl_Hold. use vlc_object_hold in this case */ );
if (pl)
vlc_object_hold (pl);
assert( pl != NULL );
assert( VLC_OBJECT(pl) != p_this /* The rule is that pl_Release() should act on
- the same object than pl_Yield() */ );
+ the same object than pl_Hold() */ );
vlc_object_release( pl );
}
if( !dst ) return NULL;
int d = 0;
- playlist_t *p_playlist = pl_Yield( p_object );
+ playlist_t *p_playlist = pl_Hold( p_object );
input_thread_t *p_input = playlist_CurrentInput( p_playlist );
input_item_t *p_item = NULL;
pl_Release( p_object );