4#include <gst/video/video-info.h>
5#include <gst/video/video.h>
9#include <QtMultimedia/QVideoFrame>
10#include <QtMultimedia/QVideoFrameFormat>
17QVideoFrameFormat::ColorSpace
toQtColorSpace(GstVideoColorMatrix matrix);
18QVideoFrameFormat::ColorTransfer
toQtColorTransfer(GstVideoTransferFunction transfer);
20QVideoFrameFormat::ColorRange
toQtColorRange(GstVideoColorRange range);
30void applyColorimetry(QVideoFrameFormat& format,
const GstVideoInfo& info, GstCaps* caps);
HwVideoBufferPath
GPU zero-copy path a frame is imported through; None means the frame takes the CPU path.
QVideoFrameFormat::PixelFormat toQtPixelFormat(GstVideoFormat fmt)
QVideoFrameFormat::ColorTransfer toQtColorTransfer(GstVideoTransferFunction transfer)
void applyColorimetry(QVideoFrameFormat &format, const GstVideoInfo &info, GstCaps *caps)
FrameGeometry frameGeometry(GstBuffer *buffer, const GstVideoInfo &capsInfo)
QVideoFrameFormat withFrameGeometry(QVideoFrameFormat format, const FrameGeometry &geometry)
format for frames of geometry: its frame size, with the picture as the viewport.
MappedFrame mapSampleToFrame(GstBuffer *buffer, GstCaps *caps, const GstVideoInfo &info, const QVideoFrameFormat &format, const HwVideoBufferContext &hwContext, const CpuVideoFramePool::PinnedFrameCounter &pinnedCpuFrames, HwResolvedPathCache *pathCache=nullptr)
void applyFlips(QVideoFrame &frame, const FrameGeometry &geometry)
Flips frame's picture as geometry tells, ahead of the rotation and mirroring the frame already has.
QVideoFrameFormat::ColorSpace toQtColorSpace(GstVideoColorMatrix matrix)
Sample-to-frame helpers for qgcqvideosink's show_frame; pure functions, streaming-thread safe.
void applyOrientationAndTiming(QVideoFrame &frame, GstBuffer *buffer, int streamOrientation)
The stream's orientation + PTS/duration timing; streamOrientation is GstVideoOrientationMethod cast t...
void applyOrientationToFrame(QVideoFrame &frame, GstVideoOrientationMethod method)
Apply rotation + mirror flags derived from GstVideoOrientationMethod.
QVideoFrameFormat::ColorRange toQtColorRange(GstVideoColorRange range)
std::shared_ptr< std::atomic< int > > PinnedFrameCounter
Live zero-copy frames of one sink; shared so frames Qt still holds after the sink is gone can release...
friend bool operator==(const FrameGeometry &, const FrameGeometry &)=default
HwVideoBufferPath gpuPath
None for a CPU frame, and for one that failed to map.
bool demoted
A GPU path was requested for this stream but this frame fell back to CPU.
bool noCpuLayout
Dropped instead of read as linear rows, which would show it scrambled.