]> git.sesse.net Git - vlc/commitdiff
* ninput.h : change control parameters.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 7 Sep 2003 22:45:16 +0000 (22:45 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 7 Sep 2003 22:45:16 +0000 (22:45 +0000)
 * variables : changed time variables to signed long long type (I hope
 it is always more than 64 bits)
 * input.h : include ninput.h

include/ninput.h
include/stream_control.h
include/variables.h
include/vlc/input.h
include/vlc/vlc.h

index f9701f1f583563690526138a3f3872d6866233c2..b19d9e05170f9961fe8f6c66738da961933bfe47 100644 (file)
@@ -2,7 +2,7 @@
  * ninput.h
  *****************************************************************************
  * 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>
  *
@@ -86,11 +86,10 @@ static int inline stream_Seek( stream_t *s, int64_t i_pos )
  * XXX: don't look at it yet.
  * @{
  */
-#define DEMUX_POSITION_MAX  10000
 enum demux_query_e
 {
-    DEMUX_GET_POSITION,         /* arg1= int64_t *      res=    */
-    DEMUX_SET_POSITION,         /* arg1= int64_t        res=can fail    */
+    DEMUX_GET_POSITION,         /* arg1= double *       res=    */
+    DEMUX_SET_POSITION,         /* arg1= double         res=can fail    */
 
     DEMUX_GET_TIME,             /* arg1= int64_t *      res=    */
     DEMUX_SET_TIME,             /* arg1= int64_t        res=can fail    */
@@ -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_Control,          ( input_thread_t *, int i_query, ...  ) );
 
+VLC_EXPORT( int,            demux_vaControlDefault, ( input_thread_t *, int i_query, va_list  ) );
+
 /**
  * @}
  */
index ccf2f82e73745c88dc84c2fa50d7e0461a21f558..4dab4c331002046732636d93d3df266f28484434 100644 (file)
@@ -4,7 +4,7 @@
  * of the reading.
  *****************************************************************************
  * 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>
  *
@@ -46,14 +46,17 @@ struct stream_ctrl_t
 };
 
 /* Possible status : */
-#define UNDEF_S             0
-#define PLAYING_S           1
-#define PAUSE_S             2
-#define FORWARD_S           3
-#define BACKWARD_S          4
-#define REWIND_S            5                /* Not supported for the moment */
-#define NOT_STARTED_S       10
-#define START_S             11
+enum stream_status_e
+{
+    UNDEF_S         = 0,
+    PLAYING_S       = 1,
+    PAUSE_S         = 2,
+    FORWARD_S       = 3,
+    BACKWARD_S      = 4,
+
+    INIT_S          = 10,
+    END_S           = 11
+};
 
 #define DEFAULT_RATE        1000
 #define MINIMAL_RATE        31              /* Up to 32/1 */
index 09af78c3d20ce72cad62889493311d6849d43f90..58b2dd52583260787a2a4466cea630d0a91e2839 100644 (file)
@@ -2,7 +2,7 @@
  * variables.h: variables handling
  *****************************************************************************
  * 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>
  *
@@ -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_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)
+
index cc122968e43461340a9d85e3bb0d15243cee409c..77e1de8a9056442aa5779b3b0dd22157d49a968a 100644 (file)
@@ -2,7 +2,7 @@
  * input.h: input modules header for vlc
  *****************************************************************************
  * 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
  * it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@ extern "C" {
 #include "input_ext-intf.h" /* input_thread_s */
 #include "input_ext-dec.h" /* data_packet_s */
 #include "input_ext-plugins.h"
+#include "ninput.h"
 
 # ifdef __cplusplus
 }
index 0eea2c0436a8995bd5cfdaa5fa5f9fc7aec905a5..e823b028ca632f96a6186dfca9af4a0d17dcdca1 100644 (file)
@@ -2,7 +2,7 @@
  * vlc.h: global header for vlc
  *****************************************************************************
  * 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
  * it under the terms of the GNU General Public License as published by
@@ -42,8 +42,8 @@ typedef union
     void *          p_address;
     vlc_object_t *  p_object;
     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;
 
    /* Make sure the structure is at least 64bits */