[vlc-commits] commit: qt4_vlm: fix #3938 (options must be removed from the input) ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Wed Jul 28 00:10:53 CEST 2010
vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 26 22:16:15 2010 +0200| [a33d8caae3a6cd5912083bf2d01ea7999b57f9ca] | committer: Jean-Baptiste Kempf
qt4_vlm: fix #3938 (options must be removed from the input)
(cherry picked from commit df316b5efcba5b2b50b9e27ba2f21574f21f5207)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=a33d8caae3a6cd5912083bf2d01ea7999b57f9ca
---
modules/gui/qt4/dialogs/vlm.cpp | 60 +++++++++++++++++++++++++++++++++------
1 files changed, 51 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp
index ef02c6c..af8adea 100644
--- a/modules/gui/qt4/dialogs/vlm.cpp
+++ b/modules/gui/qt4/dialogs/vlm.cpp
@@ -672,9 +672,23 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input,
command = "setup \"" + name + "\" inputdel all";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message );
- command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
+
if( !output.isEmpty() )
{
command = "setup \"" + name + "\" output \"" + output + "\"";
@@ -745,9 +759,23 @@ void VLMWrapper::EditVod( const QString& name, const QString& input,
const QString& mux )
{
vlm_message_t *message;
- QString command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+ QString command;
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
if( !output.isEmpty() )
{
@@ -791,9 +819,23 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
const QString& mux )
{
vlm_message_t *message;
- QString command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+ QString command;
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
if( !output.isEmpty() )
{
More information about the vlc-commits
mailing list