#include <QString>
#include <QFileDialog>
#include <QToolButton>
+#include <QSpinBox>
#include <assert.h>
SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString& inputMRL )
ui.destBox->addItem( qtr( "File" ) );
ui.destBox->addItem( "HTTP" );
ui.destBox->addItem( "MS-WMSP (MMSH)" );
- ui.destBox->addItem( "RTP / Transport Stream" );
+ ui.destBox->addItem( "RTSP" );
+ ui.destBox->addItem( "RTP / MPEG Transport Stream" );
+ ui.destBox->addItem( "RTP Audio/Video Profile" );
ui.destBox->addItem( "UDP (legacy)" );
ui.destBox->addItem( "IceCast" );
/* Misc */
CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
- CB( localOutput );
+ CB( localOutput ); CB( transcodeBox );
CONNECT( ui.profileSelect, optionsChanged(), this, updateMRL() );
okButton = new QPushButton( qtr( "&Stream" ) );
caption = qfu( "WMSP" );
break;
case 3:
- db = new RTPDestBox( this );
- caption = "RTP/TS";
+ db = new RTSPDestBox( this );
+ caption = qfu( "RTSP" );
break;
case 4:
+ db = new RTPDestBox( this, "ts" );
+ caption = "RTP/TS";
+ break;
+ case 5:
+ db = new RTPDestBox( this );
+ caption = "RTP/AVP";
+ break;
+ case 6:
db = new UDPDestBox( this );
caption = "UDP";
break;
- case 5:
+ case 7:
db = new ICEDestBox( this );
caption = "Icecast";
break;
for( int i = 1; i < ui.destTab->count(); i++ )
{
VirtualDestBox *vdb = qobject_cast<VirtualDestBox *>(ui.destTab->widget( i ));
- QString tempMRL = vdb->getMRL( qs_mux );
+ if( !vdb )
+ continue;
+ QString tempMRL = vdb->getMRL( qs_mux );
if( tempMRL.isEmpty() ) continue;
+
if( multi )
smrl.option( "dst", tempMRL );
else
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" );
- if( ui.soutAll->isChecked() ) mrl.append( " :sout-all" );
+ if( ui.ttl->value() != 1 ) mrl.append( " :ttl=" + ui.ttl->value() );
mrl.append( " :sout-keep" );