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

qt4 - Sout: trailing spaces.

parent 04d35956
/***************************************************************************** /*****************************************************************************
* sout.cpp : Stream output dialog (old-style) * sout.cpp : Stream output dialog ( old-style )
**************************************************************************** ****************************************************************************
* Copyright (C) 2006 the VideoLAN team * Copyright ( C ) 2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * ( at your option ) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -32,18 +32,19 @@ ...@@ -32,18 +32,19 @@
SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
bool _transcode_only ) : QVLCDialog( parent, _p_intf ) bool _transcode_only ) : QVLCDialog( parent, _p_intf )
{ {
setWindowTitle( qtr( "Stream output") ); setWindowTitle( qtr( "Stream output" ) );
/* UI stuff */ /* UI stuff */
ui.setupUi( this ); ui.setupUi( this );
#define ADD_PROFILE(name) ui.comboBox->addItem( name ); #define ADD_PROFILE( name ) ui.comboBox->addItem( name );
ADD_PROFILE("Ipod") ADD_PROFILE( "" )
ADD_PROFILE("PSP") ADD_PROFILE( "Ipod" )
ADD_PROFILE("GSM") ADD_PROFILE( "PSP" )
ADD_PROFILE("Custom") ADD_PROFILE( "GSM" )
ADD_PROFILE( "Custom" )
#define ADD_VCODEC( name, fourcc) ui.vCodec_2->addItem( name, QVariant( fourcc ) ); #define ADD_VCODEC( name, fourcc ) ui.vCodec_2->addItem( name, QVariant( fourcc ) );
ADD_VCODEC( "MPEG-1", "mp1v" ) ADD_VCODEC( "MPEG-1", "mp1v" )
ADD_VCODEC( "MPEG-2", "mp2v" ) ADD_VCODEC( "MPEG-2", "mp2v" )
ADD_VCODEC( "MPEG-4", "mp4v" ) ADD_VCODEC( "MPEG-4", "mp4v" )
...@@ -57,18 +58,18 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -57,18 +58,18 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
ADD_VCODEC( "M-JPEG", "MJPG" ) ADD_VCODEC( "M-JPEG", "MJPG" )
ADD_VCODEC( "Theora", "theo" ) ADD_VCODEC( "Theora", "theo" )
#define ADD_ACODEC( name, fourcc) ui.aCodec_2->addItem( name, QVariant( fourcc ) ); #define ADD_ACODEC( name, fourcc ) ui.aCodec_2->addItem( name, QVariant( fourcc ) );
ADD_ACODEC( "MPEG Audio", "mpga" ) ADD_ACODEC( "MPEG Audio", "mpga" )
ADD_ACODEC( "MP3", "mp3" ) ADD_ACODEC( "MP3", "mp3" )
ADD_ACODEC( "MPEG 4 Audio (AAC)", "mp4a") ADD_ACODEC( "MPEG 4 Audio ( AAC )", "mp4a" )
ADD_ACODEC( "A52/AC-3", "a52") ADD_ACODEC( "A52/AC-3", "a52" )
ADD_ACODEC( "Vorbis", "vorb" ) ADD_ACODEC( "Vorbis", "vorb" )
ADD_ACODEC( "Flac", "flac" ) ADD_ACODEC( "Flac", "flac" )
ADD_ACODEC( "Speex", "spx" ) ADD_ACODEC( "Speex", "spx" )
ADD_ACODEC( "WAV", "s16l" ) ADD_ACODEC( "WAV", "s16l" )
ADD_ACODEC( "WMA", "wma" ) ADD_ACODEC( "WMA", "wma" )
#define ADD_SCALING( factor ) ui.vScale_2->addItem( factor ); #define ADD_SCALING( factor ) ui.vScale_2->addItem( factor );
ADD_SCALING( "0.25" ) ADD_SCALING( "0.25" )
ADD_SCALING( "0.5" ) ADD_SCALING( "0.5" )
ADD_SCALING( "0.75" ) ADD_SCALING( "0.75" )
...@@ -78,13 +79,13 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -78,13 +79,13 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
ADD_SCALING( "1.75" ) ADD_SCALING( "1.75" )
ADD_SCALING( "2" ) ADD_SCALING( "2" )
ui.mrlEdit->setToolTip ( qtr("Stream output string.\n This is automatically generated when you change the above settings,\n but you can update it manually." ) ) ; ui.mrlEdit->setToolTip ( qtr( "Stream output string.\n This is automatically generated when you change the above settings,\n but you can update it manually." ) ) ;
// /* Connect everything to the updateMRL function */ // /* Connect everything to the updateMRL function */
#define CB(x) CONNECT( ui.x, clicked(bool), this, updateMRL() ); #define CB( x ) CONNECT( ui.x, clicked( bool ), this, updateMRL() );
#define CT(x) CONNECT( ui.x, textChanged(const QString), this, updateMRL() ); #define CT( x ) CONNECT( ui.x, textChanged( const QString ), this, updateMRL() );
#define CS(x) CONNECT( ui.x, valueChanged(int), this, updateMRL() ); #define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#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( UDPOutput ); CB( MMSHOutput ); CB( rawInput ); CB( UDPOutput ); CB( MMSHOutput ); CB( rawInput );
...@@ -100,13 +101,13 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -100,13 +101,13 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux ); CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux );
// /* Misc */ // /* Misc */
CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup ); CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
// //
connect( ui.comboBox, SIGNAL(activated(const QString &)), this, SLOT(setOptions()) ); connect( ui.comboBox, SIGNAL( activated( const QString & ) ), this, SLOT( setOptions() ) );
connect( ui.fileSelectButton, SIGNAL(clicked()), this, SLOT(fileBrowse()) ); connect( ui.fileSelectButton, SIGNAL( clicked() ), this, SLOT( fileBrowse() ) );
connect(ui.transcodeVideo_2,SIGNAL(toggled(bool)),this,SLOT(setVTranscodeOptions(bool))); connect( ui.transcodeVideo_2,SIGNAL( toggled( bool ) ),this,SLOT( setVTranscodeOptions( bool ) ) );
connect(ui.transcodeAudio_2,SIGNAL(toggled(bool)),this,SLOT(setATranscodeOptions(bool))); connect( ui.transcodeAudio_2,SIGNAL( toggled( bool ) ),this,SLOT( setATranscodeOptions( bool ) ) );
connect(ui.transcodeSubs_2,SIGNAL(toggled(bool)),this,SLOT(setSTranscodeOptions(bool))); connect( ui.transcodeSubs_2,SIGNAL( toggled( bool ) ),this,SLOT( setSTranscodeOptions( bool ) ) );
connect(ui.rawInput,SIGNAL(toggled(bool)),this,SLOT(setRawOptions(bool))); connect( ui.rawInput,SIGNAL( toggled( bool ) ),this,SLOT( setRawOptions( bool ) ) );
QPushButton *okButton = new QPushButton( qtr( "&Stream" ) ); QPushButton *okButton = new QPushButton( qtr( "&Stream" ) );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) ); QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
...@@ -115,75 +116,75 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -115,75 +116,75 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
ui.acceptButtonBox->addButton( okButton, QDialogButtonBox::AcceptRole ); ui.acceptButtonBox->addButton( okButton, QDialogButtonBox::AcceptRole );
ui.acceptButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole ); ui.acceptButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
BUTTONACT( okButton, ok()); BUTTONACT( okButton, ok() );
BUTTONACT( cancelButton, cancel()); BUTTONACT( cancelButton, cancel() );
if( _transcode_only ) toggleSout(); if( _transcode_only ) toggleSout();
} }
void SoutDialog::fileBrowse() void SoutDialog::fileBrowse()
{ui.tabWidget->setTabEnabled(0,false); {ui.tabWidget->setTabEnabled( 0,false );
QString f = QFileDialog::getOpenFileName( this, qtr("Save file"), "", "" ); QString f = QFileDialog::getOpenFileName( this, qtr( "Save file" ), "", "" );
ui.fileEdit->setText( f ); ui.fileEdit->setText( f );
updateMRL(); updateMRL();
} }
void SoutDialog::setVTranscodeOptions(bool b_trans) void SoutDialog::setVTranscodeOptions( bool b_trans )
{ {
ui.label_2->setEnabled(b_trans); ui.label_2->setEnabled( b_trans );
ui.vCodec_2->setEnabled(b_trans); ui.vCodec_2->setEnabled( b_trans );
ui.vBitrateLabel_2->setEnabled(b_trans); ui.vBitrateLabel_2->setEnabled( b_trans );
ui.vScaleLabel_2->setEnabled(b_trans); ui.vScaleLabel_2->setEnabled( b_trans );
ui.vBitrate_2->setEnabled(b_trans); ui.vBitrate_2->setEnabled( b_trans );
ui.vScaleLabel_2->setEnabled(b_trans); ui.vScaleLabel_2->setEnabled( b_trans );
ui.vScale_2->setEnabled(b_trans); ui.vScale_2->setEnabled( b_trans );
} }
void SoutDialog::setATranscodeOptions(bool b_trans) void SoutDialog::setATranscodeOptions( bool b_trans )
{ {
ui.label->setEnabled(b_trans); ui.label->setEnabled( b_trans );
ui.aCodec_2->setEnabled(b_trans); ui.aCodec_2->setEnabled( b_trans );
ui.aBitrateLabel_2->setEnabled(b_trans); ui.aBitrateLabel_2->setEnabled( b_trans );
ui.aBitrate_2->setEnabled(b_trans); ui.aBitrate_2->setEnabled( b_trans );
ui.s_3->setEnabled(b_trans); ui.s_3->setEnabled( b_trans );
ui.aChannels_2->setEnabled(b_trans); ui.aChannels_2->setEnabled( b_trans );
} }
void SoutDialog::setSTranscodeOptions(bool b_trans) void SoutDialog::setSTranscodeOptions( bool b_trans )
{ {
ui.sCodec_2->setEnabled(b_trans); ui.sCodec_2->setEnabled( b_trans );
ui.sOverlay_2->setEnabled(b_trans); ui.sOverlay_2->setEnabled( b_trans );
} }
void SoutDialog::setRawOptions(bool b_raw) void SoutDialog::setRawOptions( bool b_raw )
{ {
if (b_raw) if ( b_raw )
{ {
ui.tabWidget->setDisabled(true); ui.tabWidget->setDisabled( true );
} }
else else
{ {
SoutDialog::setOptions(); SoutDialog::setOptions();
} }
} }
void SoutDialog::setOptions() void SoutDialog::setOptions()
{ {
/* The test is currently done with a QString, it could be done with the index, it'd depend how translation works */ /* The test is currently done with a QString, it could be done with the index, it'd depend how translation works */
if (ui.comboBox->currentText() == "Custom") if ( ui.comboBox->currentText() == "Custom" )
{ {
ui.tabWidget->setEnabled(true); ui.tabWidget->setEnabled( true );
} }
else else
{ {
ui.tabWidget->setDisabled(true); ui.tabWidget->setDisabled( true );
} }
} }
void SoutDialog::toggleSout() void SoutDialog::toggleSout()
{ {
#define TGV(x) { \ #define TGV( x ) { \
if( (x->isHidden()) ) \ if( ( x->isHidden() ) ) \
x->show(); \ x->show(); \
else x->hide();\ else x->hide();\
} }
...@@ -208,215 +209,215 @@ void SoutDialog::cancel() ...@@ -208,215 +209,215 @@ void SoutDialog::cancel()
void SoutDialog::updateMRL() void SoutDialog::updateMRL()
{ {
sout_gui_descr_t sout; sout_gui_descr_t sout;
memset( &sout, 0, sizeof( sout_gui_descr_t ) ); memset( &sout, 0, sizeof( sout_gui_descr_t ) );
sout.b_local = ui.localOutput->isChecked(); sout.b_local = ui.localOutput->isChecked();
sout.b_file = ui.fileOutput->isChecked(); sout.b_file = ui.fileOutput->isChecked();
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_udp = ui.UDPOutput->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.vCodec_2->itemData(ui.vCodec_2->currentIndex()).toString())); sout.psz_vcodec = strdup( qtu( ui.vCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) );
sout.psz_acodec = strdup(qtu(ui.aCodec_2->itemData(ui.vCodec_2->currentIndex()).toString())); sout.psz_acodec = strdup( qtu( ui.aCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) );
sout.psz_scodec = strdup(qtu(ui.sCodec_2->itemData(ui.vCodec_2->currentIndex()).toString())); sout.psz_scodec = strdup( qtu( ui.sCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) );
sout.psz_file = strdup(qtu(ui.fileEdit->text())); sout.psz_file = strdup( qtu( ui.fileEdit->text() ) );
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_udp = strdup(qtu(ui.UDPEdit->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_udp = ui.UDPPort->value(); sout.i_udp = ui.UDPPort->value();
sout.i_ab = ui.aBitrate_2->value(); sout.i_ab = ui.aBitrate_2->value();
sout.i_vb = ui.vBitrate_2->value(); sout.i_vb = ui.vBitrate_2->value();
sout.i_channels = ui.aChannels_2->value(); sout.i_channels = ui.aChannels_2->value();
sout.f_scale = atof(qta(ui.vScale_2->currentText())); sout.f_scale = atof( qta( ui.vScale_2->currentText() ) );
sout.psz_group = strdup(qtu(ui.sapGroup->text())); sout.psz_group = strdup( qtu( ui.sapGroup->text() ) );
sout.psz_name = strdup(qtu(ui.sapName->text())); sout.psz_name = strdup( qtu( ui.sapName->text() ) );
#define SMUX(x, txt) if( ui.x->isChecked() ) sout.psz_mux = strdup(txt); #define SMUX( x, txt ) if( ui.x->isChecked() ) sout.psz_mux = strdup( txt );
SMUX( PSMux, "ps" ); SMUX( PSMux, "ps" );
SMUX( TSMux, "ts" ); SMUX( TSMux, "ts" );
SMUX( MPEG1Mux, "mpeg" ); SMUX( MPEG1Mux, "mpeg" );
SMUX( OggMux, "ogg" ); SMUX( OggMux, "ogg" );
SMUX( ASFMux, "asf" ); SMUX( ASFMux, "asf" );
SMUX( MP4Mux, "mp4" ); SMUX( MP4Mux, "mp4" );
SMUX( MOVMux, "mov" ); SMUX( MOVMux, "mov" );
SMUX( WAVMux, "wav" ); SMUX( WAVMux, "wav" );
SMUX( RAWMux, "raw" ); SMUX( RAWMux, "raw" );
SMUX( FLVMux, "flv" ); SMUX( FLVMux, "flv" );
bool trans = false; bool trans = false;
bool more = false; bool more = false;
if (ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked()) if ( ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked() )
{ {
if (ui.transcodeVideo_2->isChecked()) if ( ui.transcodeVideo_2->isChecked() )
{ {
mrl = ":sout=#transcode{"; mrl = ":sout=#transcode{";
mrl.append("vcodec="); mrl.append( "vcodec=" );
mrl.append(sout.psz_vcodec); mrl.append( sout.psz_vcodec );
mrl.append(","); mrl.append( "," );
mrl.append("vb="); mrl.append( "vb=" );
mrl.append(QString::number(sout.i_vb,10)); mrl.append( QString::number( sout.i_vb,10 ) );
mrl.append(","); mrl.append( "," );
mrl.append("scale="); mrl.append( "scale=" );
mrl.append(QString::number(sout.f_scale)); mrl.append( QString::number( sout.f_scale ) );
trans = true; trans = true;
} }
if (ui.transcodeAudio_2->isChecked()) if ( ui.transcodeAudio_2->isChecked() )
{ {
if (trans) if ( trans )
{ {
mrl.append(","); mrl.append( "," );
} }
else else
{ {
mrl = ":sout=#transcode{"; mrl = ":sout=#transcode{";
} }
mrl.append("acodec="); mrl.append( "acodec=" );
mrl.append(sout.psz_acodec); mrl.append( sout.psz_acodec );
mrl.append(","); mrl.append( "," );
mrl.append("ab="); mrl.append( "ab=" );
mrl.append(QString::number(sout.i_ab,10)); mrl.append( QString::number( sout.i_ab,10 ) );
mrl.append(","); mrl.append( "," );
mrl.append("channels="); mrl.append( "channels=" );
mrl.append(QString::number(sout.i_channels,10)); mrl.append( QString::number( sout.i_channels,10 ) );
trans = true; trans = true;
} }
mrl.append("}"); mrl.append( "}" );
} }
if (sout.b_local || sout.b_file || sout.b_http || sout.b_mms || sout.b_udp) if ( sout.b_local || sout.b_file || sout.b_http || sout.b_mms || sout.b_udp )
{ {
#define ISMORE() if ( more ) mrl.append(","); #define ISMORE() if ( more ) mrl.append( "," );
if ( trans ) if ( trans )
{ {
mrl.append(":duplicate{"); mrl.append( ":duplicate{" );
} }
else else
{ {
mrl = ":sout=#"; mrl = ":sout=#";
} }
if ( sout.b_local ) if ( sout.b_local )
{ {
ISMORE(); ISMORE();
mrl.append("dst=display"); mrl.append( "dst=display" );
more = true; more = true;
} }
if ( sout.b_file ) if ( sout.b_file )
{ {
ISMORE(); ISMORE();
mrl.append("dst=std{access=file,mux="); mrl.append( "dst=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 );
mrl.append("}"); mrl.append( "}" );
more = true; more = true;
} }
if ( sout.b_http) if ( sout.b_http )
{ {
ISMORE(); ISMORE();
mrl.append("dst=std{access=http,mux="); mrl.append( "dst=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 );
mrl.append(":"); mrl.append( ":" );
mrl.append(QString::number(sout.i_http,10)); mrl.append( QString::number( sout.i_http,10 ) );
mrl.append("}"); mrl.append( "}" );
more = true; more = true;
} }
if ( sout.b_mms ) if ( sout.b_mms )
{ {
ISMORE(); ISMORE();
mrl.append("dst=std{access=mmsh,mux="); mrl.append( "dst=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 );
mrl.append(":"); mrl.append( ":" );
mrl.append(QString::number(sout.i_mms,10)); mrl.append( QString::number( sout.i_mms,10 ) );
mrl.append("}"); mrl.append( "}" );
more = true; more = true;
} }
if ( sout.b_udp ) if ( sout.b_udp )
{ {
ISMORE(); ISMORE();
mrl.append("dst=std{access=udp,mux="); mrl.append( "dst=std{access=udp,mux=" );
mrl.append(sout.psz_mux); mrl.append( sout.psz_mux );
mrl.append(",dst="); mrl.append( ",dst=" );
mrl.append(sout.psz_udp); mrl.append( sout.psz_udp );
mrl.append(":"); mrl.append( ":" );
mrl.append(QString::number(sout.i_udp,10)); mrl.append( QString::number( sout.i_udp,10 ) );
if (sout.b_sap) if ( sout.b_sap )
{ {
mrl.append(",sap,"); mrl.append( ",sap," );
mrl.append("group=\""); mrl.append( "group=\"" );
mrl.append(sout.psz_group); mrl.append( sout.psz_group );
mrl.append("\","); mrl.append( "\"," );
mrl.append("name=\""); mrl.append( "name=\"" );
mrl.append(sout.psz_name); mrl.append( sout.psz_name );
mrl.append("\""); mrl.append( "\"" );
} }
mrl.append("}"); mrl.append( "}" );
more = true; more = true;
} }
if (trans) if ( trans )
{ {
mrl.append("}"); mrl.append( "}" );
} }
} }
if (sout.b_all_es) if ( sout.b_all_es )
mrl.append(":sout-all"); mrl.append( ":sout-all" );
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_udp ); free( sout.psz_mux ); free( sout.psz_udp ); free( sout.psz_mux );
free( sout.psz_name ); free( sout.psz_group ); free( sout.psz_name ); free( sout.psz_group );
} }
// void SoutDialog::updateMRL() // void SoutDialog::updateMRL()
// { // {
// sout_gui_descr_t pd; // sout_gui_descr_t pd;
// memset( &pd, 0, sizeof( sout_gui_descr_t ) ); // memset( &pd, 0, sizeof( sout_gui_descr_t ) );
// //
// /* Output */ // /* Output */
// pd.b_dump = ui.rawInput->isChecked(); // pd.b_dump = ui.rawInput->isChecked();
// if( pd.b_dump ) goto end; // if( pd.b_dump ) goto end;
// //
// pd.b_local = ui.localOutput->isChecked(); // pd.b_local = ui.localOutput->isChecked();
// pd.b_file = ui.fileOutput->isChecked(); // pd.b_file = ui.fileOutput->isChecked();
// pd.b_http = ui.HTTPOutput->isChecked(); // pd.b_http = ui.HTTPOutput->isChecked();
// pd.b_mms = ui.MMSHOutput->isChecked(); // pd.b_mms = ui.MMSHOutput->isChecked();
// pd.b_udp = ui.UDPOutput->isChecked(); // pd.b_udp = ui.UDPOutput->isChecked();
// //
// pd.psz_file = ui.fileOutput->isChecked() ? // pd.psz_file = ui.fileOutput->isChecked() ?
// strdup(qtu( ui.fileEdit->text() ) ): NULL; // strdup( qtu( ui.fileEdit->text() ) ): NULL;
// pd.psz_http = ui.HTTPOutput->isChecked() ? // pd.psz_http = ui.HTTPOutput->isChecked() ?
// strdup(qtu( ui.HTTPEdit->text() ) ) : NULL; // strdup( qtu( ui.HTTPEdit->text() ) ) : NULL;
// pd.psz_mms = ui.MMSHOutput->isChecked() ? // pd.psz_mms = ui.MMSHOutput->isChecked() ?
// strdup(qtu( ui.MMSHEdit->text() ) ): NULL; // strdup( qtu( ui.MMSHEdit->text() ) ): NULL;
// pd.psz_udp = ui.UDPOutput->isChecked() ? // pd.psz_udp = ui.UDPOutput->isChecked() ?
// strdup( qtu( ui.UDPEdit->text() ) ): NULL; // strdup( qtu( ui.UDPEdit->text() ) ): NULL;
// //
// pd.i_http = ui.HTTPPort->value(); // pd.i_http = ui.HTTPPort->value();
// pd.i_mms = ui.MMSHPort->value(); // pd.i_mms = ui.MMSHPort->value();
// pd.i_udp = ui.UDPPort->value(); // pd.i_udp = ui.UDPPort->value();
// //
// /* Mux */ // /* Mux */
// #define SMUX(x, txt) if( ui.x##Mux->isChecked() ) pd.psz_mux = strdup(txt); // #define SMUX( x, txt ) if( ui.x##Mux->isChecked() ) pd.psz_mux = strdup( txt );
// SMUX( PS, "ps" ); // SMUX( PS, "ps" );
// SMUX( TS, "ts" ); // SMUX( TS, "ts" );
// SMUX( MPEG1, "mpeg" ); // SMUX( MPEG1, "mpeg" );
...@@ -427,24 +428,24 @@ if (ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked()) ...@@ -427,24 +428,24 @@ if (ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked())
// SMUX( WAV, "wav" ); // SMUX( WAV, "wav" );
// SMUX( RAW, "raw" ); // SMUX( RAW, "raw" );
// SMUX( FLV, "flv" ); // SMUX( FLV, "flv" );
// //
// //
// //
// /* Transcode */ // /* Transcode */
// // pd.b_soverlay = ui.sOverlay->isChecked(); // // pd.b_soverlay = ui.sOverlay->isChecked();
// // pd.i_vb = ui.vBitrate->value(); // // pd.i_vb = ui.vBitrate->value();
// // pd.i_ab = ui.aBitrate->value(); // // pd.i_ab = ui.aBitrate->value();
// // pd.i_channels = ui.aChannels->value(); // // pd.i_channels = ui.aChannels->value();
// // pd.f_scale = atof( qta( ui.vScale->currentText() ) ); // // pd.f_scale = atof( qta( ui.vScale->currentText() ) );
// // // //
// // pd.psz_vcodec = ui.transcodeVideo->isChecked() ? // // pd.psz_vcodec = ui.transcodeVideo->isChecked() ?
// // strdup( qtu( ui.vCodec->itemData( // // strdup( qtu( ui.vCodec->itemData(
// // ui.vCodec->currentIndex() ). toString() ) ) : NULL; // // ui.vCodec->currentIndex() ). toString() ) ) : NULL;
// // pd.psz_acodec = ui.transcodeAudio->isChecked() ? // // pd.psz_acodec = ui.transcodeAudio->isChecked() ?
// // strdup( qtu( ui.aCodec->itemData( // // strdup( qtu( ui.aCodec->itemData(
// // ui.aCodec->currentIndex() ).toString() ) ) : NULL; // // ui.aCodec->currentIndex() ).toString() ) ) : NULL;
// // pd.psz_scodec = ui.transcodeSubs->isChecked() ? // // pd.psz_scodec = ui.transcodeSubs->isChecked() ?
// // strdup( qtu( ui.sCodec->itemData( // // strdup( qtu( ui.sCodec->itemData(
// // ui.sCodec->currentIndex() ).toString() ) ) : NULL; // // ui.sCodec->currentIndex() ).toString() ) ) : NULL;
// // pd.b_sap = ui.sap->isChecked(); // // pd.b_sap = ui.sap->isChecked();
// // pd.b_all_es = ui.soutAll->isChecked(); // // pd.b_all_es = ui.soutAll->isChecked();
...@@ -453,10 +454,10 @@ if (ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked()) ...@@ -453,10 +454,10 @@ if (ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked())
// // pd.i_ttl = ui.ttl->value() ; // // pd.i_ttl = ui.ttl->value() ;
// end: // end:
// sout_chain_t* p_chain = streaming_ChainNew(); // sout_chain_t* p_chain = streaming_ChainNew();
// streaming_GuiDescToChain( VLC_OBJECT(p_intf), p_chain, &pd ); // streaming_GuiDescToChain( VLC_OBJECT( p_intf ), p_chain, &pd );
// char *psz_mrl = streaming_ChainToPsz( p_chain ); // char *psz_mrl = streaming_ChainToPsz( p_chain );
// //
// ui.mrlEdit->setText( qfu( strdup(psz_mrl) ) ); // ui.mrlEdit->setText( qfu( strdup( psz_mrl ) ) );
// free( pd.psz_acodec ); free( pd.psz_vcodec ); free( pd.psz_scodec ); // free( pd.psz_acodec ); free( pd.psz_vcodec ); free( pd.psz_scodec );
// free( pd.psz_file );free( pd.psz_http ); free( pd.psz_mms ); // free( pd.psz_file );free( pd.psz_http ); free( pd.psz_mms );
// free( pd.psz_udp ); free( pd.psz_mux ); // free( pd.psz_udp ); free( pd.psz_mux );
......
/***************************************************************************** /*****************************************************************************
* sout.hpp : Stream output dialog (old-style, ala WX) * sout.hpp : Stream output dialog ( old-style, ala WX )
**************************************************************************** ****************************************************************************
* Copyright (C) 2006 the VideoLAN team * Copyright ( C ) 2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * ( at your option ) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -55,10 +55,10 @@ public slots: ...@@ -55,10 +55,10 @@ public slots:
void fileBrowse(); void fileBrowse();
void toggleSout(); void toggleSout();
void setOptions(); void setOptions();
void setVTranscodeOptions(bool); void setVTranscodeOptions( bool );
void setATranscodeOptions(bool); void setATranscodeOptions( bool );
void setSTranscodeOptions(bool); void setSTranscodeOptions( bool );
void setRawOptions(bool); void setRawOptions( bool );
}; };
#endif #endif
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