/* following is only valid for horizontal a trackbar */
newpos = ((click.x-tRect.left-(thumb/2))*(max-min)+((tRect.right-tRect.left-thumb)/2))
- /(tRect.right-tRect.left-thumb);
+ /(tRect.right-tRect.left-thumb);
/* set new postion */
SendMessage(hWnd, TBM_SETPOS, TRUE, min+newpos);
p_input = NULL;
i_old_playing_status = STATUS_STOP;
i_old_rate = INPUT_RATE_DEFAULT;
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
i_input_hide_delay = 0;
/* Create slider */
/*****************************************************************************
* Public methods.
*****************************************************************************/
-vlc_bool_t InputManager::IsPlaying()
+bool InputManager::IsPlaying()
{
return (p_input && !p_input->b_die);
}
*****************************************************************************/
void InputManager::UpdateInput()
{
- 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 )
{
LockPlaylist( p_intf->p_sys, p_playlist );
if( p_intf->p_sys->p_input )
vlc_object_yield( p_intf->p_sys->p_input );
UnlockPlaylist( p_intf->p_sys, p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
}
void InputManager::UpdateNowPlaying()
{
- const char *psz_now_playing = input_item_GetNowPlaying( input_GetItem(p_input) );
+ char *psz_now_playing = input_item_GetNowPlaying( input_GetItem(p_input) );
if( psz_now_playing && *psz_now_playing )
{
p_main_intf->statusbar->SetStatusText(
p_main_intf->statusbar->SetStatusText(
wxU(input_GetItem(p_input)->psz_name), 2 );
}
+ free( psz_now_playing );
}
-void InputManager::UpdateButtons( vlc_bool_t b_play )
+void InputManager::UpdateButtons( bool b_play )
{
if( !b_play )
{
}
else if( p_input->b_dead )
{
- UpdateButtons( VLC_FALSE );
+ UpdateButtons( false );
vlc_object_release( p_input );
p_input = NULL;
}
vlc_value_t pos, len;
UpdateTime();
- UpdateButtons( VLC_TRUE );
+ UpdateButtons( true );
UpdateNowPlaying();
UpdateDiscButtons();
if( p_input )
{
int i_type = var_Type( p_input, "prev-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, ( i_type & VLC_VAR_TYPE ) != 0 ?
"prev-chapter" : "prev-title", val );
if( p_input )
{
int i_type = var_Type( p_input, "next-chapter" );
- vlc_value_t val; val.b_bool = VLC_TRUE;
+ vlc_value_t val; val.b_bool = true;
var_Set( p_input, ( i_type & VLC_VAR_TYPE ) != 0 ?
"next-chapter" : "next-title", val );
}
#ifdef WIN32
- b_slider_free = VLC_TRUE;
+ b_slider_free = true;
}
else
{
- b_slider_free = VLC_FALSE;
+ b_slider_free = false;
if( p_intf->p_sys->p_input ) UpdateTime();
}
#endif