QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
gstqgcvideosinkbin.cc File Reference
#include "gstqgcvideosinkbin.h"
#include "gstqgcelements.h"
#include <gst/app/gstappsink.h>
#include <gst/video/gstvideometa.h>
#include <gst/video/video-info.h>
#include <string>
+ Include dependency graph for gstqgcvideosinkbin.cc:

Go to the source code of this file.

Macros

#define GST_CAT_DEFAULT   gst_qgc_debug
 
#define DEFAULT_ENABLE_LAST_SAMPLE   FALSE
 
#define DEFAULT_SYNC   FALSE
 
#define DEFAULT_MAX_LATENESS   G_GINT64_CONSTANT(-1)
 
#define PROP_ENABLE_LAST_SAMPLE_NAME   "enable-last-sample"
 
#define PROP_LAST_SAMPLE_NAME   "last-sample"
 
#define PROP_SYNC_NAME   "sync"
 
#define PROP_MAX_LATENESS_NAME   "max-lateness"
 
#define gst_qgc_video_sink_bin_parent_class   parent_class
 

Enumerations

enum  {
  PROP_0 , PROP_ENABLE_LAST_SAMPLE , PROP_LAST_SAMPLE , PROP_SYNC ,
  PROP_MAX_LATENESS , PROP_GPU_ZEROCOPY , PROP_CONVERSION_ELEMENT , PROP_DISABLE_PAR ,
  PROP_LAST
}
 

Functions

 G_DEFINE_TYPE (GstQgcVideoSinkBin, gst_qgc_video_sink_bin, GST_TYPE_BIN)
 
 GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (qgcvideosinkbin,"qgcvideosinkbin", GST_RANK_NONE, GST_TYPE_QGC_VIDEO_SINK_BIN, qgc_element_init(plugin))
 
static void gst_qgc_video_sink_bin_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void gst_qgc_video_sink_bin_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void gst_qgc_video_sink_bin_constructed (GObject *object)
 
static void gst_qgc_video_sink_bin_dispose (GObject *object)
 
static GstStateChangeReturn gst_qgc_video_sink_bin_change_state (GstElement *element, GstStateChange transition)
 
static void gst_qgc_video_sink_bin_class_init (GstQgcVideoSinkBinClass *klass)
 
static GstPadProbeReturn gst_qgc_handle_allocation_query (GstQuery *query)
 
static GstPadProbeReturn gst_qgc_appsink_query_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
 
static gboolean gst_qgc_video_sink_bin_ghost_pad (GstQgcVideoSinkBin *self, GstElement *inner)
 
static void gst_qgc_video_sink_bin_init (GstQgcVideoSinkBin *self)
 
static GstElementgst_qgc_video_sink_bin_make_conversion_element (GstQgcVideoSinkBin *self)
 
static void gst_qgc_video_sink_bin_setup (GstQgcVideoSinkBin *self)
 
GstElementgst_qgc_video_sink_bin_get_appsink (GstQgcVideoSinkBin *self)
 

Variables

static GParamSpec * properties [PROP_LAST]
 
static GstStaticPadTemplate sink_factory
 
constexpr guint kProposedMinBuffers = 4
 

Macro Definition Documentation

◆ DEFAULT_ENABLE_LAST_SAMPLE

#define DEFAULT_ENABLE_LAST_SAMPLE   FALSE

Definition at line 19 of file gstqgcvideosinkbin.cc.

◆ DEFAULT_MAX_LATENESS

#define DEFAULT_MAX_LATENESS   G_GINT64_CONSTANT(-1)

Definition at line 21 of file gstqgcvideosinkbin.cc.

◆ DEFAULT_SYNC

#define DEFAULT_SYNC   FALSE

Definition at line 20 of file gstqgcvideosinkbin.cc.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_qgc_debug

Definition at line 17 of file gstqgcvideosinkbin.cc.

◆ gst_qgc_video_sink_bin_parent_class

#define gst_qgc_video_sink_bin_parent_class   parent_class

Definition at line 49 of file gstqgcvideosinkbin.cc.

◆ PROP_ENABLE_LAST_SAMPLE_NAME

#define PROP_ENABLE_LAST_SAMPLE_NAME   "enable-last-sample"

Definition at line 23 of file gstqgcvideosinkbin.cc.

◆ PROP_LAST_SAMPLE_NAME

#define PROP_LAST_SAMPLE_NAME   "last-sample"

Definition at line 24 of file gstqgcvideosinkbin.cc.

◆ PROP_MAX_LATENESS_NAME

#define PROP_MAX_LATENESS_NAME   "max-lateness"

Definition at line 26 of file gstqgcvideosinkbin.cc.

◆ PROP_SYNC_NAME

#define PROP_SYNC_NAME   "sync"

Definition at line 25 of file gstqgcvideosinkbin.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_0 
PROP_ENABLE_LAST_SAMPLE 
PROP_LAST_SAMPLE 
PROP_SYNC 
PROP_MAX_LATENESS 
PROP_GPU_ZEROCOPY 
PROP_CONVERSION_ELEMENT 
PROP_DISABLE_PAR 
PROP_LAST 

Definition at line 28 of file gstqgcvideosinkbin.cc.

Function Documentation

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstQgcVideoSinkBin  ,
gst_qgc_video_sink_bin  ,
GST_TYPE_BIN   
)

◆ GST_ELEMENT_REGISTER_DEFINE_WITH_CODE()

GST_ELEMENT_REGISTER_DEFINE_WITH_CODE ( qgcvideosinkbin  ,
"qgcvideosinkbin"  ,
GST_RANK_NONE  ,
GST_TYPE_QGC_VIDEO_SINK_BIN  ,
qgc_element_init(plugin)   
)

◆ gst_qgc_appsink_query_probe()

static GstPadProbeReturn gst_qgc_appsink_query_probe ( GstPad *  pad,
GstPadProbeInfo *  info,
gpointer  user_data 
)
static

Definition at line 200 of file gstqgcvideosinkbin.cc.

References gst_qgc_handle_allocation_query().

Referenced by gst_qgc_video_sink_bin_setup().

◆ gst_qgc_handle_allocation_query()

static GstPadProbeReturn gst_qgc_handle_allocation_query ( GstQuery *  query)
static

Definition at line 141 of file gstqgcvideosinkbin.cc.

References kProposedMinBuffers.

Referenced by gst_qgc_appsink_query_probe().

◆ gst_qgc_video_sink_bin_change_state()

static GstStateChangeReturn gst_qgc_video_sink_bin_change_state ( GstElement element,
GstStateChange  transition 
)
static

◆ gst_qgc_video_sink_bin_class_init()

◆ gst_qgc_video_sink_bin_constructed()

static void gst_qgc_video_sink_bin_constructed ( GObject *  object)
static

◆ gst_qgc_video_sink_bin_dispose()

static void gst_qgc_video_sink_bin_dispose ( GObject *  object)
static

◆ gst_qgc_video_sink_bin_get_appsink()

GstElement * gst_qgc_video_sink_bin_get_appsink ( GstQgcVideoSinkBin *  self)

Returns the internal appsink element with a ref. Caller unrefs (transfer-full, matching gst_bin_get_by_name semantics). Returns NULL if the bin is not fully constructed yet.

Definition at line 634 of file gstqgcvideosinkbin.cc.

Referenced by GstAppSinkAdapter::setup().

◆ gst_qgc_video_sink_bin_get_property()

static void gst_qgc_video_sink_bin_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_qgc_video_sink_bin_ghost_pad()

static gboolean gst_qgc_video_sink_bin_ghost_pad ( GstQgcVideoSinkBin *  self,
GstElement inner 
)
static

Definition at line 226 of file gstqgcvideosinkbin.cc.

Referenced by gst_qgc_video_sink_bin_setup().

◆ gst_qgc_video_sink_bin_init()

static void gst_qgc_video_sink_bin_init ( GstQgcVideoSinkBin *  self)
static

Definition at line 251 of file gstqgcvideosinkbin.cc.

◆ gst_qgc_video_sink_bin_make_conversion_element()

static GstElement * gst_qgc_video_sink_bin_make_conversion_element ( GstQgcVideoSinkBin *  self)
static

Definition at line 264 of file gstqgcvideosinkbin.cc.

Referenced by gst_qgc_video_sink_bin_setup().

◆ gst_qgc_video_sink_bin_set_property()

static void gst_qgc_video_sink_bin_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_qgc_video_sink_bin_setup()

static void gst_qgc_video_sink_bin_setup ( GstQgcVideoSinkBin *  self)
static

Variable Documentation

◆ kProposedMinBuffers

constexpr guint kProposedMinBuffers = 4
constexpr

Definition at line 138 of file gstqgcvideosinkbin.cc.

Referenced by gst_qgc_handle_allocation_query().

◆ properties

GParamSpec* properties[PROP_LAST]
static

Definition at line 41 of file gstqgcvideosinkbin.cc.

Referenced by gst_qgc_video_sink_bin_class_init().

◆ sink_factory

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

Definition at line 43 of file gstqgcvideosinkbin.cc.

Referenced by gst_qgc_video_sink_bin_class_init().