[175] | 1 | /* smplayer, GUI front-end for mplayer.
|
---|
[188] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
[175] | 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 |
|
---|
| 20 | #ifndef INFOREADER_MPLAYER_H
|
---|
| 21 | #define INFOREADER_MPLAYER_H
|
---|
| 22 |
|
---|
| 23 | #include "inforeader.h"
|
---|
| 24 | #include <QObject>
|
---|
| 25 | #include <QList>
|
---|
| 26 |
|
---|
| 27 | class QProcess;
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | class InfoReaderMplayer : QObject {
|
---|
| 31 | Q_OBJECT
|
---|
| 32 |
|
---|
| 33 | public:
|
---|
| 34 | InfoReaderMplayer( QString mplayer_bin, QObject * parent = 0);
|
---|
| 35 | ~InfoReaderMplayer();
|
---|
| 36 |
|
---|
| 37 | void getInfo();
|
---|
| 38 |
|
---|
| 39 | InfoList voList() { return vo_list; };
|
---|
| 40 | InfoList aoList() { return ao_list; };
|
---|
| 41 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
| 42 | InfoList demuxerList() { return demuxer_list; };
|
---|
| 43 | InfoList vcList() { return vc_list; };
|
---|
| 44 | InfoList acList() { return ac_list; };
|
---|
| 45 | #endif
|
---|
| 46 |
|
---|
| 47 | int mplayerSVN() { return mplayer_svn; };
|
---|
| 48 | QString mplayer2Version() { return mplayer2_version; };
|
---|
| 49 | bool isMplayer2() { return is_mplayer2; };
|
---|
| 50 |
|
---|
| 51 | protected slots:
|
---|
| 52 | virtual void readLine(QByteArray);
|
---|
| 53 |
|
---|
| 54 | protected:
|
---|
| 55 | bool run(QString options);
|
---|
| 56 | void list();
|
---|
| 57 |
|
---|
| 58 | protected:
|
---|
| 59 | QProcess * proc;
|
---|
| 60 | QString mplayerbin;
|
---|
| 61 |
|
---|
| 62 | InfoList vo_list;
|
---|
| 63 | InfoList ao_list;
|
---|
| 64 |
|
---|
| 65 | #if ALLOW_DEMUXER_CODEC_CHANGE
|
---|
| 66 | InfoList demuxer_list;
|
---|
| 67 | InfoList vc_list;
|
---|
| 68 | InfoList ac_list;
|
---|
| 69 | #endif
|
---|
| 70 |
|
---|
| 71 | int mplayer_svn;
|
---|
| 72 | QString mplayer2_version;
|
---|
| 73 | bool is_mplayer2;
|
---|
| 74 |
|
---|
| 75 | private:
|
---|
| 76 | bool waiting_for_key;
|
---|
| 77 | int reading_type;
|
---|
| 78 | };
|
---|
| 79 |
|
---|
| 80 | #endif
|
---|