sout.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * sout.hpp : Stream output dialog ( old-style, ala WX )
00003  ****************************************************************************
00004  * Copyright ( C ) 2006 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Clément Stenac <zorglub@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * ( at your option ) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _SOUT_DIALOG_H_
00025 #define _SOUT_DIALOG_H_
00026 
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030 
00031 #include <vlc_common.h>
00032 
00033 #include "ui/sout.h"
00034 #include "util/qvlcframe.hpp"
00035 
00036 class QPushButton;
00037 class QCheckBox;
00038 class QGridLayout;
00039 class QTextEdit;
00040 
00041 class SoutDialog : public QVLCDialog
00042 {
00043     Q_OBJECT;
00044 public:
00045     static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf,
00046                                     bool transcode_only )
00047     {
00048         if( !instance )
00049             instance = new SoutDialog( parent, p_intf, transcode_only );
00050         else
00051         {
00052             /* Recenter the dialog on the parent */
00053             instance->setParent( parent, Qt::Dialog );
00054             if( transcode_only != instance->b_transcode_only )
00055             {
00056                 instance->toggleSout();
00057                 instance->b_transcode_only = transcode_only;
00058             }
00059         }
00060         return instance;
00061     }
00062 
00063     virtual ~SoutDialog(){}
00064 
00065     QString getMrl(){ return mrl; }
00066 
00067 private:
00068     Ui::Sout ui;
00069     static SoutDialog *instance;
00070     SoutDialog( QWidget* parent, intf_thread_t *,
00071                 bool _transcode_only = false );
00072     QPushButton *okButton;
00073     QString mrl;
00074     bool b_transcode_only;
00075 
00076 public slots:
00077     void updateMRL();
00078 
00079 private slots:
00080     void ok();
00081     void cancel();
00082     void toggleSout();
00083     void setOptions();
00084     void fileBrowse();
00085     void setVTranscodeOptions( bool );
00086     void setATranscodeOptions( bool );
00087     void setSTranscodeOptions( bool );
00088     void setRawOptions( bool );
00089     void changeUDPandRTPmess( bool );
00090     void RTPtoggled( bool );
00091 };
00092 
00093 #endif

Generated on Wed Aug 13 08:02:38 2008 for VLC by  doxygen 1.5.1