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,18 +291,20 @@ void SoutDialog::updateMRL() ...@@ -288,18 +291,20 @@ 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 ) \
counter += 1; \ counter += 1; \
if ( sout.b_http ) \ if ( sout.b_http ) \
counter += 1; \ counter += 1; \
if ( sout.b_mms ) \ if ( sout.b_mms ) \
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,11 +373,12 @@ COUNT() ...@@ -368,11 +373,12 @@ COUNT()
mrl.append( "dst=" ); \ mrl.append( "dst=" ); \
} }
if ( trans )
{ if ( trans )
mrl.append( ":" ); {
} mrl.append( ":" );
else }
else
{ {
mrl = ":sout=#"; mrl = ":sout=#";
} }
...@@ -386,15 +392,15 @@ COUNT() ...@@ -386,15 +392,15 @@ COUNT()
{ {
ISMORE(); ISMORE();
ATLEASTONE() ATLEASTONE()
mrl.append( "display" ); mrl.append( "display" );
more = true; more = true;
} }
if ( sout.b_file ) if ( sout.b_file )
{ {
ISMORE(); ISMORE();
ATLEASTONE() ATLEASTONE()
mrl.append( "std{access=file,mux=" ); mrl.append( "std{access=file,mux=" );
mrl.append( sout.psz_mux ); mrl.append( sout.psz_mux );
mrl.append( ",dst=" ); mrl.append( ",dst=" );
mrl.append( sout.psz_file ); mrl.append( sout.psz_file );
...@@ -406,7 +412,7 @@ COUNT() ...@@ -406,7 +412,7 @@ COUNT()
{ {
ISMORE(); ISMORE();
ATLEASTONE() ATLEASTONE()
mrl.append( "std{access=http,mux=" ); mrl.append( "std{access=http,mux=" );
mrl.append( sout.psz_mux ); mrl.append( sout.psz_mux );
mrl.append( ",dst=" ); mrl.append( ",dst=" );
mrl.append( sout.psz_http ); mrl.append( sout.psz_http );
...@@ -420,7 +426,7 @@ COUNT() ...@@ -420,7 +426,7 @@ COUNT()
{ {
ISMORE(); ISMORE();
ATLEASTONE() ATLEASTONE()
mrl.append( "std{access=mmsh,mux=" ); mrl.append( "std{access=mmsh,mux=" );
mrl.append( sout.psz_mux ); mrl.append( sout.psz_mux );
mrl.append( ",dst=" ); mrl.append( ",dst=" );
mrl.append( sout.psz_mms ); mrl.append( sout.psz_mms );
...@@ -434,12 +440,26 @@ COUNT() ...@@ -434,12 +440,26 @@ COUNT()
{ {
ISMORE(); ISMORE();
ATLEASTONE() ATLEASTONE()
mrl.append( "rtp{mux=" ); mrl.append( "rtp{mux=" );
mrl.append( sout.psz_mux ); mrl.append( sout.psz_mux );
mrl.append( ",dst=" ); mrl.append( ",dst=" );
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 );
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>617</width> <width>617</width>
<height>653</height> <height>678</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -33,13 +33,10 @@ ...@@ -33,13 +33,10 @@
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="1" column="1" > <item row="0" column="0" >
<widget class="QLabel" name="fileLabel" > <widget class="QCheckBox" name="localOutput" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" > <property name="text" >
<string>_("Filename")</string> <string>_("Play locally")</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -53,31 +50,30 @@ ...@@ -53,31 +50,30 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="4" > <item row="1" column="1" >
<widget class="QSpinBox" name="HTTPPort" > <widget class="QLabel" name="fileLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="maximumSize" > <property name="text" >
<size> <string>_("Filename")</string>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="minimum" >
<number>1</number>
</property> </property>
<property name="maximum" > </widget>
<number>65535</number> </item>
<item row="1" column="2" >
<widget class="QLineEdit" name="fileEdit" >
<property name="enabled" >
<bool>false</bool>
</property> </property>
<property name="singleStep" > </widget>
<number>1</number> </item>
<item row="1" column="3" >
<widget class="QPushButton" name="fileSelectButton" >
<property name="enabled" >
<bool>false</bool>
</property> </property>
<property name="value" > <property name="text" >
<number>8080</number> <string>_("Browse...")</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -91,15 +87,32 @@ ...@@ -91,15 +87,32 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2" > <item row="2" column="0" >
<widget class="QLineEdit" name="fileEdit" > <widget class="QCheckBox" name="HTTPOutput" >
<property name="text" >
<string>HTTP</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="HTTPLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text" >
<string>_("Address")</string>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="3" > <item row="2" column="2" >
<widget class="QLabel" name="MMSHPortLabel" > <widget class="QLineEdit" name="HTTPEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="3" >
<widget class="QLabel" name="HTTPPortLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -111,20 +124,31 @@ ...@@ -111,20 +124,31 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1" > <item row="2" column="4" >
<widget class="QLabel" name="MMSHLabel" > <widget class="QSpinBox" name="HTTPPort" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text" > <property name="maximumSize" >
<string>_("Address")</string> <size>
<width>90</width>
<height>16777215</height>
</size>
</property> </property>
</widget> <property name="alignment" >
</item> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<item row="0" column="0" > </property>
<widget class="QCheckBox" name="localOutput" > <property name="minimum" >
<property name="text" > <number>1</number>
<string>_("Play locally")</string> </property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="singleStep" >
<number>1</number>
</property>
<property name="value" >
<number>8080</number>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -135,57 +159,58 @@ ...@@ -135,57 +159,58 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3" > <item row="3" column="1" >
<widget class="QPushButton" name="fileSelectButton" > <widget class="QLabel" name="MMSHLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text" > <property name="text" >
<string>_("Browse...")</string> <string>_("Address")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2" > <item row="3" column="2" >
<widget class="QLineEdit" name="HTTPEdit" > <widget class="QLineEdit" name="MMSHEdit" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="3" column="3" >
<widget class="QLabel" name="HTTPLabel" > <widget class="QLabel" name="MMSHPortLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text" > <property name="text" >
<string>_("Address")</string> <string>_("Port:")</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3" > <item row="3" column="4" >
<widget class="QLabel" name="HTTPPortLabel" > <widget class="QSpinBox" name="MMSHPort" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text" > <property name="maximumSize" >
<string>_("Port:")</string> <size>
<width>90</width>
<height>16777215</height>
</size>
</property> </property>
<property name="alignment" > <property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> <property name="minimum" >
</item> <number>1</number>
<item row="3" column="2" >
<widget class="QLineEdit" name="MMSHEdit" >
<property name="enabled" >
<bool>false</bool>
</property> </property>
</widget> <property name="maximum" >
</item> <number>65535</number>
<item row="2" column="0" > </property>
<widget class="QCheckBox" name="HTTPOutput" > <property name="value" >
<property name="text" > <number>1234</number>
<string>HTTP</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -206,6 +231,13 @@ ...@@ -206,6 +231,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="2" >
<widget class="QLineEdit" name="RTPEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="3" > <item row="4" column="3" >
<widget class="QLabel" name="RTPPortLabel" > <widget class="QLabel" name="RTPPortLabel" >
<property name="enabled" > <property name="enabled" >
...@@ -219,15 +251,8 @@ ...@@ -219,15 +251,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="2" > <item row="4" column="4" >
<widget class="QLineEdit" name="RTPEdit" > <widget class="QSpinBox" name="RTPPort" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="4" >
<widget class="QSpinBox" name="MMSHPort" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -251,8 +276,45 @@ ...@@ -251,8 +276,45 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="4" > <item row="5" column="0" >
<widget class="QSpinBox" name="RTPPort" > <widget class="QCheckBox" name="UDPOutput" >
<property name="text" >
<string>UDP</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLabel" name="UDPLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>_("Address")</string>
</property>
</widget>
</item>
<item row="5" column="2" >
<widget class="QLineEdit" name="UDPEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="3" >
<widget class="QLabel" name="UDPPortLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>_("Port")</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="4" >
<widget class="QSpinBox" name="UDPPort" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -265,6 +327,9 @@ ...@@ -265,6 +327,9 @@
<property name="alignment" > <property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
<property name="accelerated" >
<bool>true</bool>
</property>
<property name="minimum" > <property name="minimum" >
<number>1</number> <number>1</number>
</property> </property>
......
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