]> git.sesse.net Git - vlc/commitdiff
Add STREAM_GET_PTS_DELAY control (refs #8457)
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Nov 2013 16:00:57 +0000 (18:00 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Nov 2013 16:08:03 +0000 (18:08 +0200)
include/vlc_stream.h
src/input/stream.c
src/input/stream_demux.c
src/input/stream_memory.c

index 077255357fc702df6cf2809c28bfcf8d508a445c..10a98ef2811fdfddb4b934c04806fea6813aaab5 100644 (file)
@@ -104,7 +104,8 @@ enum stream_query_e
     STREAM_UPDATE_SIZE,
 
     /* */
-    STREAM_GET_TITLE_INFO = 0x102, /**< arg1=input_title_t*** arg2=int* res=can fail */
+    STREAM_GET_PTS_DELAY = 0x101,/**< arg1= int64_t* res=cannot fail */
+    STREAM_GET_TITLE_INFO, /**< arg1=input_title_t*** arg2=int* res=can fail */
     STREAM_GET_TITLE,       /**< arg1=unsigned * res=can fail */
     STREAM_GET_SEEKPOINT,   /**< arg1=unsigned * res=can fail */
     STREAM_GET_META,        /**< arg1= vlc_meta_t **       res=can fail */
index 4e29dea10596dd5c776c2542034166ed9f058894..5788979b5e2b89bc605410234a93fe960ade3400 100644 (file)
@@ -554,6 +554,7 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
     static_control_match(CAN_FASTSEEK);
     static_control_match(CAN_PAUSE);
     static_control_match(CAN_CONTROL_PACE);
+    static_control_match(GET_PTS_DELAY);
     static_control_match(GET_TITLE_INFO);
     static_control_match(GET_TITLE);
     static_control_match(GET_SEEKPOINT);
@@ -573,6 +574,7 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
         case STREAM_CAN_FASTSEEK:
         case STREAM_CAN_PAUSE:
         case STREAM_CAN_CONTROL_PACE:
+        case STREAM_GET_PTS_DELAY:
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_TITLE:
         case STREAM_GET_SEEKPOINT:
index 3280021a07dbce310f6bbe8c6d31849822d98419..3516d799482dafd08f2278a32d64c9e8fbcbb207 100644 (file)
@@ -296,6 +296,10 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
+        case STREAM_GET_PTS_DELAY:
+            *va_arg( args, int64_t * ) = DEFAULT_PTS_DELAY;
+            return VLC_SUCCESS;
+
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_TITLE:
         case STREAM_GET_SEEKPOINT:
index ef3025bcc9f5a007ee85db52634fc721a2a56b13..491ab02f01988b0ae797a3891b8f3a61ff5de2dc 100644 (file)
@@ -122,6 +122,10 @@ static int Control( stream_t *s, int i_query, va_list args )
             p_sys->i_pos = i_64;
             break;
 
+        case STREAM_GET_PTS_DELAY:
+            *va_arg( args, int64_t * ) = 0;
+            break;
+
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_TITLE:
         case STREAM_GET_SEEKPOINT: