]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
configure: added a minimal-macosx item, which will just compile the macosx-only modul...
[vlc] / include / vlc_input.h
index 561a75396481dfedb7c86ca6564c6399105c05fb..1f152eff8438e76ce1056810e7553157db736a40 100644 (file)
@@ -344,12 +344,14 @@ typedef enum input_state_e
 /**
  * Input rate.
  *
- * It is an integer used by the variable "rate" in the
- * range [INPUT_RATE_MIN, INPUT_RATE_MAX] the default value
- * being INPUT_RATE_DEFAULT.
+ * It is an float used by the variable "rate" in the
+ * range [INPUT_RATE_DEFAULT/INPUT_RATE_MAX, INPUT_RATE_DEFAULT/INPUT_RATE_MAX]
+ * the default value being 1. It represents the ratio of playback speed to
+ * nominal speed (bigger is faster).
  *
- * A value lower than INPUT_RATE_DEFAULT plays faster.
- * A value higher than INPUT_RATE_DEFAULT plays slower.
+ * Internally, the rate is stored as a value in the range
+ * [INPUT_RATE_MIN, INPUT_RATE_MAX].
+ * internal rate = INPUT_RATE_DEFAULT / rate variable
  */
 
 /**
@@ -452,7 +454,7 @@ enum input_query_e
     INPUT_GET_TIME,             /* arg1= int64_t *      res=    */
     INPUT_SET_TIME,             /* arg1= int64_t        res=can fail    */
 
-    /* input variable "rate" (1 is DEFAULT_RATE) */
+    /* input variable "rate" (nominal is INPUT_RATE_DEFAULT) */
     INPUT_GET_RATE,             /* arg1= int *          res=    */
     INPUT_SET_RATE,             /* arg1= int            res=can fail    */
 
@@ -524,8 +526,8 @@ VLC_EXPORT( int,  input_Start, ( input_thread_t * ) );
 
 VLC_EXPORT( void, input_Stop, ( input_thread_t *, bool b_abort ) );
 
-#define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c)
-VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, bool ) );
+#define input_Read(a,b) __input_Read(VLC_OBJECT(a),b)
+VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t * ) );
 
 VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list  ) );
 
@@ -568,12 +570,12 @@ static inline int input_AddSubtitle( input_thread_t *p_input, const char *psz_ur
 static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
 {
      vout_thread_t **pp_vout, *p_vout;
-     unsigned i_vout;
+     size_t i_vout;
 
      if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
          return NULL;
 
-     for( unsigned i = 1; i < i_vout; i++ )
+     for( size_t i = 1; i < i_vout; i++ )
          vlc_object_release( (vlc_object_t *)(pp_vout[i]) );
 
      p_vout = (i_vout >= 1) ? pp_vout[0] : NULL;
@@ -613,4 +615,18 @@ VLC_EXPORT( void, input_SplitMRL, ( const char **ppsz_access, const char **ppsz_
  */
 VLC_EXPORT( char *, input_CreateFilename, ( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) );
 
+/**
+ * This function detaches resources from a dead input.
+ *
+ * It MUST be called on a dead input (p_input->b_dead true) otherwise
+ * it will assert.
+ * It does not support concurrent calls.
+ */
+VLC_EXPORT(input_resource_t *, input_DetachResource, ( input_thread_t * ) );
+
+/**
+ * This function releases the input resource.
+ */
+VLC_EXPORT(void, input_resource_Delete, ( input_resource_t * ) );
+
 #endif