| 1 | /**************************************************************************** |
|---|---|
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU Lesser General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
| 19 | ** General Public License version 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | #ifndef QMEDIAENCODERSETTINGS_H |
| 41 | #define QMEDIAENCODERSETTINGS_H |
| 42 | |
| 43 | #include <QtCore/qsharedpointer.h> |
| 44 | #include <QtCore/qstring.h> |
| 45 | #include <QtCore/qsize.h> |
| 46 | #include <QtCore/qvariant.h> |
| 47 | #include <QtMultimedia/qtmultimediaglobal.h> |
| 48 | #include <QtMultimedia/qmultimedia.h> |
| 49 | |
| 50 | QT_BEGIN_NAMESPACE |
| 51 | |
| 52 | |
| 53 | |
| 54 | class QAudioEncoderSettingsPrivate; |
| 55 | class Q_MULTIMEDIA_EXPORT QAudioEncoderSettings |
| 56 | { |
| 57 | public: |
| 58 | QAudioEncoderSettings(); |
| 59 | QAudioEncoderSettings(const QAudioEncoderSettings& other); |
| 60 | |
| 61 | ~QAudioEncoderSettings(); |
| 62 | |
| 63 | QAudioEncoderSettings& operator=(const QAudioEncoderSettings &other); |
| 64 | bool operator==(const QAudioEncoderSettings &other) const; |
| 65 | bool operator!=(const QAudioEncoderSettings &other) const; |
| 66 | |
| 67 | bool isNull() const; |
| 68 | |
| 69 | QMultimedia::EncodingMode encodingMode() const; |
| 70 | void setEncodingMode(QMultimedia::EncodingMode); |
| 71 | |
| 72 | QString codec() const; |
| 73 | void setCodec(const QString& codec); |
| 74 | |
| 75 | int bitRate() const; |
| 76 | void setBitRate(int bitrate); |
| 77 | |
| 78 | int channelCount() const; |
| 79 | void setChannelCount(int channels); |
| 80 | |
| 81 | int sampleRate() const; |
| 82 | void setSampleRate(int rate); |
| 83 | |
| 84 | QMultimedia::EncodingQuality quality() const; |
| 85 | void setQuality(QMultimedia::EncodingQuality quality); |
| 86 | |
| 87 | QVariant encodingOption(const QString &option) const; |
| 88 | QVariantMap encodingOptions() const; |
| 89 | void setEncodingOption(const QString &option, const QVariant &value); |
| 90 | void setEncodingOptions(const QVariantMap &options); |
| 91 | |
| 92 | private: |
| 93 | QSharedDataPointer<QAudioEncoderSettingsPrivate> d; |
| 94 | }; |
| 95 | |
| 96 | class QVideoEncoderSettingsPrivate; |
| 97 | class Q_MULTIMEDIA_EXPORT QVideoEncoderSettings |
| 98 | { |
| 99 | public: |
| 100 | QVideoEncoderSettings(); |
| 101 | QVideoEncoderSettings(const QVideoEncoderSettings& other); |
| 102 | |
| 103 | ~QVideoEncoderSettings(); |
| 104 | |
| 105 | QVideoEncoderSettings& operator=(const QVideoEncoderSettings &other); |
| 106 | bool operator==(const QVideoEncoderSettings &other) const; |
| 107 | bool operator!=(const QVideoEncoderSettings &other) const; |
| 108 | |
| 109 | bool isNull() const; |
| 110 | |
| 111 | QMultimedia::EncodingMode encodingMode() const; |
| 112 | void setEncodingMode(QMultimedia::EncodingMode); |
| 113 | |
| 114 | QString codec() const; |
| 115 | void setCodec(const QString &); |
| 116 | |
| 117 | QSize resolution() const; |
| 118 | void setResolution(const QSize &); |
| 119 | void setResolution(int width, int height); |
| 120 | |
| 121 | qreal frameRate() const; |
| 122 | void setFrameRate(qreal rate); |
| 123 | |
| 124 | int bitRate() const; |
| 125 | void setBitRate(int bitrate); |
| 126 | |
| 127 | QMultimedia::EncodingQuality quality() const; |
| 128 | void setQuality(QMultimedia::EncodingQuality quality); |
| 129 | |
| 130 | QVariant encodingOption(const QString &option) const; |
| 131 | QVariantMap encodingOptions() const; |
| 132 | void setEncodingOption(const QString &option, const QVariant &value); |
| 133 | void setEncodingOptions(const QVariantMap &options); |
| 134 | |
| 135 | private: |
| 136 | QSharedDataPointer<QVideoEncoderSettingsPrivate> d; |
| 137 | }; |
| 138 | |
| 139 | class QImageEncoderSettingsPrivate; |
| 140 | class Q_MULTIMEDIA_EXPORT QImageEncoderSettings |
| 141 | { |
| 142 | public: |
| 143 | QImageEncoderSettings(); |
| 144 | QImageEncoderSettings(const QImageEncoderSettings& other); |
| 145 | |
| 146 | ~QImageEncoderSettings(); |
| 147 | |
| 148 | QImageEncoderSettings& operator=(const QImageEncoderSettings &other); |
| 149 | bool operator==(const QImageEncoderSettings &other) const; |
| 150 | bool operator!=(const QImageEncoderSettings &other) const; |
| 151 | |
| 152 | bool isNull() const; |
| 153 | |
| 154 | QString codec() const; |
| 155 | void setCodec(const QString &); |
| 156 | |
| 157 | QSize resolution() const; |
| 158 | void setResolution(const QSize &); |
| 159 | void setResolution(int width, int height); |
| 160 | |
| 161 | QMultimedia::EncodingQuality quality() const; |
| 162 | void setQuality(QMultimedia::EncodingQuality quality); |
| 163 | |
| 164 | QVariant encodingOption(const QString &option) const; |
| 165 | QVariantMap encodingOptions() const; |
| 166 | void setEncodingOption(const QString &option, const QVariant &value); |
| 167 | void setEncodingOptions(const QVariantMap &options); |
| 168 | |
| 169 | private: |
| 170 | QSharedDataPointer<QImageEncoderSettingsPrivate> d; |
| 171 | }; |
| 172 | |
| 173 | QT_END_NAMESPACE |
| 174 | |
| 175 | Q_DECLARE_METATYPE(QAudioEncoderSettings) |
| 176 | Q_DECLARE_METATYPE(QVideoEncoderSettings) |
| 177 | Q_DECLARE_METATYPE(QImageEncoderSettings) |
| 178 | |
| 179 | |
| 180 | #endif |
| 181 |
