/*****************************************************************************
* var.c: object variables for input thread
*****************************************************************************
- * Copyright (C) 2004 the VideoLAN team
+ * Copyright (C) 2004-2007 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include <stdio.h>
#include <stdlib.h>
var_Change( p_input, "spu-delay", VLC_VAR_SETVALUE, &val, NULL );
ADD_CALLBACK( "spu-delay", EsDelayCallback );
+ p_input->p->pts_adjust.auto_adjust = var_CreateGetBool(
+ p_input, "auto-adjust-pts-delay" );
+
/* Video ES */
var_Create( p_input, "video-es", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
text.psz_string = _("Video Track");
{
/* Special "intf-change" variable, it allows intf to set up a callback
* to be notified of some changes.
+ *
+ * Add rate-change to inform about rate changin
+ *
* TODO list all changes warn by this callbacks */
var_Create( p_input, "intf-change", VLC_VAR_BOOL );
- var_SetBool( p_input, "intf-change", VLC_TRUE );
-
- /* item-change variable */
- var_Create( p_input, "item-change", VLC_VAR_INTEGER );
+ var_SetBool( p_input, "intf-change", true );
+ var_Create( p_input, "rate-change", VLC_VAR_BOOL );
+ var_SetBool( p_input, "rate-change", true );
}
#undef ADD_CALLBACK
}
var_Create( p_input, val.psz_string,
VLC_VAR_INTEGER|VLC_VAR_HASCHOICE|VLC_VAR_ISCOMMAND );
var_AddCallback( p_input, val.psz_string,
- NavigationCallback, (void *)i );
+ NavigationCallback, (void *)(intptr_t)i );
if( p_input->p->title[i]->psz_name == NULL ||
*p_input->p->title[i]->psz_name == '\0' )
var_Change( p_input, val.psz_string, VLC_VAR_ADDCHOICE,
&val2, &text2 );
- if( text2.psz_string ) free( text2.psz_string );
+ free( text2.psz_string );
}
}
}
var_Change( p_input, "chapter", VLC_VAR_ADDCHOICE, &val, &text );
- if( text.psz_string ) free( text.psz_string );
+ free( text.psz_string );
}
}
VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
var_Create( p_input, "start-time", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
var_Create( p_input, "stop-time", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
+ var_Create( p_input, "run-time", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
var_Create( p_input, "input-slave",
VLC_VAR_STRING | VLC_VAR_DOINHERIT );
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
}
- var_Create( p_input, "demuxed-id3", VLC_VAR_BOOL ); /* FIXME beurk */
- val.b_bool = VLC_FALSE;
- var_Change( p_input, "demuxed-id3", VLC_VAR_SETVALUE, &val, NULL );
-
var_Create( p_input, "seekable", VLC_VAR_BOOL );
- val.b_bool = VLC_TRUE; /* Fixed later*/
+ val.b_bool = true; /* Fixed later*/
var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
+ var_Create( p_input, "can-pause", VLC_VAR_BOOL );
+ val.b_bool = true; /* Fixed later*/
+ var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
/* */
var_Create( p_input, "access-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
-
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( newval.i_int == PLAYING_S || newval.i_int == PAUSE_S )
{
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
/* Problem with this way: the "rate" variable is update after the input thread do the change */
if( !strcmp( psz_cmd, "rate-slower" ) )
{
input_thread_t *p_input = (input_thread_t*)p_this;
vlc_value_t val, length;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( !strcmp( psz_cmd, "position-offset" ) )
{
{
input_thread_t *p_input = (input_thread_t*)p_this;
vlc_value_t val, length;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( !strcmp( psz_cmd, "time-offset" ) )
{
void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
input_ControlPush( p_input, INPUT_CONTROL_SET_PROGRAM, &newval );
{
input_thread_t *p_input = (input_thread_t*)p_this;
vlc_value_t val, count;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( !strcmp( psz_cmd, "next-title" ) )
{
{
input_thread_t *p_input = (input_thread_t*)p_this;
vlc_value_t val, count;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( !strcmp( psz_cmd, "next-chapter" ) )
{
{
input_thread_t *p_input = (input_thread_t*)p_this;
vlc_value_t val;
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
/* Issue a title change */
- val.i_int = (int)p_data;
+ val.i_int = (intptr_t)p_data;
input_ControlPush( p_input, INPUT_CONTROL_SET_TITLE, &val );
var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( newval.i_int < 0 )
{
}
static int EsDelayCallback ( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p )
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
-
+ VLC_UNUSED(oldval); VLC_UNUSED(p_data);
if( !strcmp( psz_cmd, "audio-delay" ) )
{
void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
input_ControlPush( p_input, INPUT_CONTROL_SET_BOOKMARK, &newval );