1 | // Copyright (C) 2021 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QGSTREAMERINTEGRATION_H |
5 | #define QGSTREAMERINTEGRATION_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <private/qplatformmediaintegration_p.h> |
19 | #include <gst/gst.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QGstreamerFormatInfo; |
24 | |
25 | class QGstreamerIntegration : public QPlatformMediaIntegration |
26 | { |
27 | public: |
28 | QGstreamerIntegration(); |
29 | |
30 | static QGstreamerIntegration *instance() |
31 | { |
32 | return static_cast<QGstreamerIntegration *>(QPlatformMediaIntegration::instance()); |
33 | } |
34 | |
35 | QMaybe<QPlatformAudioDecoder *> createAudioDecoder(QAudioDecoder *decoder) override; |
36 | QMaybe<QPlatformMediaCaptureSession *> createCaptureSession() override; |
37 | QMaybe<QPlatformMediaPlayer *> createPlayer(QMediaPlayer *player) override; |
38 | QMaybe<QPlatformCamera *> createCamera(QCamera *) override; |
39 | QMaybe<QPlatformMediaRecorder *> createRecorder(QMediaRecorder *) override; |
40 | QMaybe<QPlatformImageCapture *> createImageCapture(QImageCapture *) override; |
41 | |
42 | QMaybe<QPlatformVideoSink *> createVideoSink(QVideoSink *sink) override; |
43 | |
44 | QMaybe<QPlatformAudioInput *> createAudioInput(QAudioInput *) override; |
45 | QMaybe<QPlatformAudioOutput *> createAudioOutput(QAudioOutput *) override; |
46 | |
47 | const QGstreamerFormatInfo *gstFormatsInfo(); |
48 | GstDevice *videoDevice(const QByteArray &id) const; |
49 | |
50 | protected: |
51 | QPlatformMediaFormatInfo *createFormatInfo() override; |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif |
57 |