Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qffmpegmediaintegration_p.h
Go to the documentation of this file.
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
21
22extern bool thread_local FFmpegLogsEnabledInThread;
23
24class QFFmpegMediaFormatInfo;
25
27{
28public:
30
31 q23::expected<QPlatformAudioDecoder *, QString> createAudioDecoder(QAudioDecoder *decoder) override;
33 createAudioResampler(const QAudioFormat &inputFormat,
34 const QAudioFormat &outputFormat) override;
36 q23::expected<QPlatformMediaPlayer *, QString> createPlayer(QMediaPlayer *player) override;
37 q23::expected<QPlatformCamera *, QString> createCamera(QCamera *) override;
38 QPlatformSurfaceCapture *createScreenCapture(QScreenCapture *) override;
39 QPlatformSurfaceCapture *createWindowCapture(QWindowCapture *) override;
40 q23::expected<QPlatformMediaRecorder *, QString> createRecorder(QMediaRecorder *) override;
41 q23::expected<QPlatformImageCapture *, QString> createImageCapture(QImageCapture *) override;
42
43 q23::expected<QPlatformVideoSink *, QString> createVideoSink(QVideoSink *sink) override;
44
45 q23::expected<QPlatformAudioInput *, QString> createAudioInput(QAudioInput *input) override;
46// QPlatformAudioOutput *createAudioOutput(QAudioOutput *) override;
47
48 QVideoFrame convertVideoFrame(QVideoFrame &srcFrame,
49 const QVideoFrameFormat &destFormat) override;
50
51protected:
53
55
57};
58
59QT_END_NAMESPACE
60
61#endif
q23::expected< QPlatformVideoSink *, QString > createVideoSink(QVideoSink *sink) override
q23::expected< QPlatformMediaRecorder *, QString > createRecorder(QMediaRecorder *) override
QPlatformMediaFormatInfo * createFormatInfo() override
q23::expected< QPlatformMediaPlayer *, QString > createPlayer(QMediaPlayer *player) override
q23::expected< std::unique_ptr< QPlatformAudioResampler >, QString > createAudioResampler(const QAudioFormat &inputFormat, const QAudioFormat &outputFormat) override
QPlatformSurfaceCapture * createScreenCapture(QScreenCapture *) override
QVideoFrame convertVideoFrame(QVideoFrame &srcFrame, const QVideoFrameFormat &destFormat) override
q23::expected< QPlatformMediaCaptureSession *, QString > createCaptureSession() override
q23::expected< QPlatformAudioDecoder *, QString > createAudioDecoder(QAudioDecoder *decoder) override
QPlatformVideoDevices * createVideoDevices() override
QPlatformCapturableWindows * createCapturableWindows() override
QPlatformSurfaceCapture * createWindowCapture(QWindowCapture *) override
q23::expected< QPlatformImageCapture *, QString > createImageCapture(QImageCapture *) override
q23::expected< QPlatformAudioInput *, QString > createAudioInput(QAudioInput *input) override
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *) override
AVHWFramesContext * hwFramesContext() const
bool matchesSizeContraints(QSize size) const
void createFramesContext(AVPixelFormat swFormat, const QSize &size)
const AVHWFramesConstraints * constraints() const
AVHWDeviceContext * hwDeviceContext() const
AVPixelFormat hwFormat() const
AVHWDeviceType deviceType() const
AVPixelFormat getFormat(AVCodecContext *s, const AVPixelFormat *fmt)
static bool isNoConversionFormat(AVPixelFormat f)
AVFrameUPtr copyFromHwPool(AVFrameUPtr frame)
static const std::vector< AVHWDeviceType > & deviceTypes()
static AVBufferUPtr loadHWContext(AVHWDeviceType type)
static bool checkHwType(AVHWDeviceType type)
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType
static void deleteHwFrameContextData(AVHWFramesContext *context)
static bool precheckDriver(AVHWDeviceType type)
static std::vector< AVHWDeviceType > deviceTypes(const char *envVarName)
static const std::initializer_list< AVHWDeviceType > preferredHardwareAccelerators
QT_BEGIN_NAMESPACE bool thread_local FFmpegLogsEnabledInThread
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)
The HwFrameContextData class contains custom belongings of hw frames context.