]> git.sesse.net Git - vlc/blobdiff - include/vlc_demux.h
Adding a libvlc_media_player_next_frame
[vlc] / include / vlc_demux.h
index bc6caff60f29aec8388908175a44a71bd65d7979..e2858e8e2b6a5cd97d111af1637b0e0f18a4c1b7 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 */
 
@@ -192,9 +194,9 @@ VLC_EXPORT( void, demux_PacketizerDestroy, ( decoder_t *p_packetizer ) );
 #define DEMUX_INIT_COMMON() do {            \
     p_demux->pf_control = Control;          \
     p_demux->pf_demux = Demux;              \
-    p_demux->p_sys = malloc( sizeof( demux_sys_t ) ); \
+    p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
     if( !p_demux->p_sys ) return VLC_ENOMEM;\
-    memset( p_demux->p_sys, 0, sizeof( demux_sys_t ) ); } while(0)
+    } while(0)
 
 /**
  * @}