* modules/gui/skins2/*: removed a couple of fixme
authorGildas Bazin <gbazin@videolan.org>
Sat, 26 Jun 2004 16:15:27 +0000 (16:15 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 26 Jun 2004 16:15:27 +0000 (16:15 +0000)
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/vars/time.cpp

index e72c748..040839f 100755 (executable)
@@ -192,21 +192,9 @@ void VlcProc::manage()
     if( pInput && !pInput->b_die )
     {
         // Refresh time variables
-#warning "FIXME!"
-        if( true /* pInput->stream.b_seekable */ )
-        {
-            // Refresh position in the stream
-            vlc_value_t pos;
-            var_Get( pInput, "position", &pos );
-            if( pos.f_float >= 0.0 )
-            {
-                pTime->set( pos.f_float, false );
-            }
-        }
-        else
-        {
-            pTime->set( 0, false );
-        }
+        vlc_value_t pos;
+        var_Get( pInput, "position", &pos );
+        pTime->set( pos.f_float, false );
 
         // Get the status of the playlist
         playlist_status_t status = getIntf()->p_sys->p_playlist->i_status;
@@ -215,8 +203,7 @@ void VlcProc::manage()
         pVarStopped->set( status == PLAYLIST_STOPPED );
         pVarPaused->set( status == PLAYLIST_PAUSED );
 
-#warning "FIXME!"
-        pVarSeekable->set( true /* pInput->stream.b_seekable */ );
+        pVarSeekable->set( pos.f_float != 0.0 );
     }
     else
     {
index 02eb50c..f6a8f59 100755 (executable)
@@ -58,9 +58,14 @@ const string StreamTime::getAsStringPercent() const
 
 const string StreamTime::getAsStringCurrTime() const
 {
-#warning "FIXME!"
-    if( getIntf()->p_sys->p_input == NULL ||
-        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
+    if( getIntf()->p_sys->p_input == NULL )
+    {
+        return "-:--:--";
+    }
+
+    vlc_value_t pos;
+    var_Get( getIntf()->p_sys->p_input, "position", &pos );
+    if( pos.f_float == 0.0 )
     {
         return "-:--:--";
     }
@@ -74,9 +79,14 @@ const string StreamTime::getAsStringCurrTime() const
 
 const string StreamTime::getAsStringTimeLeft() const
 {
-#warning "FIXME!"
-    if( getIntf()->p_sys->p_input == NULL ||
-        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
+    if( getIntf()->p_sys->p_input == NULL )
+    {
+        return "-:--:--";
+    }
+
+    vlc_value_t pos;
+    var_Get( getIntf()->p_sys->p_input, "position", &pos );
+    if( pos.f_float == 0.0 )
     {
         return "-:--:--";
     }
@@ -91,9 +101,14 @@ const string StreamTime::getAsStringTimeLeft() const
 
 const string StreamTime::getAsStringDuration() const
 {
-#warning "FIXME!"
-    if( getIntf()->p_sys->p_input == NULL ||
-        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
+    if( getIntf()->p_sys->p_input == NULL )
+    {
+        return "-:--:--";
+    }
+
+    vlc_value_t pos;
+    var_Get( getIntf()->p_sys->p_input, "position", &pos );
+    if( pos.f_float == 0.0 )
     {
         return "-:--:--";
     }