QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstHwVideoBuffer.cc
Go to the documentation of this file.
1#include "GstHwVideoBuffer.h"
2
3GstHwVideoBuffer::GstHwVideoBuffer(QVideoFrame::HandleType handleType,
4 GstSample *sample,
5 const GstVideoInfo &videoInfo,
6 QVideoFrameFormat format)
7 : QHwVideoBuffer(handleType, nullptr)
8 , _sample(sample ? gst_sample_ref(sample) : nullptr)
9 , _videoInfo(videoInfo)
10 , _format(std::move(format))
11{
12 // Crop is applied by the renderer via QVideoFrameFormat::viewport(); see GstAppSinkAdapter::applyCropMeta.
13}
14
16{
17 if (_sample) {
18 gst_sample_unref(_sample);
19 }
20}
GstHwVideoBuffer(QVideoFrame::HandleType handleType, GstSample *sample, const GstVideoInfo &videoInfo, QVideoFrameFormat format)
~GstHwVideoBuffer() override