]> git.sesse.net Git - vlc/commitdiff
input/input.c: Define DEMUX_CAN_SEEK and correctly set "seekable" accordingly. (This...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 4 Jan 2008 02:36:00 +0000 (02:36 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 4 Jan 2008 02:36:00 +0000 (02:36 +0000)
12 files changed:
include/vlc_demux.h
modules/access/dc1394.c
modules/access/dshow/dshow.cpp
modules/access/dvdnav.c
modules/access/dvdread.c
modules/access/fake.c
modules/access/jack.c
modules/access/screen/screen.c
modules/access/v4l.c
modules/access/v4l2.c
modules/demux/live555.cpp
src/input/input.c

index 45b3c8765cec115a6da23574b1bcbed52a545702..5357cb4c1d2c74ac9850b9e8b39750512fbe1639 100644 (file)
@@ -140,6 +140,8 @@ enum demux_query_e
     /* DEMUX_SET_RATE is called only if DEMUX_CAN_CONTROL_RATE has returned true.
      * It should return the value really used in *pi_rate */
     DEMUX_SET_RATE,             /* arg1= int*pi_rate                                        can fail */
+
+    DEMUX_CAN_SEEK,            /* arg1= vlc_bool_t*    can fail (assume false)*/
 };
 
 VLC_EXPORT( int,       demux2_vaControlHelper, ( stream_t *, int64_t i_start, int64_t i_end, int i_bitrate, int i_align, int i_query, va_list args ) );
index 1312355bd1c8654a3a0bb95f7364178b6340bd3a..6cde55e46064d6772afb60bc2e1bbdc48d44b244 100644 (file)
@@ -802,6 +802,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_SET_PAUSE_STATE:
         case DEMUX_CAN_CONTROL_PACE:
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index 213dcaf5b5b59114cf0d9720c087b3870926ba34..dc0f42149a5e2ecb1d32e898e756c603e56d29ca 100644 (file)
@@ -1795,6 +1795,7 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
     {
     /* Special for access_demux */
     case DEMUX_CAN_PAUSE:
+    case DEMUX_CAN_SEEK:
     case DEMUX_SET_PAUSE_STATE:
     case DEMUX_CAN_CONTROL_PACE:
         pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index 03daa723ec592b4f9263cbc765db3df5d2194102..05173aad34d38ba5baae9993bc9c3d4b3bf09fe9 100644 (file)
@@ -447,6 +447,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             /* TODO */
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index 7638181659fd071e90a48decb36d9a478a5c5286..cbc28544ec24f4d666938e145ca4f85f6a9bacfa 100644 (file)
@@ -406,6 +406,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             /* TODO */
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index b4a2cb1c20a21481efe79bf2b6ca59db7f5a7351..1e21733361df7ab3bbf47ae4be02b18ac456ab47 100644 (file)
@@ -142,6 +142,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             pb = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
             *pb = VLC_TRUE;
index cf31d5f101eed927a6989e1b829ff2a3ae35c2e5..47eeae376b3e1db316e2e15694d0160591988821 100644 (file)
@@ -343,6 +343,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
     /* Special for access_demux */
     case DEMUX_CAN_PAUSE:
+    case DEMUX_CAN_SEEK:
+        pb = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
+        *pb = VLC_TRUE;
+        return VLC_SUCCESS;
+
     case DEMUX_SET_PAUSE_STATE:
         return VLC_SUCCESS;
     case DEMUX_CAN_CONTROL_PACE:
index 223c2593eaef3e7d56b9f446c8c79dbd53e41adc..223cc46b98f1e68980d72fa18cee7ecf8c0d6d36 100644 (file)
@@ -176,6 +176,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             /* TODO */
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index f8f49be7d547ef8c131b9959ab2953e082ef0f42..7efc65f5a65e4d5dc704449236f7c4d88957fffb 100644 (file)
@@ -581,6 +581,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_SET_PAUSE_STATE:
         case DEMUX_CAN_CONTROL_PACE:
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index f5a3293132ea2095a3025f558cf1ced5564b7ca8..0ded317868185a85e6b3e7b48f22e10bea3290c7 100644 (file)
@@ -991,6 +991,7 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_SET_PAUSE_STATE:
         case DEMUX_CAN_CONTROL_PACE:
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
index 20f46061f046523afd78c3508f31f3d503cef7e6..648a800fc3ab73b3d0d37a6eef674fd35b82f681 100644 (file)
@@ -1256,6 +1256,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         }
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
             pb = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
             if( p_sys->rtsp && p_sys->i_npt_length )
                 /* Not always true, but will be handled in SET_PAUSE_STATE */
index e26d1949598ad8569e20b4fc5563068b66dcf435..9fd3eb4fc904e847eb2f9770b14be02e993703d7 100644 (file)
@@ -2266,10 +2266,11 @@ static int InputSourceInit( input_thread_t *p_input,
                             &in->b_can_pause ) )
             in->b_can_pause = VLC_FALSE;
 
-        /* FIXME todo
-        demux2_Control( in->p_demux, DEMUX_CAN_SEEK,
+        int ret = demux2_Control( in->p_demux, DEMUX_CAN_SEEK,
                         &val.b_bool );
-        */
+        if( ret != VLC_SUCCESS )
+            val.b_bool = VLC_FALSE;
+        var_Set( p_input, "seekable", val );
     }
     else
     {