[vlc-devel] commit: DBus: don't use the demux object ( Rafaël Carré )

git version control git at videolan.org
Wed Mar 26 11:29:42 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Mar 26 11:28:26 2008 +0100| [a8b6113072c236b8b5b45c92cad6a57d6176b8cc]

DBus: don't use the demux object

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

 modules/control/dbus.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/modules/control/dbus.c b/modules/control/dbus.c
index 950b9ae..2c0c785 100644
--- a/modules/control/dbus.c
+++ b/modules/control/dbus.c
@@ -53,7 +53,6 @@
 #include <vlc_meta.h>
 #include <vlc_input.h>
 #include <vlc_playlist.h>
-#include <vlc_demux.h>
 
 /*****************************************************************************
  * Local prototypes.
@@ -989,19 +988,12 @@ static int UpdateCaps( intf_thread_t* p_intf )
 
     if( p_playlist->p_input )
     {
+        /* XXX: if UpdateCaps() is called too early, these are
+         * unconditionnaly true */
         if( var_GetBool( p_playlist->p_input, "can-pause" ) )
             i_caps |= CAPS_CAN_PAUSE;
-
-        demux_t *p_demux = (demux_t*)vlc_object_find( p_playlist->p_input,
-            VLC_OBJECT_DEMUX, FIND_CHILD );
-        if( p_demux )
-        {
-            vlc_bool_t b_can_seek;
-            if( !stream_Control( p_demux->s, STREAM_CAN_SEEK, &b_can_seek ) &&
-                    b_can_seek )
-                i_caps |= CAPS_CAN_SEEK;
-            vlc_object_release( p_demux );
-        }
+        if( var_GetBool( p_playlist->p_input, "seekable" ) )
+            i_caps |= CAPS_CAN_SEEK;
     }
 
     PL_UNLOCK;




More information about the vlc-devel mailing list