fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
}
if( p_playlist )
{
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
#if 0
if( fPlaylistWindow )
// only do something if user clicked the same item twice
if ( fLastClickedItem == item )
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
playlist_Goto( p_playlist, i );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
handled = true;
}
BListItem*
PlaylistView::_PlayingItem() const
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( !p_playlist )
{
}
BListItem * item = ItemAt( p_playlist->i_index );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return item;
}
{
if ( item == playingItem )
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( !p_playlist )
{
playlist_Goto( p_playlist, i );
SetCurrent( i );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
break;
}
}
if( rebuild )
fListView->RebuildList();
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
fListView->SetCurrent( p_playlist->i_index );
fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
_CheckItemsEnableState();
}
gtk_tree_view_column_set_sort_column_id(p_column, 2);
#endif
/* update the playlist */
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
p_playlist_store = gtk_list_store_new (3,
G_TYPE_STRING, /* Filename */
G_TYPE_STRING, /* Time */
PlaylistRebuildListStore(p_intf,p_playlist_store, p_playlist);
gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist), GTK_TREE_MODEL(p_playlist_store));
g_object_unref(p_playlist_store);
- vlc_object_release(p_playlist); /* Free the playlist */
+ pl_Release(p_playlist); /* Free the playlist */
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist)),GTK_SELECTION_MULTIPLE);
/* Column properties */
p_intf->p_sys->b_playing = 1;
/* update playlist interface */
- p_playlist = (playlist_t *) vlc_object_find(
- p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
if (p_playlist != NULL)
{
p_liststore = gtk_list_store_new (3,
PlaylistRebuildListStore(p_intf, p_liststore, p_playlist);
gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
g_object_unref(p_liststore);
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/* Manage the slider */
int i_id , i_pos=0;
GtkTreeView *p_tvplaylist = NULL;
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL)
{ /* Bail out when VLC's playlist object is not found. */
free(ppsz_options);
}
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void PlaylistRebuildListStore( intf_thread_t *p_intf,
void onPlay(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if (p_playlist)
{
{
vlc_object_unlock( p_playlist );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
}
void onStop(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if (p_playlist)
{
playlist_Stop( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
gdk_window_raise( p_intf->p_sys->p_window->window );
}
}
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) );
GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview);
- playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL )
{
i_skip = i_row - p_playlist->i_current_index;
playlist_Skip( p_playlist, i_skip );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void onUpdatePlaylist(GtkButton *button, gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
GtkTreeView *p_tvplaylist = NULL;
if( p_playlist == NULL )
g_object_unref(p_model);
}
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
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 = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
GtkTreeView *p_tvplaylist;
/* Delete an arbitrary item from the playlist */
g_object_unref(p_store);
}
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void onClearPlaylist(GtkButton *button, gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
GtkTreeView *p_tvplaylist;
int item;
{
msg_Err( p_playlist, "fix pda delete" );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
// Remove all entries from the Playlist widget.
p_tvplaylist = (GtkTreeView*) lookup_widget( GTK_WIDGET(button), "tvPlaylist");
}
/* Update the playlist */
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
/* Get all the options. */
TCHAR szFile[MAX_PATH] = _T("\0");
static TCHAR szFilter[] = _T("All (*.*)\0*.*\0");
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
memset( &ofn, 0, sizeof(OPENFILENAME) );
PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void DialogsProvider::OnOpenDirectory( int i_arg )
if( !SUCCEEDED( SHGetMalloc(&p_malloc) ) ) goto error;
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
if( !p_playlist ) goto error;
memset( &bi, 0, sizeof(BROWSEINFO) );
error:
if( p_malloc) p_malloc->Release();
- if( p_playlist ) vlc_object_release( p_playlist );
+ if( p_playlist ) pl_Release( p_playlist );
#ifdef UNDER_CE
FreeLibrary( ceshell_dll );
void Interface::OnPlayStream( void )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
if( p_playlist->i_size )
/* No stream was playing, start one */
playlist_Play( p_playlist );
TogglePlayButton( PLAYING_S );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return;
}
TogglePlayButton( state.i_int );
vlc_object_release( p_input );
- vlc_object_release( p_playlist );
}
else
{
/* If the playlist is empty, open a file requester instead */
- vlc_object_release( p_playlist );
OnShowDialog( ID_FILE_QUICKOPEN );
}
+ pl_Release( p_playlist );
}
void Interface::TogglePlayButton( int i_playing_status )
void Interface::OnStopStream( void )
{
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_Stop( p_playlist );
TogglePlayButton( PAUSE_S );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Interface::OnPrevStream( void )
{
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_Prev( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Interface::OnNextStream( void )
{
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_Next( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Interface::OnSlowStream( void )
vlc_mutex_lock( &p_item->input.lock );
bool b_old_enabled = p_item->b_enabled;
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist != NULL )
{
b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
p_item->b_enabled = (b_state & BST_CHECKED) ? true : false ;
}
else
{
- playlist_t * p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist && p_playlist->i_size )
{
AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") );
AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") );
}
- if( p_playlist ) vlc_object_release( p_playlist );
+ if( p_playlist ) pl_Release( p_playlist );
}
AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)MiscMenu( p_intf ),
ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );
/* Update the playlist */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
for( int i = 0; i < i_args; i++ )
free( pp_args[i_args] );
if( !i_args ) free( pp_args );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/*****************************************************************************
// random, loop, repeat buttons states
vlc_value_t val;
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
if( !p_playlist ) break;
var_Get( p_playlist , "random", &val );
bState = val.b_bool ? TBSTATE_CHECKED : 0;
SendMessage( hwndTB, TB_SETSTATE, Repeat_Event,
MAKELONG(bState | TBSTATE_ENABLED, 0) );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
GetClientRect( hwnd, &rect );
hListView = CreateWindow( WC_LISTVIEW, NULL, WS_VISIBLE | WS_CHILD |
return CDRF_NOTIFYITEMDRAW;
case CDDS_ITEMPREPAINT: //Before an item is drawn
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return CDRF_DODEFAULT;
if( (int)lplvcd->nmcd.dwItemSpec == p_playlist->i_index )
{
lplvcd->clrText = RGB(255,0,0);
- vlc_object_release(p_playlist);
+ pl_Release( p_playlist );
return CDRF_NEWFONT;
}
(int)lplvcd->nmcd.dwItemSpec );
if( !p_item )
{
- vlc_object_release(p_playlist);
+ pl_Release( p_playlist );
return CDRF_DODEFAULT;
}
if( p_item->b_enabled == false )
{
lplvcd->clrText = RGB(192,192,192);
- vlc_object_release(p_playlist);
+ pl_Release( p_playlist );
return CDRF_NEWFONT;
}
+ pl_Release( p_playlist );
}
return CDRF_DODEFAULT;
b_need_update = false;
}
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
/* Update the colour of items */
}
vlc_object_unlock( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/**********************************************************************
**********************************************************************/
void Playlist::Rebuild()
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
int i_focused =
ListView_SetItemState( hListView, i_focused, LVIS_FOCUSED,
LVIS_STATEIMAGEMASK );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/**********************************************************************
**********************************************************************/
void Playlist::UpdateItem( int i )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
if( !p_item )
{
- vlc_object_release(p_playlist);
+ pl_Release(p_playlist);
return;
}
ListView_SetItemText( hListView, i, 3, _FROMMB(psz_duration) );
- vlc_object_release(p_playlist);
+ pl_Release(p_playlist);
}
/**********************************************************************
**********************************************************************/
void Playlist::DeleteItem( int item )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_Delete( p_playlist, item );
ListView_DeleteItem( hListView, item );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/**********************************************************************
if( p_arg->i_results && p_arg->psz_results[0] )
{
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
playlist_Import( p_playlist, p_arg->psz_results[0] );
+ pl_Release( p_playlist );
}
-
- if( p_playlist ) vlc_object_release( p_playlist );
}
}
if( p_arg->i_results && p_arg->psz_results[0] )
{
- playlist_t * p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
else psz_export = "export-m3u";
playlist_Export( p_playlist, p_arg->psz_results[0], psz_export );
+ pl_Release( p_playlist );
}
-
- if( p_playlist ) vlc_object_release( p_playlist );
}
}
void Playlist::OnEnableSelection()
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
for( long item = ListView_GetItemCount( hListView ) - 1;
UpdateItem( item );
}
}
- vlc_object_release( p_playlist);
+ pl_Release( p_playlist);
}
void Playlist::OnDisableSelection()
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
for( long item = ListView_GetItemCount( hListView ) - 1;
UpdateItem( item );
}
}
- vlc_object_release( p_playlist);
+ pl_Release( p_playlist);
}
void Playlist::OnSelectAll()
void Playlist::OnActivateItem( int i_item )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_Goto( p_playlist, i_item );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Playlist::ShowInfos( HWND hwnd, int i_item )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
vlc_object_lock( p_playlist);
delete iteminfo_dialog;
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/********************************************************************
********************************************************************/
void Playlist::OnUp()
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
/* We use the first selected item, so find it */
LVIS_STATEIMAGEMASK );
}
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return;
}
void Playlist::OnDown()
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
/* We use the first selected item, so find it */
ListView_SetItemState( hListView, i_item + 1, LVIS_FOCUSED,
LVIS_STATEIMAGEMASK );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return;
}
int bState = SendMessage( hwndTB, TB_GETSTATE, Random_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "random", val );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Playlist::OnLoop ()
int bState = SendMessage( hwndTB, TB_GETSTATE, Loop_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "loop", val );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Playlist::OnRepeat ()
int bState = SendMessage( hwndTB, TB_GETSTATE, Repeat_Event, 0 );
val.b_bool = (bState & TBSTATE_CHECKED) ? true : false;
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
var_Set( p_playlist , "repeat", val );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
/********************************************************************
********************************************************************/
void Playlist::OnSort( UINT event )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
switch( event )
break;
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
b_need_update = true;
void Playlist::OnColSelect( int iSubItem )
{
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
switch( iSubItem )
break;
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
b_need_update = true;
int i_popup_item =
ListView_GetNextItem( hListView, -1, LVIS_SELECTED | LVNI_ALL );
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
if( i_popup_item != -1 )
playlist_Goto( p_playlist, i_popup_item );
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Playlist::OnPopupDel()
int i_popup_item =
ListView_GetNextItem( hListView, -1, LVIS_SELECTED | LVNI_ALL );
- playlist_t *p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
playlist_item_t *p_item =
playlist_Enable( p_playlist, p_item );
}
- vlc_object_release( p_playlist);
+ pl_Release( p_playlist);
UpdateItem( i_popup_item );
}
i_old_rate = INPUT_RATE_DEFAULT;
/* Register callback for the intf-popupmenu variable */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist != NULL )
{
var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
SetTimer( hwnd, 1, 200 /*milliseconds*/, NULL );
Timer::~Timer()
{
/* Unregister callback */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist != NULL )
{
var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
}
break;
case CACA_EVENT_QUIT:
{
- p_playlist = vlc_object_find( p_vout,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_vout );
if( p_playlist )
{
playlist_Stop( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_vout );
}
vlc_object_kill( p_vout->p_libvlc );
break;
if( (newval.b_bool && !p_vout->p_sys->b_wallpaper) ||
(!newval.b_bool && p_vout->p_sys->b_wallpaper) )
{
- playlist_t *p_playlist;
+ playlist_t *p_playlist = pl_Yield( p_vout );
- p_playlist = vlc_object_find( p_this,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist )
{
/* Modify playlist as well because the vout might have to be
* restarted */
var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
var_Set( p_playlist, "directx-wallpaper", newval );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE;