3#ifndef QFFMPEGHWACCEL_P_H
4#define QFFMPEGHWACCEL_P_H
17#include <QtFFmpegMediaPluginImpl/private/qffmpeg_p.h>
18#include <QtFFmpegMediaPluginImpl/private/qffmpegtextureconverter_p.h>
20#include <QtMultimedia/private/qhwvideobuffer_p.h>
21#include <QtMultimedia/private/qrhivaluemapper_p.h>
23#include <qshareddata.h>
45
46
47
63 AVBufferUPtr m_hwDeviceContext;
64 AVBufferUPtr m_hwFramesContext;
66 mutable std::once_flag m_constraintsOnceFlag;
67 mutable AVHWFramesConstraintsUPtr m_constraints;
95 HWAccel(AVBufferUPtr hwDeviceContext) : m_hwDeviceContext(std::move(hwDeviceContext)) { }
AVHWFramesContext * hwFramesContext() const
bool matchesSizeContraints(QSize size) const
static const std::vector< AVHWDeviceType > & decodingDeviceTypes()
AVBufferRef * hwFramesContextAsBuffer() const
static const std::vector< AVHWDeviceType > & encodingDeviceTypes()
void createFramesContext(AVPixelFormat swFormat, const QSize &size)
static AVPixelFormat format(AVFrame *frame)
AVBufferRef * hwDeviceContextAsBuffer() const
static HWAccelUPtr create(AVHWDeviceType deviceType)
const AVHWFramesConstraints * constraints() const
AVHWDeviceContext * hwDeviceContext() const
AVPixelFormat hwFormat() const
static std::pair< std::optional< Codec >, HWAccelUPtr > findDecoderWithHwAccel(AVCodecID id)
AVHWDeviceType deviceType() const
AVPixelFormat getFormat(AVCodecContext *s, const AVPixelFormat *fmt)
AVFrameUPtr copyFromHwPool(AVFrameUPtr frame)
bool findAndOpenAVDecoder(AVCodecID codecId, const std::function< AVScore(const Codec &)> &scoresGetter, const std::function< bool(const Codec &)> &codecOpener)
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType
std::optional< Codec > findAVEncoder(AVCodecID codecId, const std::optional< PixelOrSampleFormat > &format={})
bool findAndOpenAVEncoder(AVCodecID codecId, const std::function< AVScore(const Codec &)> &scoresGetter, const std::function< bool(const Codec &)> &codecOpener)
std::optional< Codec > findAVDecoder(AVCodecID codecId, const std::optional< PixelOrSampleFormat > &format={})
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)
The HwFrameContextData class contains custom belongings of hw frames context.
static HwFrameContextData & ensure(AVFrame &hwFrame)
gets or creates an instance of the class, associated with the frames context of the specified frame....
QRhiValueMapper< TextureConverter > textureConverterMapper