SoutDialog* SoutDialog::instance = NULL;
-SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
- bool _transcode_only ) : QVLCDialog( parent, _p_intf )
+SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf )
+ : QVLCDialog( parent, _p_intf )
{
setWindowTitle( qtr( "Stream Output" ) );
- b_transcode_only = _transcode_only;
-
/* UI stuff */
ui.setupUi( this );
CONNECT( ui.UDPOutput, toggled( bool ), this, changeUDPandRTPmess( bool ) );
CONNECT( ui.RTPOutput, clicked(bool), this, RTPtoggled( bool ) );
- if( b_transcode_only ) toggleSout();
}
void SoutDialog::fileBrowse()
updateMRL();
}
-void SoutDialog::toggleSout()
-{
- //Toggle all the streaming options.
-#define HIDEORSHOW(x) if( b_transcode_only ) x->hide(); else x->show();
- HIDEORSHOW( ui.HTTPOutput ) ; HIDEORSHOW( ui.RTPOutput ) ; HIDEORSHOW( ui.MMSHOutput ) ; HIDEORSHOW( ui.UDPOutput ) ;
- HIDEORSHOW( ui.HTTPEdit ) ; HIDEORSHOW( ui.RTPEdit ) ; HIDEORSHOW( ui.MMSHEdit ) ; HIDEORSHOW( ui.UDPEdit ) ;
- HIDEORSHOW( ui.HTTPLabel ) ; HIDEORSHOW( ui.RTPLabel ) ; HIDEORSHOW( ui.MMSHLabel ) ; HIDEORSHOW( ui.UDPLabel ) ;
- HIDEORSHOW( ui.HTTPPortLabel ) ; HIDEORSHOW( ui.RTPPortLabel ) ; HIDEORSHOW( ui.MMSHPortLabel ) ; HIDEORSHOW( ui.UDPPortLabel )
- HIDEORSHOW( ui.HTTPPort ) ; HIDEORSHOW( ui.RTPPort ) ; HIDEORSHOW( ui.MMSHPort ) ; HIDEORSHOW( ui.UDPPort ) ; HIDEORSHOW( ui.RTPPortLabel2 ); HIDEORSHOW( ui.RTPPort2 ); HIDEORSHOW( ui.UDPRTPLabel )
-
- HIDEORSHOW( ui.sap ); HIDEORSHOW( ui.sapName );
- HIDEORSHOW( ui.sapGroup ); HIDEORSHOW( ui.sapGroupLabel );
- HIDEORSHOW( ui.ttlLabel ); HIDEORSHOW( ui.ttl );
- HIDEORSHOW( ui.soutKeep );
-
- HIDEORSHOW( ui.IcecastOutput ); HIDEORSHOW( ui.IcecastEdit );
- HIDEORSHOW( ui.IcecastNamePassEdit ); HIDEORSHOW( ui.IcecastMountpointEdit );
- HIDEORSHOW( ui.IcecastPort ); HIDEORSHOW( ui.IcecastLabel );
- HIDEORSHOW( ui.IcecastPortLabel );
- HIDEORSHOW( ui.IcecastMountpointLabel ); HIDEORSHOW( ui.IcecastNameLabel );
-#undef HIDEORSHOW
-
- if( b_transcode_only ) okButton->setText( "&Save" );
- else okButton->setText( "&Stream" );
-
- setMinimumHeight( 500 );
- resize( width(), sizeHint().height() );
-}
-
void SoutDialog::changeUDPandRTPmess( bool b_udp )
{
ui.RTPEdit->setVisible( !b_udp );
{
Q_OBJECT;
public:
- static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf,
- bool transcode_only )
+ static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf )
{
if( !instance )
- instance = new SoutDialog( parent, p_intf, transcode_only );
+ instance = new SoutDialog( parent, p_intf );
else
{
/* Recenter the dialog on the parent */
instance->setParent( parent, Qt::Dialog );
- instance->b_transcode_only = transcode_only;
- instance->toggleSout();
}
return instance;
}
private:
Ui::Sout ui;
static SoutDialog *instance;
- SoutDialog( QWidget* parent, intf_thread_t *,
- bool _transcode_only = false );
+ SoutDialog( QWidget* parent, intf_thread_t * );
QPushButton *okButton;
QString mrl;
- bool b_transcode_only;
public slots:
void updateMRL();
private slots:
void ok();
void cancel();
- void toggleSout();
void setOptions();
void fileBrowse();
void setRawOptions( bool );