]> git.sesse.net Git - vlc/blobdiff - include/vlc_demux.h
fix typo
[vlc] / include / vlc_demux.h
index 487efea45afdc29542ac19c84e55d3bb1de48b23..11444e24ea47721c17c4c60e4c06f94baca3247a 100644 (file)
@@ -88,12 +88,12 @@ enum demux_query_e
     /* I. Common queries to access_demux and demux */
     /* POSITION double between 0.0 and 1.0 */
     DEMUX_GET_POSITION,         /* arg1= double *       res=    */
-    DEMUX_SET_POSITION,         /* arg1= double         res=can fail    */
+    DEMUX_SET_POSITION,         /* arg1= double arg2= bool b_precise    res=can fail    */
 
     /* LENGTH/TIME in microsecond, 0 if unknown */
     DEMUX_GET_LENGTH,           /* 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 arg2= bool b_precise   res=can fail    */
 
     /* TITLE_INFO only if more than 1 title or 1 chapter */
     DEMUX_GET_TITLE_INFO,       /* arg1=input_title_t*** arg2=int*
@@ -124,13 +124,15 @@ enum demux_query_e
     /* Attachments */
     DEMUX_GET_ATTACHMENTS,      /* arg1=input_attachment_t***, int* res=can fail */
 
-    /* RECORD you should accept it only if the stream can be recorded without
+    /* RECORD you are ensured that it is never called twice with the same state
+     * you should accept it only if the stream can be recorded without
      * any modification or header addition. */
     DEMUX_CAN_RECORD,           /* arg1=bool*   res=can fail(assume false) */
     DEMUX_SET_RECORD_STATE,     /* arg1=bool    res=can fail */
 
 
     /* II. Specific access_demux queries */
+    /* PAUSE you are ensured that it is never called twice with the same state */
     DEMUX_CAN_PAUSE = 0x1000,   /* arg1= bool*    can fail (assume false)*/
     DEMUX_SET_PAUSE_STATE,      /* arg1= bool     can fail */
 
@@ -151,7 +153,7 @@ enum demux_query_e
     DEMUX_CAN_SEEK,            /* arg1= bool*    can fail (assume false)*/
 };
 
-VLC_EXPORT( int,       demux_vaControlHelper, ( stream_t *, int64_t i_start, int64_t i_end, int i_bitrate, int i_align, int i_query, va_list args ) );
+VLC_EXPORT( int,       demux_vaControlHelper, ( stream_t *, int64_t i_start, int64_t i_end, int64_t i_bitrate, int i_align, int i_query, va_list args ) );
 
 /*************************************************************************
  * Miscellaneous helpers for demuxers
@@ -196,44 +198,6 @@ VLC_EXPORT( void, demux_PacketizerDestroy, ( decoder_t *p_packetizer ) );
     if( !p_demux->p_sys ) return VLC_ENOMEM;\
     memset( p_demux->p_sys, 0, sizeof( demux_sys_t ) ); } while(0)
 
-#define STANDARD_DEMUX_INIT_MSG( msg ) do { \
-    DEMUX_INIT_COMMON();                    \
-    msg_Dbg( p_demux, "%s", msg ); } while(0)
-
-#define DEMUX_BY_EXTENSION( ext ) \
-    demux_t *p_demux = (demux_t *)p_this; \
-    if( !demux_IsPathExtension( p_demux, ext ) ) \
-        return VLC_EGENERIC; \
-    DEMUX_INIT_COMMON();
-
-#define DEMUX_BY_EXTENSION_MSG( ext, msg ) \
-    demux_t *p_demux = (demux_t *)p_this; \
-    if( !demux_IsPathExtension( p_demux, ext ) ) \
-        return VLC_EGENERIC; \
-    STANDARD_DEMUX_INIT_MSG( msg );
-
-#define DEMUX_BY_EXTENSION_OR_FORCED( ext, module ) \
-    demux_t *p_demux = (demux_t *)p_this; \
-    if( !demux_IsPathExtension( p_demux, ext ) && !demux_IsForced( p_demux, module ) ) \
-        return VLC_EGENERIC; \
-    DEMUX_INIT_COMMON();
-
-#define DEMUX_BY_EXTENSION_OR_FORCED_MSG( ext, module, msg ) \
-    demux_t *p_demux = (demux_t *)p_this; \
-    if( !demux_IsPathExtension( p_demux, ext ) && !demux_IsForced( p_demux, module ) ) \
-        return VLC_EGENERIC; \
-    STANDARD_DEMUX_INIT_MSG( msg );
-
-#define CHECK_PEEK( zepeek, size ) \
-    if( stream_Peek( p_demux->s , &zepeek, size ) < size ){ \
-        msg_Dbg( p_demux, "not enough data" ); return VLC_EGENERIC; }
-
-#define CHECK_PEEK_GOTO( zepeek, size ) \
-    if( stream_Peek( p_demux->s , &zepeek, size ) < size ) { \
-        msg_Dbg( p_demux, "not enough data" ); goto error; }
-
-#define POKE( peek, stuff, size ) (strncasecmp( (const char *)peek, stuff, size )==0)
-
 /**
  * @}
  */