QTfrontend/util/LibavInteraction.h
author S.D.
Tue, 27 Sep 2022 14:59:03 +0300
changeset 15878 fc3cb23fd26f
parent 12268 2eedf9e0cd6d
permissions -rw-r--r--
Allow to see rooms of incompatible versions in the lobby For the new clients the room version is shown in a separate column. There is also a hack for previous versions clients: the room vesion specifier is prepended to the room names for rooms of incompatible versions, and the server shows 'incompatible version' error if the client tries to join them.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7897
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     1
/*
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10108
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
7897
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     4
 *
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     8
 *
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    12
 * GNU General Public License for more details.
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    13
 *
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 9998
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
7897
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    17
 */
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    18
9429
7a97a554ac80 libavinteraction: fix typo and and compiling with modern libav
koda
parents: 9080
diff changeset
    19
#ifndef LIBAV_INTERACTION
7a97a554ac80 libavinteraction: fix typo and and compiling with modern libav
koda
parents: 9080
diff changeset
    20
#define LIBAV_INTERACTION
7897
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    21
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    22
#include <QComboBox>
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    23
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    24
/**
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    25
 * @brief Class for interacting with ffmpeg/libav libraries
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    26
 *
12268
2eedf9e0cd6d Replace some HTTP links with HTTPS links
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    27
 * @see <a href="https://en.wikipedia.org/wiki/Singleton_pattern">singleton pattern</a>
7897
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    28
 */
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    29
class LibavInteraction : public QObject
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    30
{
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    31
    Q_OBJECT;
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    32
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    33
    LibavInteraction();
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    34
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    35
public:
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    36
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    37
    static LibavInteraction & instance();
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    38
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    39
    // fill combo box with known file formats
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    40
    void fillFormats(QComboBox * pFormats);
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    41
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    42
    // fill combo boxes with known codecs for given formats
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    43
    void fillCodecs(const QString & format, QComboBox * pVCodecs, QComboBox * pACodecs);
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    44
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    45
    QString getExtension(const QString & format);
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    46
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    47
    // get information about file (duration, resolution etc) in multiline string
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    48
    QString getFileInfo(const QString & filepath);
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    49
};
5e7c0810f365 libav name refactor
koda
parents:
diff changeset
    50
9429
7a97a554ac80 libavinteraction: fix typo and and compiling with modern libav
koda
parents: 9080
diff changeset
    51
#endif // LIBAV_INTERACTION