]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins / skins2: compilation fixes.
authorGildas Bazin <gbazin@videolan.org>
Tue, 22 Jun 2004 21:55:50 +0000 (21:55 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 22 Jun 2004 21:55:50 +0000 (21:55 +0000)
modules/gui/skins/src/skin_main.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/vars/stream.cpp
modules/gui/skins2/vars/time.cpp

index b1eab40cf46ebb17dbf24638ddf830d1c392ee9c..492cd09c05cd2802cd58ee96deaf7563a1a3b299 100644 (file)
@@ -353,8 +353,6 @@ int SkinManage( intf_thread_t *p_intf )
     {
         input_thread_t  * p_input = p_intf->p_sys->p_input;
 
-        vlc_mutex_lock( &p_input->stream.stream_lock );
-
         // Refresh sound volume
         audio_volume_t volume;
 
@@ -367,19 +365,18 @@ int SkinManage( intf_thread_t *p_intf )
             p_intf->p_sys->p_theme->EvtBank->Get( "volume_refresh" ),
             (long)( volume * SLIDER_RANGE / (AOUT_VOLUME_DEFAULT * 2) ) );
 
+#if 1
+#warning "FIXME!"
+#else
+        vlc_mutex_lock( &p_input->stream.stream_lock );
+
         // Refresh slider
         // if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
 #define p_area p_input->stream.p_selected_area
         if( p_input->stream.b_seekable && p_area->i_size )
+#endif
         {
 
-            // Set value of sliders
-            long Value = SLIDER_RANGE * p_area->i_tell / p_area->i_size;
-
-            // Update sliders
-            OSAPI_PostMessage( NULL, CTRL_SET_SLIDER, (unsigned int)
-                p_intf->p_sys->p_theme->EvtBank->Get( "time" ), (long)Value );
-
             // Text char * for updating text controls
             char *text = new char[MSTRTIME_MAX_SIZE];
 
@@ -388,6 +385,13 @@ int SkinManage( intf_thread_t *p_intf )
             i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / I64C(1000000 );
             i_length = var_GetTime( p_intf->p_sys->p_input, "length" ) / I64C(1000000 );
 
+            // Set value of sliders
+            long Value = SLIDER_RANGE * i_seconds / i_length;
+
+            // Update sliders
+            OSAPI_PostMessage( NULL, CTRL_SET_SLIDER, (unsigned int)
+                p_intf->p_sys->p_theme->EvtBank->Get( "time" ), (long)Value );
+
             // Create end time text
             secstotimestr( &text[1], i_length - i_seconds );
             text[0] = '-';
@@ -409,7 +413,11 @@ int SkinManage( intf_thread_t *p_intf )
 
 #undef p_area
         }
+
+#warning "FIXME!"
+#if 0
         vlc_mutex_unlock( &p_input->stream.stream_lock );
+#endif
     }
     //-------------------------------------------------------------------------
     vlc_mutex_unlock( &p_intf->change_lock );
index a79a591f2a3446d688ae4bfc98cd7a0f2432d5f5..29ce17f4f8911a90597821cdccc16660bbb6455e 100644 (file)
@@ -23,6 +23,7 @@
  *****************************************************************************/
 
 #include <stdlib.h>
+#include <vlc/input.h>
 #include "dialogs.hpp"
 #include "os_factory.hpp"
 #include "os_loop.hpp"
index c102d95ef94b2d32e1d6353574d0030f439e1609..e72c748124e3f79202ebb3627e1b10a552aaa06e 100755 (executable)
@@ -192,7 +192,8 @@ void VlcProc::manage()
     if( pInput && !pInput->b_die )
     {
         // Refresh time variables
-        if( pInput->stream.b_seekable )
+#warning "FIXME!"
+        if( true /* pInput->stream.b_seekable */ )
         {
             // Refresh position in the stream
             vlc_value_t pos;
@@ -213,7 +214,9 @@ void VlcProc::manage()
         pVarPlaying->set( status == PLAYLIST_RUNNING );
         pVarStopped->set( status == PLAYLIST_STOPPED );
         pVarPaused->set( status == PLAYLIST_PAUSED );
-        pVarSeekable->set( pInput->stream.b_seekable );
+
+#warning "FIXME!"
+        pVarSeekable->set( true /* pInput->stream.b_seekable */ );
     }
     else
     {
@@ -291,11 +294,12 @@ int VlcProc::onPlaylistChange( vlc_object_t *pObj, const char *pVariable,
     if( p_playlist->p_input )
     {
         // Create a command to update the stream variable
-        // XXX: we should not need to access p_inpu->psz_source directly, a
+        // XXX: we should not need to access p_input->psz_source directly, a
         // getter should be provided by VLC core
         Stream *pStream = (Stream*)pThis->m_cVarStream.get();
+#warning "FIXME!"
         UString srcName( pThis->getIntf(),
-                         p_playlist->p_input->psz_source );
+                         p_playlist->p_input->input.p_item->psz_uri );
         CmdSetStream *pCmd = new CmdSetStream( pThis->getIntf(), *pStream,
                                                srcName, false );
         // Push the command in the asynchronous command queue
index 2b0ea3ee7db073e8f72f1ed36874937f4813e456..e1013aa45998e45f33034427734a049c871eabf6 100644 (file)
@@ -2,7 +2,7 @@
  * time.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: time.cpp 6996 2004-03-07 12:55:32Z ipkiss $
+ * $Id$
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *
@@ -72,7 +72,8 @@ const string Stream::getAsStringFullName() const
     }
     else
     {
-        ret = getIntf()->p_sys->p_playlist->p_input->psz_source;
+#warning "FIXME!"
+        ret = getIntf()->p_sys->p_playlist->p_input->input.p_item->psz_uri;
     }
 
     return ret;
index b85375ca79bb1009313818d972423b3f1922c915..02eb50c52e21778f93ef456a5306d459076aa061 100755 (executable)
@@ -58,8 +58,9 @@ 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 )
+        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
     {
         return "-:--:--";
     }
@@ -73,8 +74,9 @@ 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 )
+        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
     {
         return "-:--:--";
     }
@@ -89,8 +91,9 @@ 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 )
+        /* !getIntf()->p_sys->p_input->stream.b_seekable */ 0 )
     {
         return "-:--:--";
     }