1// qmediarecorder.sip generated by MetaSIP
2//
3// This file is part of the QtMultimedia Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QMediaRecorder : QObject, QMediaBindableInterface
24{
25%TypeHeaderCode
26#include <qmediarecorder.h>
27%End
28
29public:
30    enum State
31    {
32        StoppedState,
33        RecordingState,
34        PausedState,
35    };
36
37    enum Status
38    {
39        UnavailableStatus,
40        UnloadedStatus,
41        LoadingStatus,
42        LoadedStatus,
43        StartingStatus,
44        RecordingStatus,
45        PausedStatus,
46        FinalizingStatus,
47    };
48
49    enum Error
50    {
51        NoError,
52        ResourceError,
53        FormatError,
54        OutOfSpaceError,
55    };
56
57    QMediaRecorder(QMediaObject *mediaObject, QObject *parent /TransferThis/ = 0);
58    virtual ~QMediaRecorder();
59    virtual QMediaObject *mediaObject() const;
60    bool isAvailable() const;
61    QMultimedia::AvailabilityStatus availability() const;
62    QUrl outputLocation() const;
63    bool setOutputLocation(const QUrl &location);
64    QUrl actualLocation() const;
65    QMediaRecorder::State state() const;
66    QMediaRecorder::Status status() const;
67    QMediaRecorder::Error error() const;
68    QString errorString() const;
69    qint64 duration() const;
70    bool isMuted() const;
71    qreal volume() const;
72    QStringList supportedContainers() const;
73    QString containerDescription(const QString &format) const;
74    QStringList supportedAudioCodecs() const;
75    QString audioCodecDescription(const QString &codecName) const;
76    QList<int> supportedAudioSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(), bool *continuous = 0) const;
77    QStringList supportedVideoCodecs() const;
78    QString videoCodecDescription(const QString &codecName) const;
79    QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings = QVideoEncoderSettings(), bool *continuous = 0) const;
80    QList<qreal> supportedFrameRates(const QVideoEncoderSettings &settings = QVideoEncoderSettings(), bool *continuous = 0) const;
81    QAudioEncoderSettings audioSettings() const;
82    QVideoEncoderSettings videoSettings() const;
83    QString containerFormat() const;
84    void setAudioSettings(const QAudioEncoderSettings &audioSettings);
85    void setVideoSettings(const QVideoEncoderSettings &videoSettings);
86    void setContainerFormat(const QString &container);
87    void setEncodingSettings(const QAudioEncoderSettings &audio, const QVideoEncoderSettings &video = QVideoEncoderSettings(), const QString &container = QString());
88    bool isMetaDataAvailable() const;
89    bool isMetaDataWritable() const;
90    QVariant metaData(const QString &key) const;
91    void setMetaData(const QString &key, const QVariant &value);
92    QStringList availableMetaData() const;
93
94public slots:
95    void record();
96    void pause();
97    void stop();
98    void setMuted(bool muted);
99    void setVolume(qreal volume);
100
101signals:
102    void stateChanged(QMediaRecorder::State state);
103    void statusChanged(QMediaRecorder::Status status);
104    void durationChanged(qint64 duration);
105    void mutedChanged(bool muted);
106    void volumeChanged(qreal volume);
107    void actualLocationChanged(const QUrl &location);
108    void error(QMediaRecorder::Error error);
109    void metaDataAvailableChanged(bool available);
110    void metaDataWritableChanged(bool writable);
111    void metaDataChanged(const QString &key, const QVariant &value);
112    void metaDataChanged();
113    void availabilityChanged(QMultimedia::AvailabilityStatus availability /Constrained/);
114    void availabilityChanged(bool available);
115
116protected:
117    virtual bool setMediaObject(QMediaObject *object);
118};
119