|
1 /* |
|
2 * Hedgewars, a free turn based strategy game |
|
3 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 * |
|
5 * This program is free software; you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation; version 2 of the License |
|
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 LIBAV_ITERACTION |
|
20 #define LIBAV_ITERACTION |
|
21 |
|
22 #include <QComboBox> |
|
23 |
|
24 /** |
|
25 * @brief Class for interacting with ffmpeg/libav libraries |
|
26 * |
|
27 * @see <a href="http://en.wikipedia.org/wiki/Singleton_pattern">singleton pattern</a> |
|
28 */ |
|
29 class LibavInteraction : public QObject |
|
30 { |
|
31 Q_OBJECT; |
|
32 |
|
33 LibavInteraction(); |
|
34 |
|
35 public: |
|
36 |
|
37 static LibavInteraction & instance(); |
|
38 |
|
39 // fill combo box with known file formats |
|
40 void fillFormats(QComboBox * pFormats); |
|
41 |
|
42 // fill combo boxes with known codecs for given formats |
|
43 void fillCodecs(const QString & format, QComboBox * pVCodecs, QComboBox * pACodecs); |
|
44 |
|
45 QString getExtension(const QString & format); |
|
46 |
|
47 // get information about file (duration, resolution etc) in multiline string |
|
48 QString getFileInfo(const QString & filepath); |
|
49 }; |
|
50 |
|
51 #endif // LIBAV_ITERACTION |