[vlc-devel] [PATCH v2 2/3] Additions to the new soutmrl implementation

Jérôme Froissart software at froissart.eu
Thu Oct 17 17:11:25 CEST 2019


---
 modules/gui/qt/util/soutmrl.cpp |  5 +++++
 modules/gui/qt/util/soutmrl.hpp | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/modules/gui/qt/util/soutmrl.cpp b/modules/gui/qt/util/soutmrl.cpp
index 5452f8cccb..d20873ab89 100644
--- a/modules/gui/qt/util/soutmrl.cpp
+++ b/modules/gui/qt/util/soutmrl.cpp
@@ -65,6 +65,11 @@ void MrlModule::option( const QString& option )
     options.append( OptionPairType( option, "" ) );
 }
 
+QString SoutMrl::getHeader() const
+{
+    return hdr;
+}
+
 QString SoutMrl::getMrl() const
 {
     QString mrl = hdr;
diff --git a/modules/gui/qt/util/soutmrl.hpp b/modules/gui/qt/util/soutmrl.hpp
index 00097ce82a..845e7f78bd 100644
--- a/modules/gui/qt/util/soutmrl.hpp
+++ b/modules/gui/qt/util/soutmrl.hpp
@@ -105,6 +105,17 @@ public:
     {
     }
 
+    void clear()
+    {
+        hdr = "";
+        modules.clear();
+    }
+
+    void header( const QString& newHeader )
+    {
+        hdr = newHeader;
+    }
+
     MrlModule& begin( const QString& module )
     {
         modules.append( MrlModule( module ) );
@@ -116,6 +127,11 @@ public:
     {
     }
 
+    void module( const MrlModule& module )
+    {
+        modules.append( module );
+    }
+
     // These should be only in MRLModule, but they are kept in this parent class for compatibility with an older API
     void option( const QString& name, const QString& value = "" );
     void option( const QString& name, const int i_value, const int i_precision = 10 );
@@ -123,6 +139,7 @@ public:
     void option( const QString& name, const QString& base, const int i_value, const int i_precision = 10 );
     void option( const QString& name, const MrlModule& nested );
 
+    QString getHeader() const;
     QString getMrl() const;
 
 private:
-- 
2.20.1



More information about the vlc-devel mailing list