GStreamer element to encode dense tensors into sparse tensors. More...
Go to the source code of this file.
Macros | |
#define | DBG (!self->silent) |
Macro for debug mode. More... | |
#define | GST_CAT_DEFAULT gst_tensor_sparse_enc_debug |
#define | DEFAULT_SILENT TRUE |
Flag to print minimized log. More... | |
#define | gst_tensor_sparse_enc_parent_class parent_class |
Enumerations | |
enum | { PROP_0, PROP_SILENT } |
tensor_sparse_enc properties More... | |
Functions | |
GST_DEBUG_CATEGORY_STATIC (gst_tensor_sparse_enc_debug) | |
G_DEFINE_TYPE (GstTensorSparseEnc, gst_tensor_sparse_enc, GST_TYPE_ELEMENT) | |
static void | gst_tensor_sparse_enc_finalize (GObject *object) |
Function to finalize instance. More... | |
static void | gst_tensor_sparse_enc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
Setter for tensor_sparse_enc properties. More... | |
static void | gst_tensor_sparse_enc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
Getter for tensor_sparse_enc properties. More... | |
static GstFlowReturn | gst_tensor_sparse_enc_chain (GstPad *pad, GstObject *parent, GstBuffer *buf) |
Internal function to transform the input buffer. More... | |
static GstCaps * | gst_tensor_sparse_enc_query_caps (GstTensorSparseEnc *self, GstPad *pad, GstCaps *filter) |
Get pad caps for caps negotiation. More... | |
static gboolean | gst_tensor_sparse_enc_sink_event (GstPad *pad, GstObject *parent, GstEvent *event) |
This function handles sink pad event. More... | |
static gboolean | gst_tensor_sparse_enc_sink_query (GstPad *pad, GstObject *parent, GstQuery *query) |
This function handles sink pad query. More... | |
static void | gst_tensor_sparse_enc_class_init (GstTensorSparseEncClass *klass) |
Initialize the tensor_sparse's class. More... | |
static void | gst_tensor_sparse_enc_init (GstTensorSparseEnc *self) |
Initialize tensor_sparse_enc element. More... | |
static gboolean | gst_tensor_sparse_enc_parse_caps (GstTensorSparseEnc *self, const GstCaps *caps) |
Parse caps and set tensors config. More... | |
Variables | |
static GstStaticPadTemplate | sink_template |
Template for sink pad. More... | |
static GstStaticPadTemplate | src_template |
Template for src pad. More... | |
GStreamer element to encode dense tensors into sparse tensors.
Copyright (C) 2021 Samsung Electronics Co., Ltd.
Definition in file gsttensor_sparseenc.c.
#define DBG (!self->silent) |
Macro for debug mode.
SECTION:element-tensor_sparse_enc
tensor_sparse_enc is a GStreamer element to encode incoming tensor into sparse format.
The input is always in the format of other/tensors,format=static. The output is always in the format of ohter/tensors,format=sparse.
Please see also tensor_sparse_dec.
<refsect2> <title>Example launch line</title> |[ gst-launch-1.0 ... ! other/tensors,format=static ! \ tensor_sparse_enc ! tensor_sink ]| </refsect2>
Definition at line 44 of file gsttensor_sparseenc.c.
#define DEFAULT_SILENT TRUE |
Flag to print minimized log.
Definition at line 62 of file gsttensor_sparseenc.c.
#define GST_CAT_DEFAULT gst_tensor_sparse_enc_debug |
Definition at line 48 of file gsttensor_sparseenc.c.
#define gst_tensor_sparse_enc_parent_class parent_class |
Definition at line 80 of file gsttensor_sparseenc.c.
anonymous enum |
tensor_sparse_enc properties
Enumerator | |
---|---|
PROP_0 | |
PROP_SILENT |
Definition at line 53 of file gsttensor_sparseenc.c.
G_DEFINE_TYPE | ( | GstTensorSparseEnc | , |
gst_tensor_sparse_enc | , | ||
GST_TYPE_ELEMENT | |||
) |
GST_DEBUG_CATEGORY_STATIC | ( | gst_tensor_sparse_enc_debug | ) |
|
static |
Internal function to transform the input buffer.
Definition at line 372 of file gsttensor_sparseenc.c.
|
static |
Initialize the tensor_sparse's class.
The flag to enable/disable debugging messages.
Definition at line 101 of file gsttensor_sparseenc.c.
|
static |
Function to finalize instance.
Definition at line 172 of file gsttensor_sparseenc.c.
|
static |
Getter for tensor_sparse_enc properties.
Definition at line 207 of file gsttensor_sparseenc.c.
|
static |
Initialize tensor_sparse_enc element.
Definition at line 142 of file gsttensor_sparseenc.c.
|
static |
Parse caps and set tensors config.
not fully configured
Definition at line 228 of file gsttensor_sparseenc.c.
|
static |
Get pad caps for caps negotiation.
pad don't have current caps. use the template caps
Definition at line 286 of file gsttensor_sparseenc.c.
|
static |
Setter for tensor_sparse_enc properties.
Definition at line 186 of file gsttensor_sparseenc.c.
|
static |
This function handles sink pad event.
Definition at line 254 of file gsttensor_sparseenc.c.
|
static |
This function handles sink pad query.
Definition at line 317 of file gsttensor_sparseenc.c.
|
static |
Template for sink pad.
Definition at line 67 of file gsttensor_sparseenc.c.
|
static |
Template for src pad.
Definition at line 75 of file gsttensor_sparseenc.c.