Commit 860fdb79 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt4 - Sout: icecast patch mostly rewritten...

parent 068b5be2
......@@ -2,11 +2,15 @@
* sout.cpp : Stream output dialog ( old-style )
****************************************************************************
* Copyright ( C ) 2006 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux
*
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Jean-François Massol <jf.massol -at- gmail.com>
* Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -95,20 +99,21 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
#define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );
// /* Output */
CB( fileOutput ); CB( HTTPOutput ); CB( localOutput );
CB( RTPOutput ); CB( MMSHOutput ); CB( rawInput ); CB( UDPOutput );
CT( fileEdit ); CT( HTTPEdit ); CT( RTPEdit ); CT( MMSHEdit ); CT( UDPEdit );
CS( HTTPPort ); CS( RTPPort ); CS( MMSHPort ); CS( UDPPort );
CB( fileOutput ); CB( HTTPOutput ); CB( localOutput );
CB( RTPOutput ); CB( MMSHOutput ); CB( rawInput ); CB( UDPOutput );
CT( fileEdit ); CT( HTTPEdit ); CT( RTPEdit ); CT( MMSHEdit ); CT( UDPEdit );
CT( IcecastEdit ); CT( IcecastMountpointEdit ); CT( IcecastNamePassEdit );
CS( HTTPPort ); CS( RTPPort ); CS( MMSHPort ); CS( UDPPort );
// /* Transcode */
CC( vCodecBox ); CC( subsCodecBox ); CC( aCodecBox ) ;
CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs );
CC( vCodecBox ); CC( subsCodecBox ); CC( aCodecBox ) ;
CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs );
// CB( sOverlay );
CS( vBitrateSpin ); CS( aBitrateSpin ); CS( aChannelsSpin ); CC( vScaleBox );
CS( vBitrateSpin ); CS( aBitrateSpin ); CS( aChannelsSpin ); CC( vScaleBox );
// /* Mux */
CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux );
CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux );
CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux );
CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux );
// /* Misc */
CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
//
CONNECT( ui.profileBox, activated( const QString & ), this, setOptions() );
CONNECT( ui.fileSelectButton, clicked() , this, fileBrowse() );
......@@ -259,6 +264,7 @@ void SoutDialog::updateMRL()
sout.b_file = ui.fileOutput->isChecked();
sout.b_http = ui.HTTPOutput->isChecked();
sout.b_mms = ui.MMSHOutput->isChecked();
sout.b_icecast = ui.IcecastOutput->isChecked();
sout.b_rtp = ui.RTPOutput->isChecked();
sout.b_udp = ui.UDPOutput->isChecked();
sout.b_sap = ui.sap->isChecked();
......@@ -271,10 +277,15 @@ void SoutDialog::updateMRL()
sout.psz_mms = strdup( qtu( ui.MMSHEdit->text() ) );
sout.psz_rtp = strdup( qtu( ui.RTPEdit->text() ) );
sout.psz_udp = strdup( qtu( ui.UDPEdit->text() ) );
sout.psz_icecast = strdup( qtu( ui.IcecastEdit->text() ) );
sout.sa_icecast.psz_username = strdup( qtu( ui.IcecastNamePassEdit->text() ) );
sout.sa_icecast.psz_password = strdup( qtu( ui.IcecastNamePassEdit->text() ) );
sout.psz_icecast_mountpoint = strdup( qtu( ui.IcecastMountpointEdit->text() ) );
sout.i_http = ui.HTTPPort->value();
sout.i_mms = ui.MMSHPort->value();
sout.i_rtp = ui.RTPPort->value();
sout.i_udp = ui.UDPPort->value();
sout.i_icecast = ui.IcecastPort->value();
sout.i_ab = ui.aBitrateSpin->value();
sout.i_vb = ui.vBitrateSpin->value();
sout.i_channels = ui.aChannelsSpin->value();
......@@ -282,23 +293,13 @@ void SoutDialog::updateMRL()
sout.psz_group = strdup( qtu( ui.sapGroup->text() ) );
sout.psz_name = strdup( qtu( ui.sapName->text() ) );
#define COUNT() \
{ \
if ( sout.b_local ) \
counter += 1; \
if ( sout.b_file ) \
counter += 1; \
if ( sout.b_http ) \
counter += 1; \
if ( sout.b_mms ) \
counter += 1; \
if ( sout.b_rtp ) \
counter += 1; \
if ( sout.b_udp ) \
counter += 1; \
}
COUNT()
if ( sout.b_local ) counter++ ;
if ( sout.b_file ) counter++ ;
if ( sout.b_http ) counter++ ;
if ( sout.b_mms ) counter++ ;
if ( sout.b_rtp ) counter++ ;
if ( sout.b_udp ) counter ++;
if ( sout.b_icecast ) counter ++;
#define SMUX( x, txt ) if( ui.x->isChecked() ) sout.psz_mux = strdup( txt );
SMUX( PSMux, "ps" );
......@@ -489,4 +490,6 @@ COUNT()
free( sout.psz_file );free( sout.psz_http ); free( sout.psz_mms );
free( sout.psz_rtp ); free( sout.psz_udp ); free( sout.psz_mux );
free( sout.psz_name ); free( sout.psz_group );
free( sout.psz_icecast ); free( sout.psz_icecast_mountpoint );
free( sout.sa_icecast.psz_password ); free( sout.sa_icecast.psz_username );
}
......@@ -277,7 +277,7 @@
</property>
</widget>
</item>
<item row="5" column="0" >
<item row="7" column="0" >
<widget class="QCheckBox" name="UDPOutput" >
<property name="toolTip" >
<string>_("Using this option is not recommended in most of the cases.")</string>
......@@ -287,17 +287,17 @@
</property>
</widget>
</item>
<item row="5" column="1" >
<item row="7" column="1" >
<widget class="QLabel" name="UDPLabel" >
<property name="text" >
<string>_("Address")</string>
</property>
</widget>
</item>
<item row="5" column="2" >
<item row="7" column="2" >
<widget class="QLineEdit" name="UDPEdit" />
</item>
<item row="5" column="3" >
<item row="7" column="3" >
<widget class="QLabel" name="UDPPortLabel" >
<property name="text" >
<string>_("Port")</string>
......@@ -307,7 +307,7 @@
</property>
</widget>
</item>
<item row="5" column="4" >
<item row="7" column="4" >
<widget class="QSpinBox" name="UDPPort" >
<property name="maximumSize" >
<size>
......@@ -332,6 +332,91 @@
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="IcecastOutput" >
<property name="text" >
<string>IceCast</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLabel" name="IcecastLabel" >
<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="IcecastEdit" />
</item>
<item row="5" column="3" >
<widget class="QLabel" name="IcecastPortLabel" >
<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="IcecastPort" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="maximumSize" >
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>1024</number>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLabel" name="IcecastMountpointLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>_("Mount Point")</string>
</property>
</widget>
</item>
<item row="6" column="2" >
<widget class="QLineEdit" name="IcecastMountpointEdit" />
</item>
<item row="6" column="3" >
<widget class="QLabel" name="IcecastNameLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>_("Login:pass:")</string>
</property>
</widget>
</item>
<item row="6" column="4" >
<widget class="QLineEdit" name="IcecastNamePassEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
......@@ -1225,5 +1310,133 @@
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>96</x>
<y>171</y>
</hint>
<hint type="destinationlabel" >
<x>296</x>
<y>171</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>96</x>
<y>171</y>
</hint>
<hint type="destinationlabel" >
<x>227</x>
<y>171</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastPortLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>96</x>
<y>171</y>
</hint>
<hint type="destinationlabel" >
<x>377</x>
<y>171</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastPort</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>96</x>
<y>171</y>
</hint>
<hint type="destinationlabel" >
<x>488</x>
<y>171</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastMountpointEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>91</x>
<y>154</y>
</hint>
<hint type="destinationlabel" >
<x>306</x>
<y>175</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastMountpointLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>91</x>
<y>154</y>
</hint>
<hint type="destinationlabel" >
<x>226</x>
<y>175</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastNameLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>91</x>
<y>154</y>
</hint>
<hint type="destinationlabel" >
<x>388</x>
<y>175</y>
</hint>
</hints>
</connection>
<connection>
<sender>IcecastOutput</sender>
<signal>clicked(bool)</signal>
<receiver>IcecastNamePassEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>91</x>
<y>154</y>
</hint>
<hint type="destinationlabel" >
<x>526</x>
<y>175</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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