]> git.sesse.net Git - vlc/commitdiff
stream: add the new controls to demux and memory streams
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 17 Apr 2013 19:49:15 +0000 (22:49 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 17 Apr 2013 19:57:42 +0000 (22:57 +0300)
src/input/stream_demux.c
src/input/stream_memory.c

index b090219a479d35c3f7653681bfcbf106b594bfab..dbd7eec846b46bf81a33fabed0519e67fe5bf4f5 100644 (file)
@@ -259,7 +259,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
 {
     stream_sys_t *p_sys = s->p_sys;
     uint64_t    *p_i64;
-    bool *p_b;
 
     switch( i_query )
     {
@@ -269,13 +268,10 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case STREAM_CAN_SEEK:
-            p_b = (bool*) va_arg( args, bool * );
-            *p_b = false;
-            return VLC_SUCCESS;
-
         case STREAM_CAN_FASTSEEK:
-            p_b = (bool*) va_arg( args, bool * );
-            *p_b = false;
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
+            *va_arg( args, bool * ) = false;
             return VLC_SUCCESS;
 
         case STREAM_GET_POSITION:
@@ -302,6 +298,7 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
 
         case STREAM_CONTROL_ACCESS:
         case STREAM_GET_CONTENT_TYPE:
+        case STREAM_SET_PAUSE_STATE:
         case STREAM_SET_RECORD_STATE:
             return VLC_EGENERIC;
 
index 43b8f4e752ec2e6a91feff44f7ec14e0f865496e..4fce667441b3283a095eb5340e73fe87fd20534a 100644 (file)
@@ -95,7 +95,6 @@ static int Control( stream_t *s, int i_query, va_list args )
 {
     stream_sys_t *p_sys = s->p_sys;
 
-    bool *p_bool;
     uint64_t   *pi_64, i_64;
 
     switch( i_query )
@@ -106,13 +105,10 @@ static int Control( stream_t *s, int i_query, va_list args )
             break;
 
         case STREAM_CAN_SEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            *p_bool = true;
-            break;
-
         case STREAM_CAN_FASTSEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            *p_bool = true;
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
+            *va_arg( args, bool * ) = true;
             break;
 
         case STREAM_GET_POSITION:
@@ -129,6 +125,9 @@ static int Control( stream_t *s, int i_query, va_list args )
         case STREAM_GET_CONTENT_TYPE:
             return VLC_EGENERIC;
 
+        case STREAM_SET_PAUSE_STATE:
+            break; /* nothing to do */
+
         case STREAM_CONTROL_ACCESS:
             msg_Err( s, "Hey, what are you thinking ?"
                      "DON'T USE STREAM_CONTROL_ACCESS !!!" );