NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h File Reference

Go to the source code of this file.

Data Structures

class  GstObjectUPtr< T >
 
class  GstCapsUPtr
 

Macros

#define NVGSTDS_ELEM_ADD_PROBE(parent_elem, elem, pad, probe_func, probe_type, probe_data)
 
#define NVGSTDS_LINK_ELEMENT(elem1, elem2, ...)
 
#define NVGSTDS_BIN_ADD_GHOST_PAD(bin, elem, pad, ...)
 
#define NVGSTDS_BIN_SET_GHOST_PAD_TARGET(bin, bin_pad, target, target_pad_name, ...)
 

Typedefs

using GstPadUPtr = GstObjectUPtr< GstPad >
 

Functions

static void forward_select_properties (GObjectClass *parent_elem_class, const gchar *(*property_name_map)[2], guint map_size, GType child_elem_type, guint *prop_index, GPtrArray *orig_prop_names_ordered)
 
static void forward_properties (GObjectClass *parent_elem_class, GType child_elem_type, guint *prop_id=NULL)
 
static void forward_pad_template (GstElementClass *bin_class, GType child_elem_type, const gchar *child_tmpl_name, const gchar *pad_tmpl_name=nullptr)
 
static void remove_all_children (GstBin *bin)
 

Macro Definition Documentation

◆ NVGSTDS_BIN_ADD_GHOST_PAD

#define NVGSTDS_BIN_ADD_GHOST_PAD (   bin,
  elem,
  pad,
  ... 
)
Value:
do { \
GstPadUPtr gstpad = gst_element_get_static_pad (elem, pad); \
if (!gstpad) { \
GST_ELEMENT_ERROR(bin, STREAM, FAILED, ("Could not find '%s' in '%s'", pad, \
GST_ELEMENT_NAME(elem)), (NULL)); \
return __VA_ARGS__; \
} \
GstElementClass *klass = GST_ELEMENT_GET_CLASS(bin); \
GstPadTemplate *tmpl = gst_element_class_get_pad_template(klass, pad); \
gst_element_add_pad (bin, gst_ghost_pad_new_from_template (pad, gstpad, tmpl)); \
} while (0)

Definition at line 275 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

◆ NVGSTDS_BIN_SET_GHOST_PAD_TARGET

#define NVGSTDS_BIN_SET_GHOST_PAD_TARGET (   bin,
  bin_pad,
  target,
  target_pad_name,
  ... 
)
Value:
do { \
GstPadUPtr pad = gst_element_get_static_pad (target, target_pad_name); \
if (!pad) { \
GST_ELEMENT_ERROR(bin, STREAM, FAILED, ("Could not find '%s' in '%s'", target_pad_name, \
GST_ELEMENT_NAME(target)), (NULL)); \
return __VA_ARGS__; \
} \
if (!gst_ghost_pad_set_target (GST_GHOST_PAD \
(bin_pad), pad)) { \
GST_ELEMENT_ERROR (bin, RESOURCE, NOT_FOUND, \
("Failed to set '%s' as target of '%s' pad", \
GST_ELEMENT_NAME (target), \
GST_PAD_NAME (bin_pad)), (NULL)); \
return __VA_ARGS__; \
} \
} while (0)

Definition at line 288 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

◆ NVGSTDS_ELEM_ADD_PROBE

#define NVGSTDS_ELEM_ADD_PROBE (   parent_elem,
  elem,
  pad,
  probe_func,
  probe_type,
  probe_data 
)
Value:
({ \
gulong probe_id = 0; \
GstPad *gstpad = gst_element_get_static_pad (elem, pad); \
if (!gstpad) { \
GST_ELEMENT_ERROR(parent_elem, RESOURCE, FAILED, \
("Could not find '%s' in '%s'", pad, \
GST_ELEMENT_NAME(elem)), (NULL)); \
} else { \
probe_id = gst_pad_add_probe(gstpad, (GstPadProbeType) (probe_type), probe_func, probe_data, NULL); \
gst_object_unref (gstpad); \
} \
probe_id; \
})

Definition at line 244 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

◆ NVGSTDS_LINK_ELEMENT

#define NVGSTDS_LINK_ELEMENT (   elem1,
  elem2,
  ... 
)
Value:
({ \
if (!gst_element_link (elem1,elem2)) { \
GstCaps * src_caps, *sink_caps; \
src_caps = gst_pad_query_caps ((GstPad *) (elem1)->srcpads->data, NULL); \
sink_caps = gst_pad_query_caps ((GstPad *) (elem2)->sinkpads->data, NULL); \
GST_ELEMENT_ERROR (GST_ELEMENT_PARENT(elem1), STREAM, FAILED, \
("Failed to link '%s' (%s) and '%s' (%s)", \
GST_ELEMENT_NAME (elem1), \
gst_caps_to_string (src_caps), \
GST_ELEMENT_NAME (elem2), \
gst_caps_to_string (sink_caps)), (NULL)); \
return __VA_ARGS__; \
} \
})

Definition at line 259 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

Typedef Documentation

◆ GstPadUPtr

Function Documentation

◆ forward_pad_template()

static void forward_pad_template ( GstElementClass *  bin_class,
GType  child_elem_type,
const gchar *  child_tmpl_name,
const gchar *  pad_tmpl_name = nullptr 
)
inlinestatic

◆ forward_properties()

static void forward_properties ( GObjectClass *  parent_elem_class,
GType  child_elem_type,
guint *  prop_id = NULL 
)
inlinestatic

Definition at line 122 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

References FALSE.

◆ forward_select_properties()

static void forward_select_properties ( GObjectClass *  parent_elem_class,
const gchar *(*)  property_name_map[2],
guint  map_size,
GType  child_elem_type,
guint *  prop_index,
GPtrArray *  orig_prop_names_ordered 
)
inlinestatic

Definition at line 26 of file 9.2/sources/gst-plugins/gst-nvdsbins/gstnvdsbinutils.h.

References FALSE.

◆ remove_all_children()

static void remove_all_children ( GstBin *  bin)
inlinestatic