Commit e6226298 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Sout: UDP is back

parent 55b36061
...@@ -95,9 +95,9 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -95,9 +95,9 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() ); #define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );
// /* Output */ // /* Output */
CB( fileOutput ); CB( HTTPOutput ); CB( localOutput ); CB( fileOutput ); CB( HTTPOutput ); CB( localOutput );
CB( RTPOutput ); CB( MMSHOutput ); CB( rawInput ); CB( RTPOutput ); CB( MMSHOutput ); CB( rawInput ); CB( UDPOutput );
CT( fileEdit ); CT( HTTPEdit ); CT( RTPEdit ); CT( MMSHEdit ); CT( fileEdit ); CT( HTTPEdit ); CT( RTPEdit ); CT( MMSHEdit ); CT( UDPEdit );
CS( HTTPPort ); CS( RTPPort ); CS( MMSHPort ); CS( HTTPPort ); CS( RTPPort ); CS( MMSHPort ); CS( UDPPort );
// /* Transcode */ // /* Transcode */
CC( vCodecBox ); CC( subsCodecBox ); CC( aCodecBox ) ; CC( vCodecBox ); CC( subsCodecBox ); CC( aCodecBox ) ;
CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs ); CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs );
...@@ -230,11 +230,11 @@ void SoutDialog::setOptions() ...@@ -230,11 +230,11 @@ void SoutDialog::setOptions()
void SoutDialog::toggleSout() void SoutDialog::toggleSout()
{ {
//Toggle all the streaming options. //Toggle all the streaming options.
TOGGLEV( ui.HTTPOutput ) ; TOGGLEV( ui.RTPOutput ) ; TOGGLEV( ui.MMSHOutput ) ; TOGGLEV( ui.HTTPOutput ) ; TOGGLEV( ui.RTPOutput ) ; TOGGLEV( ui.MMSHOutput ) ; TOGGLEV( ui.UDPOutput ) ;
TOGGLEV( ui.HTTPEdit ) ; TOGGLEV( ui.RTPEdit ) ; TOGGLEV( ui.MMSHEdit ) ; TOGGLEV( ui.HTTPEdit ) ; TOGGLEV( ui.RTPEdit ) ; TOGGLEV( ui.MMSHEdit ) ; TOGGLEV( ui.UDPEdit ) ;
TOGGLEV( ui.HTTPLabel ) ; TOGGLEV( ui.RTPLabel ) ; TOGGLEV( ui.MMSHLabel ) ; TOGGLEV( ui.HTTPLabel ) ; TOGGLEV( ui.RTPLabel ) ; TOGGLEV( ui.MMSHLabel ) ; TOGGLEV( ui.UDPLabel ) ;
TOGGLEV( ui.HTTPPortLabel ) ; TOGGLEV( ui.RTPPortLabel ) ; TOGGLEV( ui.MMSHPortLabel ) ; TOGGLEV( ui.HTTPPortLabel ) ; TOGGLEV( ui.RTPPortLabel ) ; TOGGLEV( ui.MMSHPortLabel ) ; TOGGLEV( ui.UDPPortLabel )
TOGGLEV( ui.HTTPPort ) ; TOGGLEV( ui.RTPPort ) ; TOGGLEV( ui.MMSHPort ) ; TOGGLEV( ui.HTTPPort ) ; TOGGLEV( ui.RTPPort ) ; TOGGLEV( ui.MMSHPort ) ; TOGGLEV( ui.UDPPort ) ;
TOGGLEV( ui.sap ); TOGGLEV( ui.sapName ); TOGGLEV( ui.sap ); TOGGLEV( ui.sapName );
TOGGLEV( ui.sapGroup ); TOGGLEV( ui.sapGroupLabel ); TOGGLEV( ui.sapGroup ); TOGGLEV( ui.sapGroupLabel );
...@@ -268,6 +268,7 @@ void SoutDialog::updateMRL() ...@@ -268,6 +268,7 @@ void SoutDialog::updateMRL()
sout.b_http = ui.HTTPOutput->isChecked(); sout.b_http = ui.HTTPOutput->isChecked();
sout.b_mms = ui.MMSHOutput->isChecked(); sout.b_mms = ui.MMSHOutput->isChecked();
sout.b_rtp = ui.RTPOutput->isChecked(); sout.b_rtp = ui.RTPOutput->isChecked();
sout.b_udp = ui.UDPOutput->isChecked();
sout.b_sap = ui.sap->isChecked(); sout.b_sap = ui.sap->isChecked();
sout.b_all_es = ui.soutAll->isChecked(); sout.b_all_es = ui.soutAll->isChecked();
sout.psz_vcodec = strdup( qtu( ui.vCodecBox->itemData( ui.vCodecBox->currentIndex() ).toString() ) ); sout.psz_vcodec = strdup( qtu( ui.vCodecBox->itemData( ui.vCodecBox->currentIndex() ).toString() ) );
...@@ -277,9 +278,11 @@ void SoutDialog::updateMRL() ...@@ -277,9 +278,11 @@ void SoutDialog::updateMRL()
sout.psz_http = strdup( qtu( ui.HTTPEdit->text() ) ); sout.psz_http = strdup( qtu( ui.HTTPEdit->text() ) );
sout.psz_mms = strdup( qtu( ui.MMSHEdit->text() ) ); sout.psz_mms = strdup( qtu( ui.MMSHEdit->text() ) );
sout.psz_rtp = strdup( qtu( ui.RTPEdit->text() ) ); sout.psz_rtp = strdup( qtu( ui.RTPEdit->text() ) );
sout.psz_udp = strdup( qtu( ui.UDPEdit->text() ) );
sout.i_http = ui.HTTPPort->value(); sout.i_http = ui.HTTPPort->value();
sout.i_mms = ui.MMSHPort->value(); sout.i_mms = ui.MMSHPort->value();
sout.i_rtp = ui.RTPPort->value(); sout.i_rtp = ui.RTPPort->value();
sout.i_udp = ui.UDPPort->value();
sout.i_ab = ui.aBitrateSpin->value(); sout.i_ab = ui.aBitrateSpin->value();
sout.i_vb = ui.vBitrateSpin->value(); sout.i_vb = ui.vBitrateSpin->value();
sout.i_channels = ui.aChannelsSpin->value(); sout.i_channels = ui.aChannelsSpin->value();
...@@ -288,7 +291,7 @@ void SoutDialog::updateMRL() ...@@ -288,7 +291,7 @@ void SoutDialog::updateMRL()
sout.psz_name = strdup( qtu( ui.sapName->text() ) ); sout.psz_name = strdup( qtu( ui.sapName->text() ) );
#define COUNT() \ #define COUNT() \
{ \ { \
if ( sout.b_local ) \ if ( sout.b_local ) \
counter += 1; \ counter += 1; \
if ( sout.b_file ) \ if ( sout.b_file ) \
...@@ -299,7 +302,9 @@ void SoutDialog::updateMRL() ...@@ -299,7 +302,9 @@ void SoutDialog::updateMRL()
counter += 1; \ counter += 1; \
if ( sout.b_rtp ) \ if ( sout.b_rtp ) \
counter += 1; \ counter += 1; \
} if ( sout.b_udp ) \
counter += 1; \
}
COUNT() COUNT()
...@@ -357,7 +362,7 @@ COUNT() ...@@ -357,7 +362,7 @@ COUNT()
mrl.append( "}" ); mrl.append( "}" );
} }
if ( sout.b_local || sout.b_file || sout.b_http || sout.b_mms || sout.b_rtp ) if ( sout.b_local || sout.b_file || sout.b_http || sout.b_mms || sout.b_rtp || sout.b_udp )
{ {
#define ISMORE() if ( more ) mrl.append( "," ); #define ISMORE() if ( more ) mrl.append( "," );
...@@ -368,6 +373,7 @@ COUNT() ...@@ -368,6 +373,7 @@ COUNT()
mrl.append( "dst=" ); \ mrl.append( "dst=" ); \
} }
if ( trans ) if ( trans )
{ {
mrl.append( ":" ); mrl.append( ":" );
...@@ -440,6 +446,20 @@ COUNT() ...@@ -440,6 +446,20 @@ COUNT()
mrl.append( sout.psz_rtp ); mrl.append( sout.psz_rtp );
mrl.append( ":" ); mrl.append( ":" );
mrl.append( QString::number( sout.i_rtp,10 ) ); mrl.append( QString::number( sout.i_rtp,10 ) );
mrl.append( "}" );
more = true;
}
if ( sout.b_udp )
{
ISMORE();
ATLEASTONE()
mrl.append( "std{access=udp,mux=" );
mrl.append( sout.psz_mux );
mrl.append( ",dst=" );
mrl.append( sout.psz_udp );
mrl.append( ":" );
mrl.append( QString::number( sout.i_udp,10 ) );
if ( sout.b_sap ) if ( sout.b_sap )
{ {
mrl.append( ",sap," ); mrl.append( ",sap," );
...@@ -466,6 +486,6 @@ COUNT() ...@@ -466,6 +486,6 @@ COUNT()
ui.mrlEdit->setText( mrl ); ui.mrlEdit->setText( mrl );
free( sout.psz_acodec ); free( sout.psz_vcodec ); free( sout.psz_scodec ); free( sout.psz_acodec ); free( sout.psz_vcodec ); free( sout.psz_scodec );
free( sout.psz_file );free( sout.psz_http ); free( sout.psz_mms ); free( sout.psz_file );free( sout.psz_http ); free( sout.psz_mms );
free( sout.psz_rtp ); free( sout.psz_mux ); free( sout.psz_rtp ); free( sout.psz_udp ); free( sout.psz_mux );
free( sout.psz_name ); free( sout.psz_group ); free( sout.psz_name ); free( sout.psz_group );
} }
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment