| 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 QFFMPEGMEDIAINTEGRATION_H |
| 5 | #define QFFMPEGMEDIAINTEGRATION_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 <QtMultimedia/private/qplatformmediaintegration_p.h> |
| 19 | |
| 20 | QT_BEGIN_NAMESPACE |
| 21 | |
| 22 | extern bool thread_local FFmpegLogsEnabledInThread; |
| 23 | |
| 24 | class QFFmpegMediaFormatInfo; |
| 25 | |
| 26 | class QFFmpegMediaIntegration : public QPlatformMediaIntegration |
| 27 | { |
| 28 | public: |
| 29 | QFFmpegMediaIntegration(); |
| 30 | |
| 31 | QMaybe<QPlatformAudioDecoder *> createAudioDecoder(QAudioDecoder *decoder) override; |
| 32 | QMaybe<std::unique_ptr<QPlatformAudioResampler>> createAudioResampler(const QAudioFormat &inputFormat, const QAudioFormat &outputFormat) override; |
| 33 | QMaybe<QPlatformMediaCaptureSession *> createCaptureSession() override; |
| 34 | QMaybe<QPlatformMediaPlayer *> createPlayer(QMediaPlayer *player) override; |
| 35 | QMaybe<QPlatformCamera *> createCamera(QCamera *) override; |
| 36 | QPlatformSurfaceCapture *createScreenCapture(QScreenCapture *) override; |
| 37 | QPlatformSurfaceCapture *createWindowCapture(QWindowCapture *) override; |
| 38 | QMaybe<QPlatformMediaRecorder *> createRecorder(QMediaRecorder *) override; |
| 39 | QMaybe<QPlatformImageCapture *> createImageCapture(QImageCapture *) override; |
| 40 | |
| 41 | QMaybe<QPlatformVideoSink *> createVideoSink(QVideoSink *sink) override; |
| 42 | |
| 43 | QMaybe<QPlatformAudioInput *> createAudioInput(QAudioInput *input) override; |
| 44 | // QPlatformAudioOutput *createAudioOutput(QAudioOutput *) override; |
| 45 | |
| 46 | QVideoFrame convertVideoFrame(QVideoFrame &srcFrame, |
| 47 | const QVideoFrameFormat &destFormat) override; |
| 48 | |
| 49 | protected: |
| 50 | QPlatformMediaFormatInfo *createFormatInfo() override; |
| 51 | |
| 52 | QPlatformVideoDevices *createVideoDevices() override; |
| 53 | |
| 54 | QPlatformCapturableWindows *createCapturableWindows() override; |
| 55 | }; |
| 56 | |
| 57 | QT_END_NAMESPACE |
| 58 | |
| 59 | #endif |
| 60 |
