]> git.sesse.net Git - vlc/blobdiff - src/input/es_out.h
Made input_clock_t in charge of pts_delay.
[vlc] / src / input / es_out.h
index 7843c2aa9a38c239659a52ab9a66afa9e6ab524c..62818ff68036bfd35e7e85374105f3f5ddc014f6 100644 (file)
 
 enum es_out_query_private_e
 {
+
+    /* activate application of mode */
+    ES_OUT_SET_ACTIVE = ES_OUT_PRIVATE_START,       /* arg1= bool                     */
+
+    /* set/get mode */
+    ES_OUT_SET_MODE,                                /* arg1= int                            */
+
     /* Get date to wait before demuxing more data */
-    ES_OUT_GET_WAKE_UP = ES_OUT_PRIVATE_START,      /* arg1=mtime_t*            res=cannot fail */
+    ES_OUT_GET_WAKE_UP,                             /* arg1=mtime_t*            res=cannot fail */
 
     /* Wrapper for some ES command to work with id */
     ES_OUT_SET_ES_BY_ID,
@@ -46,6 +53,30 @@ enum es_out_query_private_e
 
     /* Check if es_out has still data to play */
     ES_OUT_GET_EMPTY,                               /* arg1=bool*               res=cannot fail */
+
+    /* Set delay for a ES category */
+    ES_OUT_SET_DELAY,                               /* arg1=es_category_e,      res=can fail */
+
+    /* Set record state */
+    ES_OUT_SET_RECORD_STATE,                        /* arg1=bool                res=can fail */
+
+    /* Set pause state */
+    ES_OUT_SET_PAUSE_STATE,                         /* arg1=bool b_source_paused, bool b_paused arg2=mtime_t   res=can fail */
+
+    /* Set rate */
+    ES_OUT_SET_RATE,                                /* arg1=int i_source_rate arg2=int i_rate                  res=can fail */
+
+    /* Set a new time */
+    ES_OUT_SET_TIME,                                /* arg1=mtime_t             res=can fail */
+
+    /* Set next frame */
+    ES_OUT_SET_FRAME_NEXT,                          /*                          res=can fail */
+
+    /* Set position/time/length */
+    ES_OUT_SET_TIMES,                               /* arg1=double f_position arg2=mtime_t i_time arg3=mtime_t i_length res=cannot fail */
+
+    /* Set jitter */
+    ES_OUT_SET_JITTER,                              /* arg1=mtime_t i_pts_delay arg2=int i_cr_average res=cannot fail */
 };
 
 static inline mtime_t es_out_GetWakeup( es_out_t *p_out )
@@ -72,17 +103,41 @@ static inline bool es_out_GetEmpty( es_out_t *p_out )
     assert( !i_ret );
     return b;
 }
+static inline int es_out_SetDelay( es_out_t *p_out, int i_cat, mtime_t i_delay )
+{
+    return es_out_Control( p_out, ES_OUT_SET_DELAY, i_cat, i_delay );
+}
+static inline int es_out_SetRecordState( es_out_t *p_out, bool b_record )
+{
+    return es_out_Control( p_out, ES_OUT_SET_RECORD_STATE, b_record );
+}
+static inline int es_out_SetPauseState( es_out_t *p_out, bool b_source_paused, bool b_paused, mtime_t i_date )
+{
+    return es_out_Control( p_out, ES_OUT_SET_PAUSE_STATE, b_source_paused, b_paused, i_date );
+}
+static inline int es_out_SetRate( es_out_t *p_out, int i_source_rate, int i_rate )
+{
+    return es_out_Control( p_out, ES_OUT_SET_RATE, i_source_rate, i_rate );
+}
+static inline int es_out_SetTime( es_out_t *p_out, mtime_t i_date )
+{
+    return es_out_Control( p_out, ES_OUT_SET_TIME, i_date );
+}
+static inline int es_out_SetFrameNext( es_out_t *p_out )
+{
+    return es_out_Control( p_out, ES_OUT_SET_FRAME_NEXT );
+}
+static inline void es_out_SetTimes( es_out_t *p_out, double f_position, mtime_t i_time, mtime_t i_length )
+{
+    int i_ret = es_out_Control( p_out, ES_OUT_SET_TIMES, f_position, i_time, i_length );
+    assert( !i_ret );
+}
+static inline void es_out_SetJitter( es_out_t *p_out, mtime_t i_pts_delay, int i_cr_average )
+{
+    int i_ret = es_out_Control( p_out, ES_OUT_SET_JITTER, i_pts_delay, i_cr_average );
+    assert( !i_ret );
+}
 
 es_out_t  *input_EsOutNew( input_thread_t *, int i_rate );
 
-void       input_EsOutSetDelay( es_out_t *, int i_cat, int64_t );
-int        input_EsOutSetRecord( es_out_t *, bool b_record );
-void       input_EsOutChangeRate( es_out_t *, int );
-void       input_EsOutChangePause( es_out_t *, bool b_paused, mtime_t i_date );
-void       input_EsOutChangePosition( es_out_t * );
-void       input_EsOutFrameNext( es_out_t * );
-
-void       input_EsOutLock( es_out_t * );
-void       input_EsOutUnlock( es_out_t * );
-
 #endif