QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
gstqgcqvideosink.cc File Reference
#include "gstqgcqvideosink.h"
#include <QtCore/QMetaObject>
#include <QtCore/QPointer>
#include <QtMultimedia/QVideoFrame>
#include <QtMultimedia/QVideoFrameFormat>
#include <QtMultimedia/QVideoSink>
#include <gst/video/video-info.h>
#include <gst/video/video.h>
#include "GStreamerFrameMap.h"
#include "GstQgcAllocation.h"
#include "HwBuffers/dmabuf/GstDmaDrmCaps.h"
#include "QGCLoggingCategory.h"
#include "gstqgcelements.h"
#include <atomic>
+ Include dependency graph for gstqgcqvideosink.cc:

Go to the source code of this file.

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
}
 

Functions

static void gst_qgc_q_video_sink_init (GstQgcQVideoSink *self)
 
void gst_qgc_q_video_sink_set_hw_context (GstQgcQVideoSink *self, const HwVideoBufferContext &ctx)
 
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 gboolean gst_qgc_q_video_sink_set_caps (GstBaseSink *bsink, GstCaps *caps)
 
static const char * describeMappedPath (const MappedFrame &m) noexcept
 
static GstFlowReturn gst_qgc_q_video_sink_show_frame (GstVideoSink *vsink, GstBuffer *buf)
 
static gboolean gst_qgc_q_video_sink_propose_allocation (GstBaseSink *bsink, GstQuery *query)
 
static void gst_qgc_q_video_sink_class_init (GstQgcQVideoSinkClass *klass)
 

Variables

static GstStaticPadTemplate sink_template
 
constexpr quint64 kMaxConsecutiveMapFailures = 120
 

Macro Definition Documentation

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_qgc_debug

Definition at line 24 of file gstqgcqvideosink.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_0 
PROP_QVIDEOSINK 
PROP_ACTIVE 
PROP_GPU_ZEROCOPY 
PROP_FRAMES_INPUT 
PROP_FRAMES_DROPPED 
PROP_FRAMES_DELIVERED 

Definition at line 91 of file gstqgcqvideosink.cc.

Function Documentation

◆ describeMappedPath()

static const char * describeMappedPath ( const MappedFrame m)
staticnoexcept

◆ gst_qgc_q_video_sink_class_init()

◆ gst_qgc_q_video_sink_finalize()

static void gst_qgc_q_video_sink_finalize ( GObject *  obj)
static

Definition at line 130 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_get_property()

static void gst_qgc_q_video_sink_get_property ( GObject *  obj,
guint  id,
GValue *  val,
GParamSpec *  pspec 
)
static

◆ gst_qgc_q_video_sink_init()

static void gst_qgc_q_video_sink_init ( GstQgcQVideoSink *  self)
static

Definition at line 105 of file gstqgcqvideosink.cc.

◆ gst_qgc_q_video_sink_propose_allocation()

static gboolean gst_qgc_q_video_sink_propose_allocation ( GstBaseSink *  bsink,
GstQuery *  query 
)
static

Definition at line 399 of file gstqgcqvideosink.cc.

References GstQgc::populateAllocationQuery().

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_set_caps()

static gboolean gst_qgc_q_video_sink_set_caps ( GstBaseSink *  bsink,
GstCaps *  caps 
)
static

◆ gst_qgc_q_video_sink_set_hw_context()

void gst_qgc_q_video_sink_set_hw_context ( GstQgcQVideoSink *  self,
const HwVideoBufferContext ctx 
)

Definition at line 121 of file gstqgcqvideosink.cc.

Referenced by GStreamer::setupQVideoSinkElement().

◆ gst_qgc_q_video_sink_set_property()

static void gst_qgc_q_video_sink_set_property ( GObject *  obj,
guint  id,
const GValue *  val,
GParamSpec *  pspec 
)
static

Definition at line 139 of file gstqgcqvideosink.cc.

References PROP_ACTIVE, PROP_GPU_ZEROCOPY, and PROP_QVIDEOSINK.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_show_frame()

Variable Documentation

◆ kMaxConsecutiveMapFailures

constexpr quint64 kMaxConsecutiveMapFailures = 120
constexpr

Definition at line 260 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_show_frame().

◆ sink_template

GstStaticPadTemplate sink_template
static
Initial value:
=
GST_STATIC_PAD_TEMPLATE("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY)

Pad template — sink accepts any video caps. The downstream conversion (videoconvert/glupload) already happens upstream in qgcvideosinkbin.

Definition at line 88 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().