4#ifndef QFFMPEGVIDEOBUFFER_P_H
5#define QFFMPEGVIDEOBUFFER_P_H
18#include <QtMultimedia/private/qhwvideobuffer_p.h>
19#include <QtCore/qvariant.h>
21#include <QtFFmpegMediaPluginImpl/private/qffmpeg_p.h>
22#include <QtFFmpegMediaPluginImpl/private/qffmpeghwaccel_p.h>
34 MapData map(QVideoFrame::MapMode mode)
override;
61 QFFmpeg::TextureConverter &ensureTextureConverter(QRhi &rhi);
63 QVideoFrameTexturesUPtr createTexturesFromHwFrame(QRhi &, QVideoFrameTexturesUPtr& oldTextures);
66 QVideoFrameFormat::PixelFormat m_pixelFormat;
67 AVFrame *m_frame =
nullptr;
68 AVFrameUPtr m_hwFrame;
69 AVFrameUPtr m_swFrame;
QVideoFrameFormat::PixelFormat pixelFormat() const
QVideoFrameFormat::ColorSpace colorSpace() const
QRhi * rhi() const override
void unmap() override
Releases the memory mapped by the map() function.
MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
QVideoFrameFormat::ColorTransfer colorTransfer() const
void initTextureConverter(QRhi &rhi) override
static AVPixelFormat toAVPixelFormat(QVideoFrameFormat::PixelFormat pixelFormat)
QVideoFrameTexturesUPtr mapTextures(QRhi &, QVideoFrameTexturesUPtr &oldTextures) override
QVideoFrameFormat::ColorRange colorRange() const
AVFrame * getHWFrame() const
static QVideoFrameFormat::PixelFormat toQtPixelFormat(AVPixelFormat avPixelFormat, bool *needsConversion=nullptr)
QFFmpegVideoBuffer(AVFrameUPtr frame, AVRational pixelAspectRatio={ 1, 1 })
~QFFmpegVideoBuffer() override
RenderingResult renderInternal(Frame frame) override
void setOutput(QVideoSink *sink, bool cleanPrevSink=false)
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType