[vlc-commits] Add STREAM_GET_PTS_DELAY control (refs #8457)

Rémi Denis-Courmont git at videolan.org
Sun Nov 10 17:08:46 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 10 18:00:57 2013 +0200| [5ccba1ab1dccb2b73b9454cc47d00f2f794deb95] | committer: Rémi Denis-Courmont

Add STREAM_GET_PTS_DELAY control (refs #8457)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ccba1ab1dccb2b73b9454cc47d00f2f794deb95
---

 include/vlc_stream.h      |    3 ++-
 src/input/stream.c        |    2 ++
 src/input/stream_demux.c  |    4 ++++
 src/input/stream_memory.c |    4 ++++
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/vlc_stream.h b/include/vlc_stream.h
index 0772553..10a98ef 100644
--- a/include/vlc_stream.h
+++ b/include/vlc_stream.h
@@ -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 */
diff --git a/src/input/stream.c b/src/input/stream.c
index 4e29dea..5788979 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -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:
diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index 3280021..3516d79 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -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:
diff --git a/src/input/stream_memory.c b/src/input/stream_memory.c
index ef3025b..491ab02 100644
--- a/src/input/stream_memory.c
+++ b/src/input/stream_memory.c
@@ -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:



More information about the vlc-commits mailing list