[vlc-devel] commit: Qt4: implement SAP in the streaming wizard ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Dec 1 21:42:53 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec 1 22:42:14 2009 +0200| [a60bd74cc306813d96bec9c838924c28a2d72b5a] | committer: Rémi Denis-Courmont
Qt4: implement SAP in the streaming wizard
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a60bd74cc306813d96bec9c838924c28a2d72b5a
---
modules/gui/qt4/dialogs/sout.cpp | 27 +++++++++++++++++++++++----
modules/stream_out/standard.c | 2 ++
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index 9410fcc..92490bd 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -245,10 +245,29 @@ void SoutDialog::updateMRL()
mrl = smrl.getMrl();
- /* FIXME, deal with SAP
- sout.b_sap = ui.sap->isChecked();
- sout.psz_group = strdup( qtu( ui.sapGroup->text() ) );
- sout.psz_name = strdup( qtu( ui.sapName->text() ) ); */
+ if( ui.sap->isChecked() )
+ {
+ QString group = ui.sapGroup->text();
+ QString name = ui.sapName->text();
+
+ /* FIXME: This sucks. We should really return a QStringList instead of
+ * (mis)quoting, concatainating and split input item paramters. */
+ name = name.replace( " ", " " );
+ group = group.replace( " ", " " );
+
+ /* We need to add options for both standard and rtp targets */
+ /* This is inelegant but simple and functional */
+ mrl.append( qfu( " :sout-rtp-sap" ) );
+ mrl.append( qfu( " :sout-rtp-name=" ) + name );
+ mrl.append( qfu( " :sout-standard-sap" ) );
+ mrl.append( qfu( " :sout-standard-name=" ) + name );
+ mrl.append( qfu( " :sout-standard-group=" ) + group );
+ }
+ else
+ {
+ mrl.append( qfu( " :no-sout-rtp-sap" ) );
+ mrl.append( qfu( " :no-sout-standard-sap" ) );
+ }
if( ui.soutAll->isChecked() ) mrl.append( " :sout-all" );
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 98df673..8225c7d 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -182,6 +182,8 @@ static int Open( vlc_object_t *p_this )
const char *psz_mux_byext = NULL;
+ (void)p_stream->psz_object_name;
+
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
More information about the vlc-devel
mailing list