[112] | 1 | /* smplayer, GUI front-end for mplayer.
|
---|
[188] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
[112] | 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 |
|
---|
[176] | 19 | #ifndef FILEPROPERTIESDIALOG_H
|
---|
| 20 | #define FILEPROPERTIESDIALOG_H
|
---|
[112] | 21 |
|
---|
| 22 | #include "ui_filepropertiesdialog.h"
|
---|
| 23 | #include "inforeader.h"
|
---|
| 24 | #include "mediadata.h"
|
---|
[176] | 25 | #include "config.h"
|
---|
[112] | 26 |
|
---|
| 27 | class QPushButton;
|
---|
| 28 |
|
---|
| 29 | class FilePropertiesDialog : public QDialog, public Ui::FilePropertiesDialog
|
---|
| 30 | {
|
---|
| 31 | Q_OBJECT
|
---|
| 32 |
|
---|
| 33 | public:
|
---|
| 34 | FilePropertiesDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
---|
| 35 | ~FilePropertiesDialog();
|
---|
| 36 |
|
---|
| 37 | void setMediaData(MediaData md);
|
---|
| 38 |
|
---|
[176] | 39 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
| 40 | // Call it as soon as possible
|
---|
| 41 | void setCodecs(InfoList vc, InfoList ac, InfoList demuxer);
|
---|
| 42 |
|
---|
[112] | 43 | void setDemuxer(QString demuxer, QString original_demuxer="");
|
---|
| 44 | QString demuxer();
|
---|
| 45 |
|
---|
| 46 | void setVideoCodec(QString vc, QString original_vc="");
|
---|
| 47 | QString videoCodec();
|
---|
| 48 |
|
---|
| 49 | void setAudioCodec(QString ac, QString original_ac="");
|
---|
| 50 | QString audioCodec();
|
---|
[176] | 51 | #endif
|
---|
[112] | 52 |
|
---|
| 53 | void setMplayerAdditionalArguments(QString args);
|
---|
| 54 | QString mplayerAdditionalArguments();
|
---|
| 55 |
|
---|
| 56 | void setMplayerAdditionalVideoFilters(QString s);
|
---|
| 57 | QString mplayerAdditionalVideoFilters();
|
---|
| 58 |
|
---|
| 59 | void setMplayerAdditionalAudioFilters(QString s);
|
---|
| 60 | QString mplayerAdditionalAudioFilters();
|
---|
| 61 |
|
---|
| 62 | public slots:
|
---|
| 63 | void accept(); // Reimplemented to send a signal
|
---|
| 64 | void apply();
|
---|
| 65 |
|
---|
| 66 | signals:
|
---|
| 67 | void applied();
|
---|
| 68 |
|
---|
[176] | 69 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
[112] | 70 | protected slots:
|
---|
| 71 | virtual void on_resetDemuxerButton_clicked();
|
---|
| 72 | virtual void on_resetACButton_clicked();
|
---|
| 73 | virtual void on_resetVCButton_clicked();
|
---|
[176] | 74 | #endif
|
---|
[112] | 75 |
|
---|
| 76 | protected:
|
---|
[176] | 77 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
[112] | 78 | bool hasCodecsList() { return codecs_set; };
|
---|
| 79 | int find(QString s, InfoList &list);
|
---|
[176] | 80 | #endif
|
---|
[112] | 81 | void showInfo();
|
---|
| 82 |
|
---|
| 83 | protected:
|
---|
| 84 | virtual void retranslateStrings();
|
---|
| 85 | virtual void changeEvent ( QEvent * event ) ;
|
---|
| 86 |
|
---|
| 87 | private:
|
---|
[176] | 88 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
[112] | 89 | bool codecs_set;
|
---|
| 90 | InfoList vclist, aclist, demuxerlist;
|
---|
| 91 | QString orig_demuxer, orig_ac, orig_vc;
|
---|
[176] | 92 | #endif
|
---|
[112] | 93 | MediaData media_data;
|
---|
| 94 |
|
---|
| 95 | QPushButton * okButton;
|
---|
| 96 | QPushButton * cancelButton;
|
---|
| 97 | QPushButton * applyButton;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
| 100 | #endif
|
---|