#include "gstqgcqvideosink.h"#include <atomic>#include <gst/video/video-info.h>#include <gst/video/video.h>#include <memory>#include <new>#include <utility>#include <QtCore/QRect>#include <QtCore/QSize>#include <QtMultimedia/QVideoFrame>#include <QtMultimedia/QVideoFrameFormat>#include <QtMultimedia/QVideoSink>#include "GstQgcAllocation.h"#include "GstQgcCaps.h"#include "GstQgcFrameDelivery.h"#include "GstQgcFrameMap.h"#include "GstQgcPathSession.h"#include "GstQgcSinkCounters.h"#include "GstQgcSinkStats.h"#include "HwBuffers/HwBuffers.h"#include "HwBuffers/common/GstHwVideoInfo.h"#include "QGCLoggingCategory.h"#include "gstqgcelements.h"#include "gstqgcvideosinkbin.h"Go to the source code of this file.
Classes | |
| struct | _GstQgcQVideoSink |
Namespaces | |
| namespace | GstQgc |
| GstVideoSink that pushes decoded frames into a Qt QVideoSink; sole sink in qgcvideosinkbin. Streaming-thread vfuncs MUST NOT touch QObject members directly (thread-affinity asserts) — hand off via QMetaObject::invokeMethod / bus messages. | |
Macros | |
| #define | GST_CAT_DEFAULT gst_qgc_debug |
Enumerations | |
| enum | { PROP_0 , PROP_QVIDEOSINK , PROP_ACTIVE , PROP_GPU_ZEROCOPY , PROP_FRAMES_INPUT , PROP_FRAMES_DROPPED , PROP_FRAMES_DELIVERED , PROP_FRAME_STATS , PROP_PICTURE_WIDTH , PROP_PICTURE_HEIGHT } |
Functions | |
| static void | gst_qgc_q_video_sink_init (GstQgcQVideoSink *self) |
| static void | gst_qgc_q_video_sink_constructed (GObject *obj) |
| static void | gst_qgc_q_video_sink_finalize (GObject *obj) |
| static void | gst_qgc_q_video_sink_set_property (GObject *obj, guint id, const GValue *val, GParamSpec *pspec) |
| static void | gst_qgc_q_video_sink_get_property (GObject *obj, guint id, GValue *val, GParamSpec *pspec) |
| static GstCaps * | gst_qgc_q_video_sink_get_caps (GstBaseSink *bsink, GstCaps *filter) |
| static gboolean | gst_qgc_q_video_sink_set_caps (GstBaseSink *bsink, GstCaps *caps) |
| static GstFlowReturn | gst_qgc_q_video_sink_show_frame (GstVideoSink *vsink, GstBuffer *buf) |
| static gboolean | gst_qgc_q_video_sink_event (GstBaseSink *bsink, GstEvent *event) |
| static gboolean | gst_qgc_q_video_sink_start (GstBaseSink *bsink) |
| static gboolean | gst_qgc_q_video_sink_stop (GstBaseSink *bsink) |
| static gboolean | gst_qgc_q_video_sink_propose_allocation (GstBaseSink *bsink, GstQuery *query) |
| static gboolean | gst_qgc_q_video_sink_query (GstBaseSink *bsink, GstQuery *query) |
| static void | gst_qgc_q_video_sink_class_init (GstQgcQVideoSinkClass *klass) |
| void | GstQgc::configureSinkCaps (GstElement *sink, GpuBinMode gpuBin, bool squarePixels) |
Variables | |
| static GstStaticPadTemplate | sink_template |
| get_caps narrows this to the formats and memory the sink takes for its render target. | |
| #define GST_CAT_DEFAULT gst_qgc_debug |
Definition at line 31 of file gstqgcqvideosink.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| PROP_0 | |
| PROP_QVIDEOSINK | |
| PROP_ACTIVE | |
| PROP_GPU_ZEROCOPY | |
| PROP_FRAMES_INPUT | |
| PROP_FRAMES_DROPPED | |
| PROP_FRAMES_DELIVERED | |
| PROP_FRAME_STATS | |
| PROP_PICTURE_WIDTH | |
| PROP_PICTURE_HEIGHT | |
Definition at line 226 of file gstqgcqvideosink.cc.
|
static |
Definition at line 566 of file gstqgcqvideosink.cc.
References gst_qgc_q_video_sink_constructed(), gst_qgc_q_video_sink_event(), gst_qgc_q_video_sink_finalize(), gst_qgc_q_video_sink_get_caps(), gst_qgc_q_video_sink_get_property(), gst_qgc_q_video_sink_propose_allocation(), gst_qgc_q_video_sink_query(), gst_qgc_q_video_sink_set_caps(), gst_qgc_q_video_sink_set_property(), gst_qgc_q_video_sink_show_frame(), gst_qgc_q_video_sink_start(), gst_qgc_q_video_sink_stop(), PROP_ACTIVE, PROP_FRAME_STATS, PROP_FRAMES_DELIVERED, PROP_FRAMES_DROPPED, PROP_FRAMES_INPUT, PROP_GPU_ZEROCOPY, PROP_PICTURE_HEIGHT, PROP_PICTURE_WIDTH, PROP_QVIDEOSINK, and sink_template.
|
static |
Definition at line 258 of file gstqgcqvideosink.cc.
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 474 of file gstqgcqvideosink.cc.
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 264 of file gstqgcqvideosink.cc.
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 335 of file gstqgcqvideosink.cc.
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 296 of file gstqgcqvideosink.cc.
References PROP_ACTIVE, PROP_FRAME_STATS, PROP_FRAMES_DELIVERED, PROP_FRAMES_DROPPED, PROP_FRAMES_INPUT, PROP_GPU_ZEROCOPY, PROP_PICTURE_HEIGHT, PROP_PICTURE_WIDTH, and PROP_QVIDEOSINK.
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 243 of file gstqgcqvideosink.cc.
References gst_qgc_q_video_sink_init().
Referenced by gst_qgc_q_video_sink_init().
|
static |
Definition at line 532 of file gstqgcqvideosink.cc.
References GstQgc::populateAllocationQuery().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 548 of file gstqgcqvideosink.cc.
References HwBuffers::answerSinkBinContextQuery().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 346 of file gstqgcqvideosink.cc.
References applyColorimetry(), GstHw::dmaDrmAwareVideoInfo(), GstQgc::PathSession::startEpoch(), and toQtPixelFormat().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 273 of file gstqgcqvideosink.cc.
References PROP_ACTIVE, PROP_GPU_ZEROCOPY, PROP_QVIDEOSINK, and GstQgc::FrameDelivery::setSink().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 398 of file gstqgcqvideosink.cc.
References applyFlips(), applyOrientationAndTiming(), GstQgc::PathSession::consecutiveMapFailures(), GstQgc::FrameDelivery::deliver(), GstQgc::FrameDelivery::Result::delivered, GstQgc::SinkCapsPolicy::dmaBufDisplay, HwVideoBufferContext::dmaBufImporter, GstQgc::SinkCounters::dropped(), GstQgc::PathSession::Error, MappedFrame::frame, frameGeometry(), HwVideoBufferContext::gpuEnabled, MappedFrame::gpuPath, GstQgc::SinkCounters::input(), mapSampleToFrame(), None, GstQgc::SinkCounters::noteDelivered(), GstQgc::SinkCounters::noteDropped(), GstQgc::SinkCounters::noteInput(), GstQgc::PathSession::onDelivered(), GstQgc::PathSession::onMapFailed(), GstQgc::PathSession::onMapped(), GstQgc::PathSession::pathCache(), GstQgc::SinkCounters::pathFrames(), GstQgc::FrameDelivery::Result::superseded, GstHw::toString(), and withFrameGeometry().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 502 of file gstqgcqvideosink.cc.
References HwBuffers::makeAdapterContext().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
Definition at line 516 of file gstqgcqvideosink.cc.
References GstQgc::FrameDelivery::dropPending(), and GstQgc::PathSession::stop().
Referenced by gst_qgc_q_video_sink_class_init().
|
static |
get_caps narrows this to the formats and memory the sink takes for its render target.
Definition at line 223 of file gstqgcqvideosink.cc.
Referenced by gst_qgc_q_video_sink_class_init().