]> git.sesse.net Git - vlc/commitdiff
- all: the text variable "$N" is now the media name, not just a truncated URI
authorCyril Deguet <asmax@videolan.org>
Wed, 24 Nov 2004 20:23:23 +0000 (20:23 +0000)
committerCyril Deguet <asmax@videolan.org>
Wed, 24 Nov 2004 20:23:23 +0000 (20:23 +0000)
- vlcproc.cpp: update $N and $F variables on an item/playlist change
_ async_queue.cpp: fixed a deadlock between the VLC playlist and the command
  queue

modules/gui/skins2/Modules.am
modules/gui/skins2/commands/async_queue.cpp
modules/gui/skins2/commands/cmd_vars.cpp
modules/gui/skins2/commands/cmd_vars.hpp
modules/gui/skins2/src/var_manager.cpp
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.hpp
modules/gui/skins2/utils/var_text.cpp
modules/gui/skins2/utils/var_text.hpp
modules/gui/skins2/vars/stream.cpp [deleted file]
modules/gui/skins2/vars/stream.hpp [deleted file]

index a16c7d04d5d586e9977e551251fb501e2003e366..fb0ce3bf9b053a2bedc044ccb2909b49e385d533 100644 (file)
@@ -154,8 +154,6 @@ SOURCES_skins2 = \
        \
        vars/playlist.cpp \
        vars/playlist.hpp \
-       vars/stream.cpp \
-       vars/stream.hpp \
        vars/time.cpp \
        vars/time.hpp \
        vars/volume.cpp \
index 9d71edaccd4b2f2af2da8647ca59c82af4707b1c..f8d1f4202ccd36702ba8b54491b6d01fee65b437 100644 (file)
@@ -103,18 +103,29 @@ void AsyncQueue::remove( const string &rType )
 
 void AsyncQueue::flush()
 {
-    vlc_mutex_lock( &m_lock );
-
-    while( m_cmdList.size() > 0 )
+    while (true)
     {
-        // Pop the first command from the queue
-        CmdGenericPtr cCommand = m_cmdList.front();
-        m_cmdList.pop_front();
-        // And execute it
-        cCommand.get()->execute();
-    }
+        vlc_mutex_lock( &m_lock );
 
-    vlc_mutex_unlock( &m_lock );
+        if( m_cmdList.size() > 0 )
+        {
+            // Pop the first command from the queue
+            CmdGenericPtr cCommand = m_cmdList.front();
+            m_cmdList.pop_front();
+
+            // Unlock the mutex to avoid deadlocks if another thread wants to
+            // enqueue/remove a command while this one is processed
+            vlc_mutex_unlock( &m_lock );
+
+            // Execute the command
+            cCommand.get()->execute();
+        }
+        else
+        {
+            vlc_mutex_unlock( &m_lock );
+            break;
+        }
+    }
 }
 
 
index 3aa169a52e43f378b070114a43498575082c639e..bb61ec5894540fb9dd28bc113865a213de06e27b 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "cmd_vars.hpp"
 #include "../src/vlcproc.hpp"
-#include "../vars/stream.hpp"
+#include "../utils/var_text.hpp"
 #include "../vars/playlist.hpp"
 
 
@@ -35,9 +35,9 @@ void CmdNotifyPlaylist::execute()
 }
 
 
-void CmdSetStream::execute()
+void CmdSetText::execute()
 {
-    // Change the stream variable
-    m_rStream.set( m_name, m_updateVLC );
+    // Change the text variable
+    m_rText.set( m_value );
 }
 
index 0d2708c90573ed2f5f00465869394d42d31bcac1..f5bd25f203c97245b2cee8399e79e4a28e9182bf 100644 (file)
 #include "cmd_generic.hpp"
 #include "../utils/ustring.hpp"
 
-class Stream;
+class VarText;
 
 /// Command to notify the playlist of a change
 DEFINE_COMMAND( NotifyPlaylist, "notify playlist" )
 
 
-/// Command to set a stream variable
-class CmdSetStream: public CmdGeneric
+/// Command to set a text variable
+class CmdSetText: public CmdGeneric
 {
     public:
-        CmdSetStream( intf_thread_t *pIntf, Stream &rStream,
-                      const UString &rName, bool updateVLC ):
-            CmdGeneric( pIntf ), m_rStream( rStream ), m_name( rName ),
-            m_updateVLC( updateVLC ) {}
-        virtual ~CmdSetStream() {}
+        CmdSetText( intf_thread_t *pIntf, VarText &rText,
+                    const UString &rValue ):
+            CmdGeneric( pIntf ), m_rText( rText ), m_value( rValue ) {}
+        virtual ~CmdSetText() {}
 
         /// This method does the real job of the command
         virtual void execute();
 
         /// Return the type of the command
-        virtual string getType() const { return "set stream"; }
+        virtual string getType() const { return "set text"; }
 
     private:
-        /// Stream variable to set
-        Stream &m_rStream;
+        /// Text variable to set
+        VarText &m_rText;
         /// Value to set
-        const UString m_name;
-        bool m_updateVLC;
+        const UString m_value;
 };
 
 
index f869de47e5fd9bf21fa5f77fa9820ce9968e49da..6d3ea3e24b818d19dca06d584e9b60841c386b12 100644 (file)
@@ -26,7 +26,7 @@
 
 
 VarManager::VarManager( intf_thread_t *pIntf ): SkinObject( pIntf ),
-    m_tooltipText( pIntf ), m_helpText( pIntf )
+    m_tooltipText( pIntf ), m_helpText( pIntf, false )
 {
 }
 
index dd8604fcb6aa0a0ecec3ff8d57c177245c870a5c..149f8059077a28b410e3d2645483a398bffaed4c 100755 (executable)
@@ -82,13 +82,16 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
     REGISTER_VAR( m_cVarRepeat, VarBoolImpl, "playlist.isRepeat" )
     REGISTER_VAR( m_cVarTime, StreamTime, "time" )
     REGISTER_VAR( m_cVarVolume, Volume, "volume" )
-    REGISTER_VAR( m_cVarStream, Stream, "stream" )
     REGISTER_VAR( m_cVarMute, VarBoolImpl, "vlc.isMute" )
     REGISTER_VAR( m_cVarPlaying, VarBoolImpl, "vlc.isPlaying" )
     REGISTER_VAR( m_cVarStopped, VarBoolImpl, "vlc.isStopped" )
     REGISTER_VAR( m_cVarPaused, VarBoolImpl, "vlc.isPaused" )
     REGISTER_VAR( m_cVarSeekable, VarBoolImpl, "vlc.isSeekable" )
 #undef REGISTER_VAR
+    m_cVarStreamName = VariablePtr( new VarText( getIntf(), false ) );
+    pVarManager->registerVar( m_cVarStreamName, "streamName" );
+    m_cVarStreamURI = VariablePtr( new VarText( getIntf(), false ) );
+    pVarManager->registerVar( m_cVarStreamURI, "streamURI" );
 
     // XXX WARNING XXX
     // The object variable callbacks are called from other VLC threads,
@@ -211,7 +214,8 @@ void VlcProc::manage()
         pTime->set( pos.f_float, false );
 
         // Get the status of the playlist
-        playlist_status_t status = getIntf()->p_sys->p_playlist->status.i_status;
+        playlist_status_t status =
+            getIntf()->p_sys->p_playlist->status.i_status;
 
         pVarPlaying->set( status == PLAYLIST_RUNNING );
         pVarStopped->set( status == PLAYLIST_STOPPED );
@@ -256,6 +260,10 @@ int VlcProc::onIntfChange( vlc_object_t *pObj, const char *pVariable,
 {
     VlcProc *pThis = (VlcProc*)pParam;
 
+    // Update the stream variable
+    playlist_t *p_playlist = (playlist_t*)pObj;
+    pThis->updateStreamName(p_playlist);
+
     // Create a playlist notify command
     CmdNotifyPlaylist *pCmd = new CmdNotifyPlaylist( pThis->getIntf() );
 
@@ -277,9 +285,8 @@ int VlcProc::onIntfShow( vlc_object_t *pObj, const char *pVariable,
         VlcProc *pThis = (VlcProc*)pParam;
 
         // Create a raise all command
-        CmdRaiseAll *pCmd =
-            new CmdRaiseAll( pThis->getIntf(),
-                             pThis->getIntf()->p_sys->p_theme->getWindowManager() );
+        CmdRaiseAll *pCmd = new CmdRaiseAll( pThis->getIntf(),
+            pThis->getIntf()->p_sys->p_theme->getWindowManager() );
 
         // Push the command in the asynchronous command queue
         AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
@@ -297,6 +304,10 @@ int VlcProc::onItemChange( vlc_object_t *pObj, const char *pVariable,
 {
     VlcProc *pThis = (VlcProc*)pParam;
 
+    // Update the stream variable
+    playlist_t *p_playlist = (playlist_t*)pObj;
+    pThis->updateStreamName(p_playlist);
+
     // Create a playlist notify command
     // TODO: selective update
     CmdNotifyPlaylist *pCmd = new CmdNotifyPlaylist( pThis->getIntf() );
@@ -318,22 +329,9 @@ int VlcProc::onPlaylistChange( vlc_object_t *pObj, const char *pVariable,
 
     AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
 
+    // Update the stream variable
     playlist_t *p_playlist = (playlist_t*)pObj;
-    if( p_playlist->p_input )
-    {
-        // Create a command to update the stream variable
-        // 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->input.p_item->psz_uri );
-        CmdSetStream *pCmd = new CmdSetStream( pThis->getIntf(), *pStream,
-                                               srcName, false );
-        // Push the command in the asynchronous command queue
-        pQueue->remove( "set stream" );
-        pQueue->push( CmdGenericPtr( pCmd ) );
-    }
+    pThis->updateStreamName(p_playlist);
 
     // Create a playlist notify command
     // TODO: selective update
@@ -366,6 +364,39 @@ int VlcProc::onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
 }
 
 
+void VlcProc::updateStreamName( playlist_t *p_playlist )
+{
+    if( p_playlist->p_input )
+    {
+        VarText &rStreamName = getStreamNameVar();
+        VarText &rStreamURI = getStreamURIVar();
+        // XXX: we should not need to access p_input->psz_source directly, a
+        // getter should be provided by VLC core
+#warning "FIXME!"
+        string name = p_playlist->p_input->input.p_item->psz_name;
+        // XXX: This should be done in VLC core, not here...
+        // Remove path information if any
+        OSFactory *pFactory = OSFactory::instance( getIntf() );
+        string::size_type pos = name.rfind( pFactory->getDirSeparator() );
+        if( pos != string::npos )
+        {
+            name = name.substr( pos + 1, name.size() - pos + 1 );
+        }
+        UString srcName( getIntf(), name.c_str() );
+        UString srcURI( getIntf(),
+                         p_playlist->p_input->input.p_item->psz_uri );
+
+        // Create commands to update the stream variables
+        CmdSetText *pCmd1 = new CmdSetText( getIntf(), rStreamName, srcName );
+        CmdSetText *pCmd2 = new CmdSetText( getIntf(), rStreamURI, srcURI );
+        // Push the commands in the asynchronous command queue
+        AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
+        pQueue->push( CmdGenericPtr( pCmd1 ) );
+        pQueue->push( CmdGenericPtr( pCmd2 ) );
+    }
+}
+
+
 void *VlcProc::getWindow( intf_thread_t *pIntf, vout_thread_t *pVout,
                           int *pXHint, int *pYHint,
                           unsigned int *pWidthHint,
index 6c31566bcb8fa7892944a89d05b6a15741b09c0e..6e9163a625f5b28a7123b47e210a9d6c021141a0 100755 (executable)
@@ -28,7 +28,7 @@
 #include "../vars/playlist.hpp"
 #include "../vars/time.hpp"
 #include "../vars/volume.hpp"
-#include "../vars/stream.hpp"
+#include "../utils/var_text.hpp"
 
 class OSTimer;
 class VarBool;
@@ -54,8 +54,13 @@ class VlcProc: public SkinObject
         /// Getter for the volume variable
         Volume &getVolumeVar() { return *((Volume*)(m_cVarVolume.get())); }
 
-        /// Getter for the stream variable
-        Stream &getStreamVar() { return *((Stream*)(m_cVarStream.get())); }
+        /// Getter for the stream name variable
+        VarText &getStreamNameVar()
+           { return *((VarText*)(m_cVarStreamName.get())); }
+
+        /// Getter for the stream URI variable
+        VarText &getStreamURIVar()
+            { return *((VarText*)(m_cVarStreamURI.get())); }
 
         /// Set the vout window handle
         void setVoutWindow( void *pVoutWindow );
@@ -77,8 +82,9 @@ class VlcProc: public SkinObject
         VariablePtr m_cVarTime;
         /// Variable for audio volume
         VariablePtr m_cVarVolume;
-        /// Variable for current stream properties (only name, currently)
-        VariablePtr m_cVarStream;
+        /// Variable for current stream properties
+        VariablePtr m_cVarStreamName;
+        VariablePtr m_cVarStreamURI;
         /// Variable for the "mute" state
         VariablePtr m_cVarMute;
         /// Variables related to the input
@@ -98,6 +104,9 @@ class VlcProc: public SkinObject
         /// the internal status changes
         void manage();
 
+        /// Update the stream name variable
+        void updateStreamName( playlist_t *p_playlist );
+
         /// This function directly calls manage(), because it's boring to
         /// always write "pThis->"
         static void doManage( SkinObject *pObj );
index 2146618d424d3dee4a0c938c9cb76ee1e7c78e01..8e46e338a57406af0dc0f2e5614cb2db5d49f6a1 100755 (executable)
 #include "../src/var_manager.hpp"
 #include "../vars/time.hpp"
 #include "../vars/volume.hpp"
-#include "../vars/stream.hpp"
 
 
 const string VarText::m_type = "text";
 
 
-VarText::VarText( intf_thread_t *pIntf ): Variable( pIntf ),
-    m_text( pIntf, "" ), m_lastText( pIntf, "" )
+VarText::VarText( intf_thread_t *pIntf, bool substVars ): Variable( pIntf ),
+    m_text( pIntf, "" ), m_lastText( pIntf, "" ), m_substVars( substVars )
 {
 }
 
 
 VarText::~VarText()
 {
-    // Remove the observers
-    VlcProc *pVlcProc = VlcProc::instance( getIntf() );
-    pVlcProc->getTimeVar().delObserver( this );
-    pVlcProc->getVolumeVar().delObserver( this );
-    pVlcProc->getStreamVar().delObserver( this );
-    VarManager *pVarManager = VarManager::instance( getIntf() );
-    pVarManager->getHelpText().delObserver( this );
+    if( m_substVars )
+    {
+        // Remove the observers
+        VlcProc *pVlcProc = VlcProc::instance( getIntf() );
+        pVlcProc->getTimeVar().delObserver( this );
+        pVlcProc->getVolumeVar().delObserver( this );
+        pVlcProc->getStreamURIVar().delObserver( this );
+        pVlcProc->getStreamNameVar().delObserver( this );
+        VarManager *pVarManager = VarManager::instance( getIntf() );
+        pVarManager->getHelpText().delObserver( this );
+    }
 }
 
 
 const UString VarText::get() const
 {
+    if( !m_substVars )
+    {
+        // Do not substitute "$X" variables
+        return m_text;
+    }
+
     uint32_t pos;
     VlcProc *pVlcProc = VlcProc::instance( getIntf() );
 
@@ -67,8 +76,7 @@ const UString VarText::get() const
     if( (pos = temp.find( "$H" )) != UString::npos )
     {
         VarManager *pVarManager = VarManager::instance( getIntf() );
-        // We use .getRaw() to avoid replacing the $H recursively!
-        temp.replace( pos, 2, pVarManager->getHelpText().getRaw() );
+        temp.replace( pos, 2, pVarManager->getHelpText().get() );
     }
     while( (pos = temp.find( "$T" )) != UString::npos )
     {
@@ -92,13 +100,11 @@ const UString VarText::get() const
     }
     while( (pos = temp.find( "$N" )) != UString::npos )
     {
-        temp.replace( pos, 2,
-                      pVlcProc->getStreamVar().getAsStringName().c_str() );
+        temp.replace( pos, 2, pVlcProc->getStreamNameVar().get() );
     }
     while( (pos = temp.find( "$F" )) != UString::npos )
     {
-        temp.replace( pos, 2,
-                      pVlcProc->getStreamVar().getAsStringFullName().c_str() );
+        temp.replace( pos, 2, pVlcProc->getStreamURIVar().get() );
     }
 
     return temp;
@@ -113,44 +119,48 @@ void VarText::set( const UString &rText )
         return;
     }
 
-    // Stop observing other variables
-    VlcProc *pVlcProc = VlcProc::instance( getIntf() );
-    pVlcProc->getTimeVar().delObserver( this );
-    pVlcProc->getVolumeVar().delObserver( this );
-    pVlcProc->getStreamVar().delObserver( this );
-    VarManager *pVarManager = VarManager::instance( getIntf() );
-    pVarManager->getHelpText().delObserver( this );
-
     m_text = rText;
 
-    // Observe needed variables
-    if( m_text.find( "$H" ) != UString::npos )
-    {
-        pVarManager->getHelpText().addObserver( this );
-    }
-    if( m_text.find( "$T" ) != UString::npos )
+    if( m_substVars )
     {
-        pVlcProc->getTimeVar().addObserver( this );
-    }
-    if( m_text.find( "$L" ) != UString::npos )
-    {
-        pVlcProc->getTimeVar().addObserver( this );
-    }
-    if( m_text.find( "$D" ) != UString::npos )
-    {
-        pVlcProc->getTimeVar().addObserver( this );
-    }
-    if( m_text.find( "$V" ) != UString::npos )
-    {
-        pVlcProc->getVolumeVar().addObserver( this );
-    }
-    if( m_text.find( "$N" ) != UString::npos )
-    {
-        pVlcProc->getStreamVar().addObserver( this );
-    }
-    if( m_text.find( "$F" ) != UString::npos )
-    {
-        pVlcProc->getStreamVar().addObserver( this );
+        // Stop observing other variables
+        VlcProc *pVlcProc = VlcProc::instance( getIntf() );
+        pVlcProc->getTimeVar().delObserver( this );
+        pVlcProc->getVolumeVar().delObserver( this );
+        pVlcProc->getStreamNameVar().delObserver( this );
+        pVlcProc->getStreamURIVar().delObserver( this );
+        VarManager *pVarManager = VarManager::instance( getIntf() );
+        pVarManager->getHelpText().delObserver( this );
+
+        // Observe needed variables
+        if( m_text.find( "$H" ) != UString::npos )
+        {
+            pVarManager->getHelpText().addObserver( this );
+        }
+        if( m_text.find( "$T" ) != UString::npos )
+        {
+            pVlcProc->getTimeVar().addObserver( this );
+        }
+        if( m_text.find( "$L" ) != UString::npos )
+        {
+            pVlcProc->getTimeVar().addObserver( this );
+        }
+        if( m_text.find( "$D" ) != UString::npos )
+        {
+            pVlcProc->getTimeVar().addObserver( this );
+        }
+        if( m_text.find( "$V" ) != UString::npos )
+        {
+            pVlcProc->getVolumeVar().addObserver( this );
+        }
+        if( m_text.find( "$N" ) != UString::npos )
+        {
+            pVlcProc->getStreamNameVar().addObserver( this );
+        }
+        if( m_text.find( "$F" ) != UString::npos )
+        {
+            pVlcProc->getStreamURIVar().addObserver( this );
+        }
     }
 
     notify();
index ac926b3266d07dd730b034e889c50b5045061dcd..9fdb6b81467282d08f09b9d22d16085909d2843e 100755 (executable)
@@ -2,7 +2,7 @@
  * var_text.hpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: var_text.hpp,v 1.2 2004/01/11 17:12:17 asmax Exp $
+ * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -36,7 +36,8 @@ class VarText: public Variable, public Subject<VarText>,
                public Observer<VarPercent>, public Observer< VarText >
 {
     public:
-        VarText( intf_thread_t *pIntf );
+        // Set substVars to true to replace "$X" variables in the text
+        VarText( intf_thread_t *pIntf, bool substVars = true );
         virtual ~VarText();
 
         /// Get the variable type
@@ -57,9 +58,8 @@ class VarText: public Variable, public Subject<VarText>,
         UString m_text;
         /// Actual text after having replaced the variables
         UString m_lastText;
-
-        /// Get the raw text without replacing the $something's
-        const UString &getRaw() const { return m_text; }
+        /// Flag to activate or not "$X" variables substitution
+        bool m_substVars;
 };
 
 #endif
diff --git a/modules/gui/skins2/vars/stream.cpp b/modules/gui/skins2/vars/stream.cpp
deleted file mode 100644 (file)
index e1013aa..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * time.cpp
- *****************************************************************************
- * Copyright (C) 2003 VideoLAN
- * $Id$
- *
- * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#include <stdio.h>  // snprintf
-
-#include "stream.hpp"
-#include "../utils/ustring.hpp"
-#include "../src/os_factory.hpp"
-#include <vlc/input.h>
-
-
-void Stream::set( const UString &name, bool updateVLC )
-{
-    VarText::set( name );
-
-    // Avoid looping forever...
-    if( updateVLC )
-    {
-        // We have nothing to do here, until we decide that the user
-        // can change a stream name on the fly...
-    }
-}
-
-
-const string Stream::getAsStringName() const
-{
-    string fullName = getAsStringFullName();
-
-    // XXX: This should be done in VLC core, not here...
-    // Remove path information if any
-    OSFactory *pFactory = OSFactory::instance( getIntf() );
-    string::size_type pos = fullName.rfind( pFactory->getDirSeparator() );
-    if( pos != string::npos )
-    {
-        fullName = fullName.substr( pos + 1, fullName.size() - pos + 1 );
-    }
-
-    return fullName;
-}
-
-
-const string Stream::getAsStringFullName() const
-{
-    string ret;
-
-    // XXX: we are not using geIntf()->p_sys->p_input direclty here, because it
-    // is not updated by VlcProc yet. Anyway, we shouldn't need to do that,
-    // because VLC core should provide getter functions for the stream name...
-    if( getIntf()->p_sys->p_playlist->p_input == NULL )
-    {
-        ret = "";
-    }
-    else
-    {
-#warning "FIXME!"
-        ret = getIntf()->p_sys->p_playlist->p_input->input.p_item->psz_uri;
-    }
-
-    return ret;
-}
-
diff --git a/modules/gui/skins2/vars/stream.hpp b/modules/gui/skins2/vars/stream.hpp
deleted file mode 100644 (file)
index 4c65407..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * stream.hpp
- *****************************************************************************
- * Copyright (C) 2003 VideoLAN
- * $Id: time.hpp 6996 2004-03-07 12:55:32Z ipkiss $
- *
- * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#ifndef STREAM_HPP
-#define STREAM_HPP
-
-#include "../utils/var_text.hpp"
-#include <string>
-
-class UString;
-
-/// Variable for VLC stream name
-class Stream: public VarText
-{
-    public:
-        Stream( intf_thread_t *pIntf ): VarText( pIntf ) {}
-        virtual ~Stream() {}
-
-        virtual void set( const UString &name, bool updateVLC );
-
-        virtual void set( const UString &name ) { set( name, true ); }
-
-        /// Return current stream name
-        virtual const string getAsStringName() const;
-        /// Return current stream full name (i.e. including path)
-        virtual const string getAsStringFullName() const;
-};
-
-#endif