From: Rémi Denis-Courmont Date: Tue, 1 Dec 2009 20:42:14 +0000 (+0200) Subject: Qt4: implement SAP in the streaming wizard X-Git-Tag: 1.1.0-ff~2297 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a60bd74cc306813d96bec9c838924c28a2d72b5a;p=vlc Qt4: implement SAP in the streaming wizard --- diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp index 9410fccaf3..92490bd5f9 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 98df673758..8225c7d288 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 );