| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | #ifndef _FILEPROPERTIESDIALOG_H_
|
|---|
| 20 | #define _FILEPROPERTIESDIALOG_H_
|
|---|
| 21 |
|
|---|
| 22 | #include "ui_filepropertiesdialog.h"
|
|---|
| 23 | #include "inforeader.h"
|
|---|
| 24 | #include "mediadata.h"
|
|---|
| 25 |
|
|---|
| 26 | class QPushButton;
|
|---|
| 27 |
|
|---|
| 28 | class FilePropertiesDialog : public QDialog, public Ui::FilePropertiesDialog
|
|---|
| 29 | {
|
|---|
| 30 | Q_OBJECT
|
|---|
| 31 |
|
|---|
| 32 | public:
|
|---|
| 33 | FilePropertiesDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
|---|
| 34 | ~FilePropertiesDialog();
|
|---|
| 35 |
|
|---|
| 36 | void setMediaData(MediaData md);
|
|---|
| 37 |
|
|---|
| 38 | void setDemuxer(QString demuxer, QString original_demuxer="");
|
|---|
| 39 | QString demuxer();
|
|---|
| 40 |
|
|---|
| 41 | void setVideoCodec(QString vc, QString original_vc="");
|
|---|
| 42 | QString videoCodec();
|
|---|
| 43 |
|
|---|
| 44 | void setAudioCodec(QString ac, QString original_ac="");
|
|---|
| 45 | QString audioCodec();
|
|---|
| 46 |
|
|---|
| 47 | void setMplayerAdditionalArguments(QString args);
|
|---|
| 48 | QString mplayerAdditionalArguments();
|
|---|
| 49 |
|
|---|
| 50 | void setMplayerAdditionalVideoFilters(QString s);
|
|---|
| 51 | QString mplayerAdditionalVideoFilters();
|
|---|
| 52 |
|
|---|
| 53 | void setMplayerAdditionalAudioFilters(QString s);
|
|---|
| 54 | QString mplayerAdditionalAudioFilters();
|
|---|
| 55 |
|
|---|
| 56 | public slots:
|
|---|
| 57 | void accept(); // Reimplemented to send a signal
|
|---|
| 58 | void apply();
|
|---|
| 59 |
|
|---|
| 60 | signals:
|
|---|
| 61 | void applied();
|
|---|
| 62 |
|
|---|
| 63 | protected slots:
|
|---|
| 64 | virtual void on_resetDemuxerButton_clicked();
|
|---|
| 65 | virtual void on_resetACButton_clicked();
|
|---|
| 66 | virtual void on_resetVCButton_clicked();
|
|---|
| 67 |
|
|---|
| 68 | protected:
|
|---|
| 69 | // Call it as soon as possible
|
|---|
| 70 | void setCodecs(InfoList vc, InfoList ac, InfoList demuxer);
|
|---|
| 71 | bool hasCodecsList() { return codecs_set; };
|
|---|
| 72 |
|
|---|
| 73 | int find(QString s, InfoList &list);
|
|---|
| 74 | void showInfo();
|
|---|
| 75 |
|
|---|
| 76 | protected:
|
|---|
| 77 | virtual void retranslateStrings();
|
|---|
| 78 | virtual void changeEvent ( QEvent * event ) ;
|
|---|
| 79 |
|
|---|
| 80 | private:
|
|---|
| 81 | bool codecs_set;
|
|---|
| 82 | InfoList vclist, aclist, demuxerlist;
|
|---|
| 83 | QString orig_demuxer, orig_ac, orig_vc;
|
|---|
| 84 | MediaData media_data;
|
|---|
| 85 |
|
|---|
| 86 | QPushButton * okButton;
|
|---|
| 87 | QPushButton * cancelButton;
|
|---|
| 88 | QPushButton * applyButton;
|
|---|
| 89 | };
|
|---|
| 90 |
|
|---|
| 91 | #endif
|
|---|