I haven't tested thoses changes ...
{
return;
}
-
- input_SetRate( p_input, rate );
+ var_SetInteger( p_input, "rate", rate );
}
BList * VlcWrapper::GetChannels( int i_cat )
{
if( p_input )
{
- input_SetStatus( p_input, INPUT_STATUS_PAUSE );
+ var_SetInteger( p_input, "state", PAUSE_S );
}
}
* control.c : functions to handle stream control buttons.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: control.c,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
return FALSE;
}
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+ var_SetInteger( p_intf->p_sys->p_input, PAUSE_S );
return TRUE;
}
return FALSE;
}
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
return TRUE;
}
return FALSE;
}
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
return TRUE;
}
{
if( newvalue >= 0. && newvalue < 100. )
{
- off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+ double f_fpos = (double)newvalue / 100.0;
+ /* release the lock to be able to seek */
vlc_mutex_unlock( &p_input->stream.stream_lock );
- input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+ var_SetFloat( p_input, "position", f_fpos );
vlc_mutex_lock( &p_input->stream.stream_lock );
+
}
/* Update the old value */
{
if( newvalue >= 0. && newvalue < 100. )
{
- off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+ double f_fpos = (double)newvalue / 100.0;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_input->stream.stream_lock );
- input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+ var_SetFloat( p_input, "position", f_fpos );
vlc_mutex_lock( &p_input->stream.stream_lock );
}
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
input_ChangeArea( p_intf->p_sys->p_input, p_area );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, PLAYING_S );
p_intf->p_sys->b_title_update = VLC_TRUE;
vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
input_ChangeArea( p_intf->p_sys->p_input, p_area );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, PLAYING_S );
p_intf->p_sys->b_title_update = VLC_TRUE;
vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
input_ChangeArea( p_intf->p_sys->p_input, p_area );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, PLAYING_S );
p_intf->p_sys->b_chapter_update = VLC_TRUE;
vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
input_ChangeArea( p_intf->p_sys->p_input, p_area );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, PLAYING_S );
p_intf->p_sys->b_chapter_update = VLC_TRUE;
vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
i_seconds = GET_VALUE( "jump_second_spinbutton" );
#undef GET_VALUE
- input_Seek( p_intf->p_sys->p_input,
- i_seconds + 60 * i_minutes + 3600 * i_hours,
- INPUT_SEEK_SECONDS | INPUT_SEEK_SET );
+ var_SetTime( p_intf->p_sys->p_input, "time",
+ (int64_t)(i_seconds+60*i_minutes+3600*i_hours)*I64C(1000000));
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
* menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: menu.c,v 1.13 2003/12/22 14:32:56 sam Exp $
+ * $Id$
*
* Authors: Sam Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
GtkSetupMenus( p_intf );
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S );
}
}
\
p_intf->p_sys->b_program_update = VLC_FALSE; \
\
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); \
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S ); \
}
void GtkMenubarProgramToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
p_intf->p_sys->b_title_update = VLC_FALSE;
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S );
}
}
p_intf->p_sys->b_chapter_update = VLC_FALSE;
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S );
}
}
// XXX is this locking really useful ?
vlc_mutex_lock( &p_intf->change_lock );
- off_t i_seek = ( position * p_intf->p_sys->p_input->stream.p_selected_area->i_size ) / 10000;
- input_Seek( p_intf->p_sys->p_input, i_seek, INPUT_SEEK_SET );
-
+ var_SetFloat( p_intf->p_sys->p_input, "position",
+ (double)position / 10000.0 );
vlc_mutex_unlock( &p_intf->change_lock );
}
}
{
if( p_intf->p_sys->p_input )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S );
}
}
{
if ( p_intf->p_sys->p_input )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
}
}
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
}
}
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
}
}
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: pda.c,v 1.23 2004/03/03 20:39:52 gbazin Exp $
+ * $Id$
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
* finished dragging the slider */
else if( p_intf->p_sys->b_slider_free )
{
- off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+ double f_pos = (double)newvalue / 100.0;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_input->stream.stream_lock );
- input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+ var_SetFloat( p_input, "position", f_pos );
vlc_mutex_lock( &p_input->stream.stream_lock );
/* Update the old value */
* finished dragging the slider */
else if( p_intf->p_sys->b_slider_free )
{
- off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+ double f_pos = (double)newvalue / 100.0;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_input->stream.stream_lock );
- input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+ var_SetFloat( p_input, "position", f_pos );
vlc_mutex_lock( &p_input->stream.stream_lock );
/* Update the old value */
if (p_intf->p_sys->p_input != NULL)
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
}
}
if (p_intf->p_sys->p_input != NULL)
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
}
}
if (p_intf->p_sys->p_input != NULL)
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
}
}
* finished dragging the slider */
else if( p_slider->b_free )
{
- off_t i_seek = ( i_value * p_area->i_size ) / SLIDER_MAX;
-
- input_Seek( p_intf->p_sys->p_input, i_seek, INPUT_SEEK_SET );
+ double f_pos = (double)i_value / (double)SLIDER_MAX;
+ var_SetFloat( p_intf->p_sys->p_input, "position", f_pos );
/* Update the old value */
p_slider->setOldValue( i_value );
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S );
}
}
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+ var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
}
}
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
}
}
{
if( p_intf->p_sys->p_input != NULL )
{
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+ var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
}
}
if( p_intf->p_sys->p_input == NULL )
return;
- off_t i_seek = (off_t)(Pos *
- p_intf->p_sys->p_input->stream.p_selected_area->i_size
- / SLIDER_RANGE);
-
- input_Seek( p_intf->p_sys->p_input, i_seek, INPUT_SEEK_SET );
+ var_SetFloat( p_intf->p_input, "position", (double)Pos / SLIDER_RANGE );
// Refresh interface
InterfaceRefresh();