GStreamer plugin to split tensor (as a filter for other general neural network filters) More...
#include <string.h>
#include <gst/gst.h>
#include <glib.h>
#include "gsttensor_split.h"
#include <tensor_common.h>
#include <nnstreamer_util.h>
Go to the source code of this file.
Macros | |
#define | GST_CAT_DEFAULT gst_tensor_split_debug |
#define | CAPS_STRING GST_TENSOR_CAP_DEFAULT ";" GST_TENSORS_CAP_WITH_NUM ("1") |
Template caps string. More... | |
#define | gst_tensor_split_parent_class parent_class |
Enumerations | |
enum | { PROP_0, PROP_SILENT, PROP_TENSORPICK, PROP_TENSORSEG } |
Functions | |
GST_DEBUG_CATEGORY_STATIC (gst_tensor_split_debug) | |
static GstFlowReturn | gst_tensor_split_chain (GstPad *pad, GstObject *parent, GstBuffer *buf) |
chain function for sink (gst element vmethod) More... | |
static gboolean | gst_tensor_split_event (GstPad *pad, GstObject *parent, GstEvent *event) |
event function for sink (gst element vmethod) More... | |
static GstStateChangeReturn | gst_tensor_split_change_state (GstElement *element, GstStateChange transition) |
change state (gst element vmethod) More... | |
static void | gst_tensor_split_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
Get property (gst element vmethod) More... | |
static void | gst_tensor_split_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
Get property (gst element vmethod) More... | |
static void | gst_tensor_split_finalize (GObject *object) |
finalize function for tensor split (gst element vmethod) More... | |
G_DEFINE_TYPE (GstTensorSplit, gst_tensor_split, GST_TYPE_ELEMENT) | |
static void | gst_tensor_split_class_init (GstTensorSplitClass *klass) |
initialize the tensor_split's class More... | |
static void | gst_tensor_split_init (GstTensorSplit *split) |
initialize the new element instantiate pads and add them to element set pad callback functions initialize instance structure More... | |
static void | gst_tensor_split_remove_src_pads (GstTensorSplit *split) |
function to remove srcpad list More... | |
static gboolean | gst_tensor_split_get_capsparam (GstTensorSplit *split, GstCaps *caps) |
Set Caps in pad. More... | |
static GstTensorPad * | gst_tensor_split_get_tensor_pad (GstTensorSplit *split, GstBuffer *inbuf, gboolean *created, guint nth) |
Checking if the source pad is created and if not, create TensorPad. More... | |
static GstFlowReturn | gst_tensor_split_combine_flows (GstTensorSplit *split, GstTensorPad *pad, GstFlowReturn ret) |
Check the status among sources in split. More... | |
static GstMemory * | gst_tensor_split_get_splitted (GstTensorSplit *split, GstBuffer *buffer, gint nth) |
Make splitted tensor. More... | |
static void | _clear_tensorseg (tensor_dim **element) |
Glib Array Clear Function. More... | |
Variables | |
static GstStaticPadTemplate | src_templ |
the capabilities of the inputs and outputs. describe the real formats here. More... | |
static GstStaticPadTemplate | sink_templ |
GStreamer plugin to split tensor (as a filter for other general neural network filters)
GStreamer Copyright (C) 2005 Thomas Vander Stichele thoma Copyright (C) 2005 Ronald S. Bultje s@ap estaa rt.o rgrbult Copyright (C) 2018 Jijoong Moon je@r onald .bit freak .netjijoo ng.m oon@s amsu ng.co m
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.1 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
Definition in file gsttensor_split.c.
#define CAPS_STRING GST_TENSOR_CAP_DEFAULT ";" GST_TENSORS_CAP_WITH_NUM ("1") |
Template caps string.
Definition at line 73 of file gsttensor_split.c.
#define GST_CAT_DEFAULT gst_tensor_split_debug |
Definition at line 60 of file gsttensor_split.c.
#define gst_tensor_split_parent_class parent_class |
Definition at line 101 of file gsttensor_split.c.
anonymous enum |
Enumerator | |
---|---|
PROP_0 | |
PROP_SILENT | |
PROP_TENSORPICK | |
PROP_TENSORSEG |
Definition at line 62 of file gsttensor_split.c.
|
static |
Glib Array Clear Function.
Definition at line 569 of file gsttensor_split.c.
G_DEFINE_TYPE | ( | GstTensorSplit | , |
gst_tensor_split | , | ||
GST_TYPE_ELEMENT | |||
) |
GST_DEBUG_CATEGORY_STATIC | ( | gst_tensor_split_debug | ) |
SECTION:element-tensor_split
A Deuxer that split tensors stream to tensor stream for NN frameworks. The outputs are always in the format of other/tensor.
<refsect2> <title>Example launch line</title> |[ gst-launch -v -m filesrc location=testcase_RGB_100x100.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,width=100,height=100,framerate=0/1 ! tensor_converter ! tensor_split name=split tensorseg=2:100:100,1:100:100 split.src_0 ! queue ! filesink location=src0.log split.src_1 ! queue ! filesink location=src1.log ]|
</refsect2>
|
static |
chain function for sink (gst element vmethod)
Definition at line 459 of file gsttensor_split.c.
|
static |
change state (gst element vmethod)
Definition at line 537 of file gsttensor_split.c.
|
static |
initialize the tensor_split's class
Definition at line 109 of file gsttensor_split.c.
|
static |
Check the status among sources in split.
split | TensorSplit Object |
TensorPad | Tensorpad |
ret | return status of current pad |
Definition at line 387 of file gsttensor_split.c.
|
static |
event function for sink (gst element vmethod)
Definition at line 233 of file gsttensor_split.c.
|
static |
finalize function for tensor split (gst element vmethod)
Definition at line 202 of file gsttensor_split.c.
|
static |
Set Caps in pad.
split | GstTensorSplit object |
caps | incoming capability |
Definition at line 220 of file gsttensor_split.c.
|
static |
Get property (gst element vmethod)
If i = 1, this is previous p. Otherwise, it's previous g_strjoin result.
Definition at line 653 of file gsttensor_split.c.
|
static |
Make splitted tensor.
split | TensorSplit object |
buffer | gstbuffer form src |
nth | orther of tensor |
Definition at line 415 of file gsttensor_split.c.
|
static |
Checking if the source pad is created and if not, create TensorPad.
split | TensorSplit Object | |
inbuf | inputbuf GstBuffer Object including GstMeta | |
[out] | created | will be updated in this function |
nth | source ordering |
Definition at line 276 of file gsttensor_split.c.
|
static |
initialize the new element instantiate pads and add them to element set pad callback functions initialize instance structure
Definition at line 160 of file gsttensor_split.c.
|
static |
function to remove srcpad list
Definition at line 184 of file gsttensor_split.c.
|
static |
Get property (gst element vmethod)
Definition at line 578 of file gsttensor_split.c.
|
static |
Definition at line 84 of file gsttensor_split.c.
|
static |
the capabilities of the inputs and outputs. describe the real formats here.
Definition at line 79 of file gsttensor_split.c.