QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
gstqgcqvideosink.cc File Reference
#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"
Include dependency graph for gstqgcqvideosink.cc:

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.

Macro Definition Documentation

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_qgc_debug

Definition at line 31 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 
PROP_FRAME_STATS 
PROP_PICTURE_WIDTH 
PROP_PICTURE_HEIGHT 

Definition at line 226 of file gstqgcqvideosink.cc.

Function Documentation

◆ gst_qgc_q_video_sink_class_init()

◆ gst_qgc_q_video_sink_constructed()

void gst_qgc_q_video_sink_constructed ( GObject * obj)
static

Definition at line 258 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_event()

gboolean gst_qgc_q_video_sink_event ( GstBaseSink * bsink,
GstEvent * event )
static

Definition at line 474 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_finalize()

void gst_qgc_q_video_sink_finalize ( GObject * obj)
static

Definition at line 264 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_get_caps()

GstCaps * gst_qgc_q_video_sink_get_caps ( GstBaseSink * bsink,
GstCaps * filter )
static

Definition at line 335 of file gstqgcqvideosink.cc.

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_get_property()

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

◆ gst_qgc_q_video_sink_init()

void gst_qgc_q_video_sink_init ( GstQgcQVideoSink * self)
static

Definition at line 243 of file gstqgcqvideosink.cc.

References gst_qgc_q_video_sink_init().

Referenced by gst_qgc_q_video_sink_init().

◆ gst_qgc_q_video_sink_propose_allocation()

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

Definition at line 532 of file gstqgcqvideosink.cc.

References GstQgc::populateAllocationQuery().

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_query()

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

◆ gst_qgc_q_video_sink_set_caps()

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

◆ gst_qgc_q_video_sink_set_property()

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

◆ gst_qgc_q_video_sink_show_frame()

◆ gst_qgc_q_video_sink_start()

gboolean gst_qgc_q_video_sink_start ( GstBaseSink * bsink)
static

Definition at line 502 of file gstqgcqvideosink.cc.

References HwBuffers::makeAdapterContext().

Referenced by gst_qgc_q_video_sink_class_init().

◆ gst_qgc_q_video_sink_stop()

gboolean gst_qgc_q_video_sink_stop ( GstBaseSink * bsink)
static

Variable Documentation

◆ sink_template

GstStaticPadTemplate sink_template
static
Initial value:
=
GST_STATIC_PAD_TEMPLATE("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS("video/x-raw(ANY)"))

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().