[vlmc-devel] Media: Remove old and useless methods.

Hugo Beauzée-Luyssen git at videolan.org
Mon Sep 24 22:35:36 CEST 2012


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Sep 24 22:10:31 2012 +0300| [c8fb73a17014ba9257539c2679844c91311687d3] | committer: Hugo Beauzée-Luyssen

Media: Remove old and useless methods.

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

 src/Media/Media.cpp             |   21 ---------------------
 src/Media/Media.h               |   11 -----------
 src/Metadata/MetaDataWorker.cpp |    2 +-
 3 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/src/Media/Media.cpp b/src/Media/Media.cpp
index 624f7b8..93e566e 100644
--- a/src/Media/Media.cpp
+++ b/src/Media/Media.cpp
@@ -102,27 +102,6 @@ Media::computeFileType()
         qDebug() << "What the hell is this extension? And how did you loaded it?!";
 }
 
-void
-Media::flushVolatileParameters()
-{
-    foreach ( const QString &defaultValue, m_volatileParameters )
-        m_vlcMedia->addOption( defaultValue.toUtf8().constData() );
-    m_volatileParameters.clear();
-}
-
-void
-Media::addVolatileParam( const QString& param, const QString& defaultValue )
-{
-    m_vlcMedia->addOption( param.toUtf8().constData() );
-    m_volatileParameters.append( defaultValue );
-}
-
-void
-Media::addConstantParam( const QString& param )
-{
-    m_vlcMedia->addOption( param.toUtf8().constData() );
-}
-
 const QFileInfo*
 Media::fileInfo() const
 {
diff --git a/src/Media/Media.h b/src/Media/Media.h
index 03fee55..23a5e3a 100644
--- a/src/Media/Media.h
+++ b/src/Media/Media.h
@@ -82,16 +82,6 @@ public:
     Media( const QString& filePath );
     virtual ~Media();
 
-    /**
-     *  \brief  This method adds a parameter that will stay constant though the whole life
-     *          of this media (unless it is explicitely overided), even if it is cloned.
-     */
-    void                        addConstantParam( const QString& param );
-    /**
-     *  \brief  This method will add a parameter that will be restored to defaultValue when the flushVolatileParameter is called
-     */
-    void                        addVolatileParam( const QString& param, const QString& defaultValue );
-    void                        flushVolatileParameters();
     LibVLCpp::Media             *vlcMedia() { return m_vlcMedia; }
 
     const QFileInfo             *fileInfo() const;
@@ -166,7 +156,6 @@ private:
 protected:
     LibVLCpp::Media*            m_vlcMedia;
     QString                     m_mrl;
-    QStringList                 m_volatileParameters;
     QFileInfo*                  m_fileInfo;
     qint64                      m_lengthMS;
     qint64                      m_nbFrames;
diff --git a/src/Metadata/MetaDataWorker.cpp b/src/Metadata/MetaDataWorker.cpp
index c7e2f81..878fe3a 100644
--- a/src/Metadata/MetaDataWorker.cpp
+++ b/src/Metadata/MetaDataWorker.cpp
@@ -67,7 +67,7 @@ MetaDataWorker::run()
 
     m_mediaPlayer->configureWaitForEvent( libvlc_MediaPlayerTimeChanged, cancel, &checkEvent );
 
-    m_media->addConstantParam( ":vout=dummy" );
+    m_media->vlcMedia()->addOption( ":vout=dummy" );
     // In VLC 2.x we can't set the volume before the playback has started
     // so just switch off the audio-output in any case.
     m_mediaPlayer->setAudioOutput( "dummy" );



More information about the Vlmc-devel mailing list