From: Antoine Cellerier Date: Sat, 20 Sep 2008 17:41:42 +0000 (+0200) Subject: s/pl_Yield/pl_Hold/ X-Git-Tag: 1.0.0-pre1~3048 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ba6501f3084682844e7ee87bad3986bced5f3652;p=vlc s/pl_Yield/pl_Hold/ --- diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index 430b4a0d7e..8307d40a6c 100644 --- a/include/vlc_playlist.h +++ b/include/vlc_playlist.h @@ -273,8 +273,8 @@ enum pl_locked_state #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) ) @@ -420,7 +420,7 @@ static inline int playlist_Import( playlist_t *p_playlist, const char *psz_file) #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 ); diff --git a/modules/access/cdda.c b/modules/access/cdda.c index a5d93adb9e..6d8602c98e 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -187,7 +187,7 @@ static int Open( vlc_object_t *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 ) diff --git a/modules/access/cdda/info.c b/modules/access/cdda/info.c index b301315651..e90b28c086 100644 --- a/modules/access/cdda/info.c +++ b/modules/access/cdda/info.c @@ -864,7 +864,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, #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 ) { diff --git a/modules/access/directory.c b/modules/access/directory.c index b5a38af7aa..c625e1bd38 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -208,7 +208,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len) 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; diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 9d4864407c..5de529bd04 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -295,7 +295,7 @@ static int Open( vlc_object_t *p_this ) 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; diff --git a/modules/codec/cmml/intf.c b/modules/codec/cmml/intf.c index 389465c442..a93fe445a5 100644 --- a/modules/codec/cmml/intf.c +++ b/modules/codec/cmml/intf.c @@ -437,7 +437,7 @@ static void FollowAnchor ( intf_thread_t *p_intf ) 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; @@ -641,7 +641,7 @@ void GoBack( intf_thread_t *p_intf ) #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 || @@ -713,7 +713,7 @@ void GoForward( intf_thread_t *p_intf ) #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 || diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c index 650cd8a51c..952b33f97a 100644 --- a/modules/codec/vorbis.c +++ b/modules/codec/vorbis.c @@ -694,7 +694,7 @@ static void ParseVorbisComments( decoder_t *p_dec ) 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++; diff --git a/modules/control/dbus.c b/modules/control/dbus.c index e5c632ab37..4873e87555 100644 --- a/modules/control/dbus.c +++ b/modules/control/dbus.c @@ -126,7 +126,7 @@ vlc_module_end(); 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); @@ -166,7 +166,7 @@ DBUS_METHOD( PositionGet ) 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; @@ -205,7 +205,7 @@ DBUS_METHOD( PositionSet ) 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; @@ -265,7 +265,7 @@ DBUS_METHOD( VolumeSet ) 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; @@ -274,7 +274,7 @@ DBUS_METHOD( Next ) 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; @@ -283,7 +283,7 @@ DBUS_METHOD( Prev ) 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; @@ -308,7 +308,7 @@ DBUS_METHOD( GetStatus ) 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; @@ -317,7 +317,7 @@ DBUS_METHOD( Pause ) 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; @@ -342,7 +342,7 @@ DBUS_METHOD( GetCurrentMetadata ) { 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 ); @@ -407,7 +407,7 @@ DBUS_METHOD( AddTrack ) 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 ); @@ -424,7 +424,7 @@ DBUS_METHOD( GetCurrentTrack ) 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 ); @@ -441,7 +441,7 @@ DBUS_METHOD( GetMetadata ) 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, @@ -473,7 +473,7 @@ DBUS_METHOD( GetLength ) 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 ); @@ -489,7 +489,7 @@ DBUS_METHOD( DelTrack ) 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, @@ -541,7 +541,7 @@ DBUS_METHOD( SetLoop ) } 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) ); @@ -573,7 +573,7 @@ DBUS_METHOD( Repeat ) 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) ); @@ -605,7 +605,7 @@ DBUS_METHOD( SetRandom ) 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) ); @@ -764,7 +764,7 @@ static int Open( 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 ); @@ -792,7 +792,7 @@ static int Open( vlc_object_t *p_this ) 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; @@ -855,7 +855,7 @@ DBUS_SIGNAL( TrackListChangeSignal ) 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 ); @@ -996,7 +996,7 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var, 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 ) @@ -1035,7 +1035,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked ) { 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 ) @@ -1160,7 +1160,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args, 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; diff --git a/modules/control/gestures.c b/modules/control/gestures.c index 5275e6e311..a2e4093804 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -227,7 +227,7 @@ static void RunIntf( intf_thread_t *p_intf ) 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 ); @@ -254,13 +254,13 @@ static void RunIntf( intf_thread_t *p_intf ) } 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 ); @@ -293,7 +293,7 @@ static void RunIntf( intf_thread_t *p_intf ) 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 ); @@ -348,7 +348,7 @@ static void RunIntf( intf_thread_t *p_intf ) 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 ); diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index a9798fe186..68161c316d 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -149,7 +149,7 @@ static void Run( intf_thread_t *p_intf ) 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 ); @@ -947,7 +947,7 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num ) { 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 ); @@ -973,7 +973,7 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num ) 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, diff --git a/modules/control/http/http.c b/modules/control/http/http.c index 587ca1df7a..d66e8f1dce 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -128,7 +128,7 @@ static int Open( vlc_object_t *p_this ) 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; diff --git a/modules/control/rc.c b/modules/control/rc.c index 2c252c2b4c..9c8b62705a 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -506,7 +506,7 @@ static void Run( intf_thread_t *p_intf ) FIND_ANYWHERE ); if( p_input ) { - p_playlist = pl_Yield( p_input ); + p_playlist = pl_Hold( p_input ); } } /* New input has been registered */ @@ -991,7 +991,7 @@ static int StateChanged( vlc_object_t *p_this, char const *psz_cmd, 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 ) { @@ -1303,7 +1303,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, 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 ) @@ -1525,7 +1525,7 @@ static int Quit( vlc_object_t *p_this, char const *psz_cmd, 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 ); @@ -1912,7 +1912,7 @@ static int Menu( vlc_object_t *p_this, char const *psz_cmd, return VLC_EGENERIC; } - p_playlist = pl_Yield( p_this ); + p_playlist = pl_Hold( p_this ); if( p_playlist->p_input ) { diff --git a/modules/gui/beos/InterfaceWindow.cpp b/modules/gui/beos/InterfaceWindow.cpp index 108af799bc..5fe92d4f64 100644 --- a/modules/gui/beos/InterfaceWindow.cpp +++ b/modules/gui/beos/InterfaceWindow.cpp @@ -203,7 +203,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame, 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 ); diff --git a/modules/gui/beos/ListViews.cpp b/modules/gui/beos/ListViews.cpp index 2822915f80..c3ccc84cf7 100644 --- a/modules/gui/beos/ListViews.cpp +++ b/modules/gui/beos/ListViews.cpp @@ -690,7 +690,7 @@ PlaylistView::MouseDown( BPoint where ) // 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 ); @@ -989,7 +989,7 @@ PlaylistView::SetPlaying( bool playing ) void PlaylistView::RebuildList() { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); // remove all items BListItem * item; @@ -1077,7 +1077,7 @@ PlaylistView::SetDisplayMode( uint32 mode ) BListItem* PlaylistView::_PlayingItem() const { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); if( !p_playlist ) { @@ -1099,7 +1099,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem ) { if ( item == playingItem ) { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); if( !p_playlist ) { diff --git a/modules/gui/beos/PlayListWindow.cpp b/modules/gui/beos/PlayListWindow.cpp index dcfc779957..9e7a0de869 100644 --- a/modules/gui/beos/PlayListWindow.cpp +++ b/modules/gui/beos/PlayListWindow.cpp @@ -291,7 +291,7 @@ PlayListWindow::UpdatePlaylist( bool rebuild ) 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 ); diff --git a/modules/gui/macosx/applescript.m b/modules/gui/macosx/applescript.m index b7032344e9..0099954b0a 100644 --- a/modules/gui/macosx/applescript.m +++ b/modules/gui/macosx/applescript.m @@ -41,7 +41,7 @@ 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; @@ -90,7 +90,7 @@ 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; diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index 83c406fb46..18f25ff6d5 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -143,7 +143,7 @@ - (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; @@ -220,7 +220,7 @@ { 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; @@ -260,7 +260,7 @@ - (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 ); @@ -270,7 +270,7 @@ { 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 ); @@ -338,7 +338,7 @@ { 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) @@ -367,7 +367,7 @@ { 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) @@ -506,7 +506,7 @@ } 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]] ) @@ -927,7 +927,7 @@ 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")] || diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m index 1ecea7f39e..410ec6ce74 100644 --- a/modules/gui/macosx/embeddedwindow.m +++ b/modules/gui/macosx/embeddedwindow.m @@ -157,7 +157,7 @@ - (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 ); diff --git a/modules/gui/macosx/equalizer.m b/modules/gui/macosx/equalizer.m index 73f9e060dc..b198f7d637 100644 --- a/modules/gui/macosx/equalizer.m +++ b/modules/gui/macosx/equalizer.m @@ -54,7 +54,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf, 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" ); @@ -125,7 +125,7 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, 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" ); @@ -181,7 +181,7 @@ static bool GetFiltersStatus( intf_thread_t *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_Create( p_object, "equalizer-preamp", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT ); @@ -241,7 +241,7 @@ static bool GetFiltersStatus( intf_thread_t *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 ); @@ -281,7 +281,7 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, 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 ); @@ -324,7 +324,7 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, 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 ); @@ -362,7 +362,7 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, 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 ) ) @@ -397,7 +397,7 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, 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]; diff --git a/modules/gui/macosx/extended.m b/modules/gui/macosx/extended.m index f2ea9b77cd..d4f3587fd5 100644 --- a/modules/gui/macosx/extended.m +++ b/modules/gui/macosx/extended.m @@ -408,7 +408,7 @@ static VLCExtended *_o_sharedInstance = nil; 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; @@ -753,7 +753,7 @@ static VLCExtended *_o_sharedInstance = nil; { /* 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", diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index d9b82f1667..2b1b9c4b30 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -395,7 +395,7 @@ static VLCMain *_o_sharedMainInstance = nil; 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; @@ -745,7 +745,7 @@ static VLCMain *_o_sharedMainInstance = nil; /* 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 ); @@ -1394,7 +1394,7 @@ static void * manage_cleanup( void * args ) 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 ); @@ -1487,7 +1487,7 @@ static void * manage_cleanup( void * args ) 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; @@ -1675,7 +1675,7 @@ end: - (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 ) { @@ -1788,7 +1788,7 @@ end: - (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; @@ -1870,7 +1870,7 @@ end: default: return; } - p_playlist = pl_Yield( p_intf ); + p_playlist = pl_Hold( p_intf ); p_input = playlist_CurrentInput( p_playlist ); if( p_input != NULL ) { diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 9713b41226..9ee7912296 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -111,7 +111,7 @@ } - (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]; @@ -148,7 +148,7 @@ { 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 ) @@ -169,7 +169,7 @@ { 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 ) @@ -203,7 +203,7 @@ - (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 ) { @@ -363,7 +363,7 @@ - (void)awakeFromNib { - playlist_t * p_playlist = pl_Yield( VLCIntf ); + playlist_t * p_playlist = pl_Hold( VLCIntf ); int i; @@ -478,7 +478,7 @@ [[[[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 ) { @@ -500,7 +500,7 @@ - (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" ); @@ -561,7 +561,7 @@ 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]; @@ -606,7 +606,7 @@ 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 ) @@ -696,7 +696,7 @@ - (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")]; @@ -759,7 +759,7 @@ - (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; @@ -817,7 +817,7 @@ 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]; @@ -854,7 +854,7 @@ { 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 @@ -885,7 +885,7 @@ 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++ ) @@ -934,7 +934,7 @@ - (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 ) @@ -967,7 +967,7 @@ - (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; @@ -1054,7 +1054,7 @@ - (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++ ) @@ -1108,7 +1108,7 @@ - (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++ ) { @@ -1146,7 +1146,7 @@ - (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; @@ -1213,7 +1213,7 @@ - (IBAction)searchItem:(id)sender { - playlist_t * p_playlist = pl_Yield( VLCIntf ); + playlist_t * p_playlist = pl_Hold( VLCIntf ); id o_result; unsigned int i; @@ -1308,7 +1308,7 @@ 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*/ @@ -1373,7 +1373,7 @@ forTableColumn:(NSTableColumn *)tableColumn item:(id)item { - playlist_t *p_playlist = pl_Yield( VLCIntf ); + playlist_t *p_playlist = pl_Hold( VLCIntf ); id o_playing_item; @@ -1408,7 +1408,7 @@ 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; @@ -1442,7 +1442,7 @@ - (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 ) { @@ -1473,7 +1473,7 @@ - (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 */ @@ -1522,7 +1522,7 @@ - (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id )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; @@ -1586,7 +1586,7 @@ - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id )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 */ diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m index 0861b7fffe..85b1b69503 100644 --- a/modules/gui/macosx/playlistinfo.m +++ b/modules/gui/macosx/playlistinfo.m @@ -248,7 +248,7 @@ static VLCInfo *_o_sharedInstance = nil; { 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 ); } @@ -363,7 +363,7 @@ static VLCInfo *_o_sharedInstance = nil; - (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; diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index 5858ca668b..5880fcfa3f 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -769,7 +769,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (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 ); } @@ -777,7 +777,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (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 ); } diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m index a57cceab28..b41ac79702 100644 --- a/modules/gui/macosx/wizard.m +++ b/modules/gui/macosx/wizard.m @@ -1255,7 +1255,7 @@ static VLCWizard *_o_sharedInstance = nil; { 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]; diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index 9c2b09bc2c..38c3ec804f 100644 --- a/modules/gui/ncurses.c +++ b/modules/gui/ncurses.c @@ -385,7 +385,7 @@ static void Close( vlc_object_t *p_this ) 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; @@ -587,7 +587,7 @@ static int HandleKey( intf_thread_t *p_intf, 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 ) { @@ -1514,7 +1514,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh ) { 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; @@ -2255,7 +2255,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh ) 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 ) @@ -2273,7 +2273,7 @@ static playlist_item_t *PlaylistGetRoot( intf_thread_t *p_intf ) 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; @@ -2348,7 +2348,7 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, 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 ); @@ -2359,7 +2359,7 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, 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 && @@ -2416,7 +2416,7 @@ static void Eject( intf_thread_t *p_intf ) * 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 ) @@ -2627,7 +2627,7 @@ static void ReadDir( intf_thread_t *p_intf ) 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 ) diff --git a/modules/gui/pda/pda.c b/modules/gui/pda/pda.c index 5776b67fe5..8a00c5d767 100644 --- a/modules/gui/pda/pda.c +++ b/modules/gui/pda/pda.c @@ -289,7 +289,7 @@ static void Run( intf_thread_t *p_intf ) 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 */ @@ -428,7 +428,7 @@ static int Manage( intf_thread_t *p_intf ) 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, diff --git a/modules/gui/pda/pda_callbacks.c b/modules/gui/pda/pda_callbacks.c index 67f92c5c1b..2f8ffd1719 100644 --- a/modules/gui/pda/pda_callbacks.c +++ b/modules/gui/pda/pda_callbacks.c @@ -94,7 +94,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, 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. */ @@ -378,7 +378,7 @@ void onPause(GtkButton *button, gpointer user_data) 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) { @@ -400,7 +400,7 @@ void onPlay(GtkButton *button, gpointer user_data) 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 ); @@ -771,7 +771,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path, { 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 ) { @@ -809,7 +809,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path, 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 ) @@ -845,7 +845,7 @@ static void deleteItemFromPlaylist(gpointer data, gpointer user_data) 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 */ @@ -914,7 +914,7 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data) 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; @@ -1039,7 +1039,7 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data) } /* 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. */ diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp index a6c7f88b1f..00d869a2dc 100644 --- a/modules/gui/qt4/components/info_panels.cpp +++ b/modules/gui/qt4/components/info_panels.cpp @@ -268,7 +268,7 @@ void MetaPanel::saveMeta() 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; diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index ec1391d251..c1de421f34 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -1482,7 +1482,7 @@ CoverArtLabel::CoverArtLabel( QWidget *parent, 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 ); @@ -1500,7 +1500,7 @@ void CoverArtLabel::downloadCover() { 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 ); } diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index 58e6766a4d..cba6abfed9 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -663,7 +663,7 @@ void MainInputManager::customEvent( QEvent *event ) 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 ) { diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index e1e5ca52dc..2109367e32 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -249,7 +249,7 @@ static int Open( vlc_object_t *p_this ) 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 */ diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp index 3e1a007f42..6c4572767c 100644 --- a/modules/gui/skins2/src/skin_main.cpp +++ b/modules/gui/skins2/src/skin_main.cpp @@ -99,7 +99,7 @@ static int Open( vlc_object_t *p_this ) 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; @@ -319,7 +319,7 @@ static int DemuxOpen( vlc_object_t *p_this ) // 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; diff --git a/modules/gui/wince/dialogs.cpp b/modules/gui/wince/dialogs.cpp index f185ec551d..5f9825d693 100644 --- a/modules/gui/wince/dialogs.cpp +++ b/modules/gui/wince/dialogs.cpp @@ -333,7 +333,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg ) 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) ); @@ -407,7 +407,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg ) 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) ); diff --git a/modules/gui/wince/interface.cpp b/modules/gui/wince/interface.cpp index 8337923c48..be5cc402ee 100644 --- a/modules/gui/wince/interface.cpp +++ b/modules/gui/wince/interface.cpp @@ -640,7 +640,7 @@ void Interface::OnShowDialog( int i_dialog_event ) 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) ) @@ -813,7 +813,7 @@ void Interface::VolumeUpdate() 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 ); @@ -823,7 +823,7 @@ void Interface::OnStopStream( void ) 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 ); @@ -832,7 +832,7 @@ void Interface::OnPrevStream( void ) 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 ); diff --git a/modules/gui/wince/iteminfo.cpp b/modules/gui/wince/iteminfo.cpp index 519c1311fc..946ed9ee7c 100644 --- a/modules/gui/wince/iteminfo.cpp +++ b/modules/gui/wince/iteminfo.cpp @@ -272,7 +272,7 @@ void ItemInfoDialog::OnOk() 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 ); diff --git a/modules/gui/wince/menus.cpp b/modules/gui/wince/menus.cpp index a32aaa7829..644d8c0b28 100644 --- a/modules/gui/wince/menus.cpp +++ b/modules/gui/wince/menus.cpp @@ -222,7 +222,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) } 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("") ); diff --git a/modules/gui/wince/open.cpp b/modules/gui/wince/open.cpp index 24d2bad2b4..e99e2dbaa7 100644 --- a/modules/gui/wince/open.cpp +++ b/modules/gui/wince/open.cpp @@ -610,7 +610,7 @@ void OpenDialog::OnOk() 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++ ) diff --git a/modules/gui/wince/playlist.cpp b/modules/gui/wince/playlist.cpp index 6de3a7d94c..538485e43e 100644 --- a/modules/gui/wince/playlist.cpp +++ b/modules/gui/wince/playlist.cpp @@ -289,7 +289,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) // 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 ); @@ -517,7 +517,7 @@ LRESULT Playlist::ProcessCustomDraw( LPARAM lParam ) 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 ) { @@ -589,7 +589,7 @@ void Playlist::UpdatePlaylist() 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 */ @@ -613,7 +613,7 @@ void Playlist::UpdatePlaylist() **********************************************************************/ 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 = @@ -659,7 +659,7 @@ void Playlist::Rebuild() **********************************************************************/ 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; @@ -693,7 +693,7 @@ void Playlist::UpdateItem( int i ) **********************************************************************/ 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 ); @@ -711,7 +711,7 @@ static void OnOpenCB( intf_dialog_args_t *p_arg ) 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 ) { @@ -743,7 +743,7 @@ static void OnSaveCB( intf_dialog_args_t *p_arg ) 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 ) { @@ -808,7 +808,7 @@ void Playlist::OnInvertSelection() 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; @@ -827,7 +827,7 @@ void Playlist::OnEnableSelection() 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; @@ -856,7 +856,7 @@ void Playlist::OnSelectAll() 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 ); @@ -866,7 +866,7 @@ void Playlist::OnActivateItem( int i_item ) 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; @@ -890,7 +890,7 @@ void Playlist::ShowInfos( HWND hwnd, int i_item ) ********************************************************************/ 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 */ @@ -918,7 +918,7 @@ void Playlist::OnUp() 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 */ @@ -945,7 +945,7 @@ void Playlist::OnRandom() 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 ); @@ -958,7 +958,7 @@ void Playlist::OnLoop () 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 ); @@ -971,7 +971,7 @@ void Playlist::OnRepeat () 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 ); @@ -983,7 +983,7 @@ void Playlist::OnRepeat () ********************************************************************/ 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 ) @@ -1019,7 +1019,7 @@ void Playlist::OnSort( UINT 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 ) @@ -1071,7 +1071,7 @@ void Playlist::OnPopupPlay() 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 ) @@ -1095,7 +1095,7 @@ void Playlist::OnPopupEna() 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 = diff --git a/modules/gui/wince/timer.cpp b/modules/gui/wince/timer.cpp index cdf2acf10b..2955f42def 100644 --- a/modules/gui/wince/timer.cpp +++ b/modules/gui/wince/timer.cpp @@ -54,7 +54,7 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface) 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 ); @@ -67,7 +67,7 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface) 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 ); diff --git a/modules/gui/wxwidgets/dialogs.cpp b/modules/gui/wxwidgets/dialogs.cpp index 898302a1d5..a70ec6f3d9 100644 --- a/modules/gui/wxwidgets/dialogs.cpp +++ b/modules/gui/wxwidgets/dialogs.cpp @@ -435,7 +435,7 @@ void DialogsProvider::OnOpenFileGeneric( wxCommandEvent& event ) 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; @@ -476,7 +476,7 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event ) 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; diff --git a/modules/gui/wxwidgets/dialogs/bookmarks.cpp b/modules/gui/wxwidgets/dialogs/bookmarks.cpp index 864a86b590..fb980c1283 100644 --- a/modules/gui/wxwidgets/dialogs/bookmarks.cpp +++ b/modules/gui/wxwidgets/dialogs/bookmarks.cpp @@ -204,7 +204,7 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent ) 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 */ @@ -216,7 +216,7 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent ) 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", diff --git a/modules/gui/wxwidgets/dialogs/fileinfo.cpp b/modules/gui/wxwidgets/dialogs/fileinfo.cpp index 719036757b..32b59d15c0 100644 --- a/modules/gui/wxwidgets/dialogs/fileinfo.cpp +++ b/modules/gui/wxwidgets/dialogs/fileinfo.cpp @@ -55,7 +55,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ): 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 */ @@ -114,7 +114,7 @@ void FileInfo::Update() 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 ; diff --git a/modules/gui/wxwidgets/dialogs/open.cpp b/modules/gui/wxwidgets/dialogs/open.cpp index 4815671f16..7ef01972cf 100644 --- a/modules/gui/wxwidgets/dialogs/open.cpp +++ b/modules/gui/wxwidgets/dialogs/open.cpp @@ -1158,7 +1158,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) ) } /* 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++ ) diff --git a/modules/gui/wxwidgets/dialogs/playlist.cpp b/modules/gui/wxwidgets/dialogs/playlist.cpp index 9f0a12ebe6..e72387dda8 100644 --- a/modules/gui/wxwidgets/dialogs/playlist.cpp +++ b/modules/gui/wxwidgets/dialogs/playlist.cpp @@ -217,7 +217,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): 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 ); diff --git a/modules/gui/wxwidgets/dialogs/wizard.cpp b/modules/gui/wxwidgets/dialogs/wizard.cpp index ce38db132d..9a677355d0 100644 --- a/modules/gui/wxwidgets/dialogs/wizard.cpp +++ b/modules/gui/wxwidgets/dialogs/wizard.cpp @@ -577,7 +577,7 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t 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 ) ) @@ -715,7 +715,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event) 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 ); @@ -1606,7 +1606,7 @@ void WizardDialog::Run() 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, diff --git a/modules/gui/wxwidgets/input_manager.cpp b/modules/gui/wxwidgets/input_manager.cpp index 6b0b46e49d..451d9e5317 100644 --- a/modules/gui/wxwidgets/input_manager.cpp +++ b/modules/gui/wxwidgets/input_manager.cpp @@ -194,7 +194,7 @@ bool InputManager::IsPlaying() *****************************************************************************/ 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 ); diff --git a/modules/gui/wxwidgets/interface.cpp b/modules/gui/wxwidgets/interface.cpp index c78f6c5ff2..11514d37c3 100644 --- a/modules/gui/wxwidgets/interface.cpp +++ b/modules/gui/wxwidgets/interface.cpp @@ -1075,7 +1075,7 @@ void Interface::OnPlayStream( wxCommandEvent& WXUNUSED(event) ) 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) ) @@ -1126,7 +1126,7 @@ void Interface::OnStopStream( wxCommandEvent& WXUNUSED(event) ) } void Interface::StopStream() { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); if( p_playlist == NULL ) { return; @@ -1144,7 +1144,7 @@ void Interface::OnPrevStream( wxCommandEvent& WXUNUSED(event) ) void Interface::PrevStream() { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); if( p_playlist == NULL ) { return; @@ -1161,7 +1161,7 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) ) void Interface::NextStream() { - playlist_t * p_playlist = pl_Yield( p_intf ); + playlist_t * p_playlist = pl_Hold( p_intf ); if( p_playlist == NULL ) { return; @@ -1315,7 +1315,7 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord, 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; diff --git a/modules/gui/wxwidgets/menus.cpp b/modules/gui/wxwidgets/menus.cpp index 4926f78345..5b3a0ce099 100644 --- a/modules/gui/wxwidgets/menus.cpp +++ b/modules/gui/wxwidgets/menus.cpp @@ -229,7 +229,7 @@ int IntfAutoMenuBuilder( intf_thread_t *p_intf, ArrayOfInts &ri_objects, 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 @@ -936,7 +936,7 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event ) 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() ) diff --git a/modules/gui/wxwidgets/playlist_manager.cpp b/modules/gui/wxwidgets/playlist_manager.cpp index ce2628b13c..db49ac13b1 100644 --- a/modules/gui/wxwidgets/playlist_manager.cpp +++ b/modules/gui/wxwidgets/playlist_manager.cpp @@ -111,7 +111,7 @@ PlaylistManager::PlaylistManager( intf_thread_t *_p_intf, wxWindow *p_parent ): 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 ); diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c index 3f411744b8..839f8fa4b5 100644 --- a/modules/misc/audioscrobbler.c +++ b/modules/misc/audioscrobbler.c @@ -184,7 +184,7 @@ static int Open( vlc_object_t *p_this ) 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; @@ -205,7 +205,7 @@ static void Close( vlc_object_t *p_this ) 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; @@ -505,7 +505,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, 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; @@ -920,7 +920,7 @@ static int ReadMetaData( intf_thread_t *p_this ) 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 ) diff --git a/modules/misc/lua/demux.c b/modules/misc/lua/demux.c index b106cf5c24..d9f5ae79bc 100644 --- a/modules/misc/lua/demux.c +++ b/modules/misc/lua/demux.c @@ -246,7 +246,7 @@ static int Demux( demux_t *p_demux ) 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 ); diff --git a/modules/misc/lua/libs/playlist.c b/modules/misc/lua/libs/playlist.c index 68498fc5c1..c4ac01aa20 100644 --- a/modules/misc/lua/libs/playlist.c +++ b/modules/misc/lua/libs/playlist.c @@ -51,7 +51,7 @@ 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 ) diff --git a/modules/misc/notify/growl.m b/modules/misc/notify/growl.m index 6226404d49..53c6a4e825 100644 --- a/modules/misc/notify/growl.m +++ b/modules/misc/notify/growl.m @@ -119,7 +119,7 @@ static int Open( vlc_object_t *p_this ) 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 ); @@ -140,7 +140,7 @@ static void Close( vlc_object_t *p_this ) [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 ); } @@ -159,7 +159,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, 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 ); diff --git a/modules/misc/notify/growl_udp.c b/modules/misc/notify/growl_udp.c index 649e32bc3e..565b5bb30c 100644 --- a/modules/misc/notify/growl_udp.c +++ b/modules/misc/notify/growl_udp.c @@ -90,7 +90,7 @@ static int Open( 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_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); pl_Release( p_intf ); @@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this ) *****************************************************************************/ 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 ); } @@ -121,7 +121,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, 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 ); diff --git a/modules/misc/notify/msn.c b/modules/misc/notify/msn.c index c9524430a2..6747e0a960 100644 --- a/modules/misc/notify/msn.c +++ b/modules/misc/notify/msn.c @@ -99,7 +99,7 @@ static int Open( vlc_object_t *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 ); @@ -113,7 +113,7 @@ static int Open( vlc_object_t *p_this ) 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 */ @@ -142,7 +142,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, 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 ); diff --git a/modules/misc/notify/notify.c b/modules/misc/notify/notify.c index d038d6b2e0..5fc7bd68e7 100644 --- a/modules/misc/notify/notify.c +++ b/modules/misc/notify/notify.c @@ -104,7 +104,7 @@ static int Open( vlc_object_t *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 ); @@ -119,7 +119,7 @@ static void Close( vlc_object_t *p_this ) 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 ); @@ -257,7 +257,7 @@ static void Next( NotifyNotification *notification, gchar *psz, gpointer p ) { /* 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) ); } @@ -266,7 +266,7 @@ static void Prev( NotifyNotification *notification, gchar *psz, gpointer 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) ); } diff --git a/modules/misc/notify/telepathy.c b/modules/misc/notify/telepathy.c index 71dc63cfac..91950fae38 100644 --- a/modules/misc/notify/telepathy.c +++ b/modules/misc/notify/telepathy.c @@ -122,7 +122,7 @@ static int Open( vlc_object_t *p_this ) 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 ); @@ -136,7 +136,7 @@ static int Open( vlc_object_t *p_this ) 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 ); diff --git a/modules/misc/notify/xosd.c b/modules/misc/notify/xosd.c index c135a03d35..eb78a162ce 100644 --- a/modules/misc/notify/xosd.c +++ b/modules/misc/notify/xosd.c @@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this ) #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 ); @@ -194,7 +194,7 @@ static int Open( vlc_object_t *p_this ) 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 ); @@ -225,7 +225,7 @@ static void Run( intf_thread_t *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 ) ) { diff --git a/modules/services_discovery/upnp_intel.cpp b/modules/services_discovery/upnp_intel.cpp index 4220aff053..9778121da2 100644 --- a/modules/services_discovery/upnp_intel.cpp +++ b/modules/services_discovery/upnp_intel.cpp @@ -298,7 +298,7 @@ static int Open( vlc_object_t *p_this ) 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; diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp index e78bb4cdf0..08fe4ef4fe 100644 --- a/modules/video_filter/atmo/atmo.cpp +++ b/modules/video_filter/atmo/atmo.cpp @@ -1929,7 +1929,7 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd, *****************************************************************************/ 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) { @@ -1947,7 +1947,7 @@ static void AddStateVariableCallback(filter_t *p_filter) *****************************************************************************/ 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) { diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c index c0287b3707..75cd02d97b 100644 --- a/modules/video_output/caca.c +++ b/modules/video_output/caca.c @@ -371,7 +371,7 @@ static int Manage( vout_thread_t *p_vout ) break; case CACA_EVENT_QUIT: { - p_playlist = pl_Yield( p_vout ); + p_playlist = pl_Hold( p_vout ); if( p_playlist ) { playlist_Stop( p_playlist ); diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c index a6ee80b852..81dd1fd4c7 100644 --- a/modules/video_output/msw/directx.c +++ b/modules/video_output/msw/directx.c @@ -2123,7 +2123,7 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd, 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 ) { diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c index 5bf50319e1..c787914a38 100644 --- a/modules/video_output/msw/events.c +++ b/modules/video_output/msw/events.c @@ -874,7 +874,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, /* 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 ); diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index 96513e5b7e..cd21e8b28e 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -514,7 +514,7 @@ static int Manage( vout_thread_t *p_vout ) 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 ); diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 3ba2e007c4..28f2ddcad4 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -1463,7 +1463,7 @@ static int ManageVideo( vout_thread_t *p_vout ) == 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 ); diff --git a/src/libvlc.c b/src/libvlc.c index 5445183b3e..4fce0d9c35 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1013,7 +1013,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, 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 ); @@ -1056,10 +1056,10 @@ int libvlc_InternalCleanup( libvlc_int_t *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 ); @@ -1309,7 +1309,7 @@ static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, const char *ppsz_argv[ /* 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 ); diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 5d02d1d4bb..dc6cc29726 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -303,7 +303,7 @@ playlist_ServicesDiscoveryAdd playlist_ServicesDiscoveryRemove playlist_TreeMove __pl_Release -__pl_Yield +__pl_Hold resolve_xml_special_chars sdp_AddAttribute sdp_AddMedia diff --git a/src/misc/objects.c b/src/misc/objects.c index 3917787025..1aae3109a3 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -535,7 +535,7 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) #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); diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index e893a0bd02..1f027cc517 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -317,7 +317,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, 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 ) diff --git a/src/playlist/control.c b/src/playlist/control.c index 6842b7ec60..e2bcb4a9cf 100644 --- a/src/playlist/control.c +++ b/src/playlist/control.c @@ -41,7 +41,7 @@ static void PreparseEnqueueItemSub( playlist_t *, playlist_item_t * ); * Playlist control *****************************************************************************/ -playlist_t *__pl_Yield( vlc_object_t *p_this ) +playlist_t *__pl_Hold( vlc_object_t *p_this ) { playlist_t *pl; @@ -49,7 +49,7 @@ playlist_t *__pl_Yield( vlc_object_t *p_this ) 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); @@ -62,7 +62,7 @@ void __pl_Release( vlc_object_t *p_this ) 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 ); } diff --git a/src/text/strings.c b/src/text/strings.c index 2191f73ee5..312c6b9cad 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -663,7 +663,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string ) 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 );