20#include "private/qvideotransformation_p.h"
33 if (videoBuffer && mapMode != QVideoFrame::NotMapped)
37 template <
typename Buffer>
38 static QVideoFrame
createFrame(std::unique_ptr<Buffer> buffer, QVideoFrameFormat format)
41 result.d.reset(
new QVideoFramePrivate(std::move(format), std::move(buffer)));
45 template <
typename Buffer = QAbstractVideoBuffer>
49 if constexpr (std::is_base_of_v<QHwVideoBuffer, Buffer>)
50 hwVideoBuffer =
static_cast<QHwVideoBuffer *>(videoBuffer.get());
51 else if constexpr (std::is_same_v<QAbstractVideoBuffer, Buffer>)
52 hwVideoBuffer =
dynamic_cast<QHwVideoBuffer *>(videoBuffer.get());
60 return frame.d ? frame.d->hwVideoBuffer :
nullptr;
63 static QAbstractVideoBuffer *
buffer(
const QVideoFrame &frame)
65 return frame.d ? frame.d->videoBuffer.get() :
nullptr;
71 frame.d = QExplicitlySharedDataPointer(
this, QAdoptSharedDataTag{});
QVideoFrame::MapMode mapMode
static QVideoFramePrivate * handle(QVideoFrame &frame)
static QAbstractVideoBuffer * buffer(const QVideoFrame &frame)
QAbstractVideoBuffer::MapData mapData
QVideoFramePrivate()=default
QHwVideoBuffer * hwVideoBuffer
QVideoFrame adoptThisByVideoFrame()
static QVideoFrame createFrame(std::unique_ptr< Buffer > buffer, QVideoFrameFormat format)
std::unique_ptr< QAbstractVideoBuffer > videoBuffer
VideoTransformation presentationTransformation
QVideoFramePrivate(QVideoFrameFormat format, std::unique_ptr< Buffer > buffer=nullptr)
static QHwVideoBuffer * hwBuffer(const QVideoFrame &frame)
Combined button and popup list for selecting options.
static QString qFormatTimeStamps(qint64 start, qint64 end)