Commit fce2672f authored by Laurent Aimar's avatar Laurent Aimar

* ninput.h : change control parameters.

 * variables : changed time variables to signed long long type (I hope
 it is always more than 64 bits)
 * input.h : include ninput.h
parent 4b7cff4d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ninput.h * ninput.h
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ninput.h,v 1.7 2003/08/23 14:15:27 fenrir Exp $ * $Id: ninput.h,v 1.8 2003/09/07 22:45:16 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -86,11 +86,10 @@ static int inline stream_Seek( stream_t *s, int64_t i_pos ) ...@@ -86,11 +86,10 @@ static int inline stream_Seek( stream_t *s, int64_t i_pos )
* XXX: don't look at it yet. * XXX: don't look at it yet.
* @{ * @{
*/ */
#define DEMUX_POSITION_MAX 10000
enum demux_query_e enum demux_query_e
{ {
DEMUX_GET_POSITION, /* arg1= int64_t * res= */ DEMUX_GET_POSITION, /* arg1= double * res= */
DEMUX_SET_POSITION, /* arg1= int64_t res=can fail */ DEMUX_SET_POSITION, /* arg1= double res=can fail */
DEMUX_GET_TIME, /* arg1= int64_t * res= */ DEMUX_GET_TIME, /* arg1= int64_t * res= */
DEMUX_SET_TIME, /* arg1= int64_t res=can fail */ DEMUX_SET_TIME, /* arg1= int64_t res=can fail */
...@@ -104,6 +103,8 @@ enum demux_query_e ...@@ -104,6 +103,8 @@ enum demux_query_e
VLC_EXPORT( int, demux_vaControl, ( input_thread_t *, int i_query, va_list ) ); VLC_EXPORT( int, demux_vaControl, ( input_thread_t *, int i_query, va_list ) );
VLC_EXPORT( int, demux_Control, ( input_thread_t *, int i_query, ... ) ); VLC_EXPORT( int, demux_Control, ( input_thread_t *, int i_query, ... ) );
VLC_EXPORT( int, demux_vaControlDefault, ( input_thread_t *, int i_query, va_list ) );
/** /**
* @} * @}
*/ */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* of the reading. * of the reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: stream_control.h,v 1.10 2002/07/31 20:56:50 sam Exp $ * $Id: stream_control.h,v 1.11 2003/09/07 22:45:16 fenrir Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -46,14 +46,17 @@ struct stream_ctrl_t ...@@ -46,14 +46,17 @@ struct stream_ctrl_t
}; };
/* Possible status : */ /* Possible status : */
#define UNDEF_S 0 enum stream_status_e
#define PLAYING_S 1 {
#define PAUSE_S 2 UNDEF_S = 0,
#define FORWARD_S 3 PLAYING_S = 1,
#define BACKWARD_S 4 PAUSE_S = 2,
#define REWIND_S 5 /* Not supported for the moment */ FORWARD_S = 3,
#define NOT_STARTED_S 10 BACKWARD_S = 4,
#define START_S 11
INIT_S = 10,
END_S = 11
};
#define DEFAULT_RATE 1000 #define DEFAULT_RATE 1000
#define MINIMAL_RATE 31 /* Up to 32/1 */ #define MINIMAL_RATE 31 /* Up to 32/1 */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* variables.h: variables handling * variables.h: variables handling
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: variables.h,v 1.15 2003/07/23 22:01:25 gbazin Exp $ * $Id: variables.h,v 1.16 2003/09/07 22:45:16 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -159,3 +159,38 @@ VLC_EXPORT( int, __var_DelCallback, ( vlc_object_t *, const char *, vlc_callback ...@@ -159,3 +159,38 @@ VLC_EXPORT( int, __var_DelCallback, ( vlc_object_t *, const char *, vlc_callback
#define var_AddCallback(a,b,c,d) __var_AddCallback( VLC_OBJECT(a), b, c, d ) #define var_AddCallback(a,b,c,d) __var_AddCallback( VLC_OBJECT(a), b, c, d )
#define var_DelCallback(a,b,c,d) __var_DelCallback( VLC_OBJECT(a), b, c, d ) #define var_DelCallback(a,b,c,d) __var_DelCallback( VLC_OBJECT(a), b, c, d )
/*****************************************************************************
* helpers functions
*****************************************************************************
*
*****************************************************************************/
static inline int __var_SetInteger( vlc_object_t *p_obj, const char *psz_name, int i )
{
vlc_value_t val;
val.i_int = i;
return __var_Set( p_obj, psz_name, val );
}
static inline int __var_SetTime( vlc_object_t *p_obj, const char *psz_name, signed long long i )
{
vlc_value_t val;
val.i_time = i;
return __var_Set( p_obj, psz_name, val );
}
static inline int __var_SetFloat( vlc_object_t *p_obj, const char *psz_name, float f )
{
vlc_value_t val;
val.f_float = f;
return __var_Set( p_obj, psz_name, val );
}
static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
{
vlc_value_t val;
val.b_bool = VLC_TRUE;
return __var_Set( p_obj, psz_name, val );
}
#define var_SetInteger(a,b,c) __var_SetInteger( VLC_OBJECT(a),b,c)
#define var_SetTime(a,b,c) __var_SetTime( VLC_OBJECT(a),b,c)
#define var_SetFloat(a,b,c) __var_SetFloat( VLC_OBJECT(a),b,c)
#define var_SetVoid(a,b) __var_SetVoid( VLC_OBJECT(a),b)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input.h: input modules header for vlc * input.h: input modules header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: input.h,v 1.2 2003/09/02 20:19:25 gbazin Exp $ * $Id: input.h,v 1.3 2003/09/07 22:45:16 fenrir Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -39,6 +39,7 @@ extern "C" { ...@@ -39,6 +39,7 @@ extern "C" {
#include "input_ext-intf.h" /* input_thread_s */ #include "input_ext-intf.h" /* input_thread_s */
#include "input_ext-dec.h" /* data_packet_s */ #include "input_ext-dec.h" /* data_packet_s */
#include "input_ext-plugins.h" #include "input_ext-plugins.h"
#include "ninput.h"
# ifdef __cplusplus # ifdef __cplusplus
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc.h: global header for vlc * vlc.h: global header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.25 2003/08/14 13:09:42 sigmunau Exp $ * $Id: vlc.h,v 1.26 2003/09/07 22:45:16 fenrir Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -42,8 +42,8 @@ typedef union ...@@ -42,8 +42,8 @@ typedef union
void * p_address; void * p_address;
vlc_object_t * p_object; vlc_object_t * p_object;
vlc_list_t * p_list; vlc_list_t * p_list;
signed long long i_time;
struct { int i_low, i_high; } time;
struct { char *psz_name; int i_object_id; } var; struct { char *psz_name; int i_object_id; } var;
/* Make sure the structure is at least 64bits */ /* Make sure the structure is at least 64bits */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment