Doxygen Book
gsttensor_if.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-only */
19 #ifndef __GST_TENSOR_IF_H__
20 #define __GST_TENSOR_IF_H__
21 
22 #include <gst/gst.h>
23 #include <tensor_common.h>
24 #include <tensor_data.h>
25 #include <tensor_if.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_TENSOR_IF (gst_tensor_if_get_type ())
30 #define GST_TENSOR_IF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TENSOR_IF, GstTensorIf))
31 #define GST_TENSOR_IF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TENSOR_IF, GstTensorIfClass))
32 #define GST_TENSOR_IF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TENSOR_IF, GstTensorIfClass))
33 #define GST_IS_TENSOR_IF(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_IF))
34 #define GST_IS_TENSOR_IF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_IF))
35 #define GST_TENSOR_IF_CAST(obj)((GstTensorIf*)(obj))
36 typedef struct _GstTensorIf GstTensorIf;
38 
42 typedef enum {
56 
60 typedef enum {
61  TIFOP_EQ = 0,
73 
79 typedef enum {
92 
96 typedef enum
97 {
101 
105 typedef struct
106 {
107  guint32 num;
111 
112 typedef struct
113 {
114  gchar * name;
116  void * data;
117 } custom_cb_s;
118 
123 {
124  GstElement element;
125  GstPad *sinkpad;
126  GSList *srcpads;
127  gboolean silent;
128 
131  guint32 num_srcpads;
132 
138  GList *cv_option;
139  GList *then_option;
140  GList *else_option;
141 
144 
145  GMutex lock;
146 };
147 
152 {
153  GstElementClass parent_class;
154 };
155 
159 GType gst_tensor_if_get_type (void);
160 
161 G_END_DECLS
162 
163 #endif /* __GST_TENSOR_IF_H__ */
_GstTensorIf::else_option
GList * else_option
Definition: gsttensor_if.h:140
TIFCV_END
@ TIFCV_END
Definition: gsttensor_if.h:54
_GstTensorIf::sv
tensor_if_sv_s sv[2]
Definition: gsttensor_if.h:137
tensor_data.h
Internal functions to handle various tensor type and value.
_GstTensorIf::silent
gboolean silent
Definition: gsttensor_if.h:127
custom_cb_s
Definition: gsttensor_if.h:112
data
svtc_1 data
Definition: gsttensor_if.c:844
TIFB_REPEAT_PREVIOUS_FRAME
@ TIFB_REPEAT_PREVIOUS_FRAME
Definition: gsttensor_if.h:88
TIFB_PASSTHROUGH
@ TIFB_PASSTHROUGH
Definition: gsttensor_if.h:80
_GstTensorIf::custom_configured
gboolean custom_configured
Definition: gsttensor_if.h:142
tensor_if_behavior
tensor_if_behavior
Behaviors that may fit in THEN and ELSE.
Definition: gsttensor_if.h:79
TIFCV_ALL_TENSORS_TOTAL_VALUE
@ TIFCV_ALL_TENSORS_TOTAL_VALUE
Definition: gsttensor_if.h:47
TIFOP_EQ
@ TIFOP_EQ
Definition: gsttensor_if.h:61
gst_tensor_if_get_type
GType gst_tensor_if_get_type(void)
Get Type function required for gst elements.
custom_cb_s::name
gchar * name
Definition: gsttensor_if.h:114
TIFB_FILL_ZERO
@ TIFB_FILL_ZERO
Definition: gsttensor_if.h:82
TIFB_TENSORPICK
@ TIFB_TENSORPICK
Definition: gsttensor_if.h:89
TIFCV_TENSOR_AVERAGE_VALUE
@ TIFCV_TENSOR_AVERAGE_VALUE
Definition: gsttensor_if.h:49
TIFB_SKIP
@ TIFB_SKIP
Definition: gsttensor_if.h:81
TIFSP_ELSE_PAD
@ TIFSP_ELSE_PAD
Definition: gsttensor_if.h:99
_GstTensorIf::custom
custom_cb_s custom
Definition: gsttensor_if.h:143
TIFOP_NE
@ TIFOP_NE
Definition: gsttensor_if.h:62
_GstTensorIfClass
GstTensorIfClass inherits GstElementClass.
Definition: gsttensor_if.h:151
TIFB_FILL_WITH_FILE
@ TIFB_FILL_WITH_FILE
Definition: gsttensor_if.h:84
_GstTensorIf::out_config
GstTensorsConfig out_config[2]
Definition: gsttensor_if.h:130
_GstTensorIf::element
GstElement element
Definition: gsttensor_if.h:124
TIFB_FILL_VALUES
@ TIFB_FILL_VALUES
Definition: gsttensor_if.h:83
tensor_if_custom
G_BEGIN_DECLS typedef gboolean(* tensor_if_custom)(const GstTensorsInfo *info, const GstTensorMemory *input, void *user_data, gboolean *result)
Calls the user defined conditions function.
Definition: tensor_if.h:63
tensor_type
enum _nns_tensor_type tensor_type
Possible data element types of other/tensor.
_GstTensorIf
Tensor If data structure.
Definition: gsttensor_if.h:122
_GstTensorIf::in_config
GstTensorsConfig in_config
Definition: gsttensor_if.h:129
_GstTensorIf::srcpads
GSList * srcpads
Definition: gsttensor_if.h:126
TIFCV_ALL_TENSORS_AVERAGE_VALUE
@ TIFCV_ALL_TENSORS_AVERAGE_VALUE
Definition: gsttensor_if.h:51
TIFOP_RANGE_INCLUSIVE
@ TIFOP_RANGE_INCLUSIVE
Definition: gsttensor_if.h:67
TIFOP_LT
@ TIFOP_LT
Definition: gsttensor_if.h:65
custom_cb_s::data
void * data
Definition: gsttensor_if.h:116
tensor_if_operator
tensor_if_operator
OPERAND.
Definition: gsttensor_if.h:60
tensor_if_sv_s
Internal data structure for supplied value.
Definition: gsttensor_if.h:105
GstTensorsConfig
Internal data structure for configured tensors info (for other/tensors).
Definition: tensor_typedef.h:284
_GstTensorIf::act_then
tensor_if_behavior act_then
Definition: gsttensor_if.h:135
_GstTensorIf::then_option
GList * then_option
Definition: gsttensor_if.h:139
TIFSP_THEN_PAD
@ TIFSP_THEN_PAD
Definition: gsttensor_if.h:98
_GstTensorIf::cv
tensor_if_compared_value cv
Definition: gsttensor_if.h:133
TIFB_FILL_WITH_FILE_RPT
@ TIFB_FILL_WITH_FILE_RPT
Definition: gsttensor_if.h:86
TIFCV_TENSOR_TOTAL_VALUE
@ TIFCV_TENSOR_TOTAL_VALUE
Definition: gsttensor_if.h:45
_GstTensorIf::num_srcpads
guint32 num_srcpads
Definition: gsttensor_if.h:131
_GstTensorIf::op
tensor_if_operator op
Definition: gsttensor_if.h:134
_GstTensorIf::cv_option
GList * cv_option
Definition: gsttensor_if.h:138
TIFOP_GT
@ TIFOP_GT
Definition: gsttensor_if.h:63
tensor_common.h
Common header file for NNStreamer, the GStreamer plugin for neural networks.
TIFCV_A_VALUE
@ TIFCV_A_VALUE
Definition: gsttensor_if.h:43
TIFCV_CUSTOM
@ TIFCV_CUSTOM
Definition: gsttensor_if.h:53
_GstTensorIf::lock
GMutex lock
Definition: gsttensor_if.h:145
tensor_if_sv_s::type
tensor_type type
Definition: gsttensor_if.h:108
TIFOP_LE
@ TIFOP_LE
Definition: gsttensor_if.h:66
tensor_element
To make the code simple with all the types. "C++ Template"-like.
Definition: tensor_typedef.h:231
_GstTensorIfClass::parent_class
GstElementClass parent_class
Definition: gsttensor_if.h:153
tensor_if_sv_s::num
guint32 num
Definition: gsttensor_if.h:107
TIFOP_NOT_IN_RANGE_EXCLUSIVE
@ TIFOP_NOT_IN_RANGE_EXCLUSIVE
Definition: gsttensor_if.h:70
tensor_if_compared_value
tensor_if_compared_value
Compared_Value.
Definition: gsttensor_if.h:42
custom_cb_s::func
tensor_if_custom func
Definition: gsttensor_if.h:115
tensor_if_srcpads
tensor_if_srcpads
Which src pad.
Definition: gsttensor_if.h:96
_GstTensorIf::act_else
tensor_if_behavior act_else
Definition: gsttensor_if.h:136
TIFOP_NOT_IN_RANGE_INCLUSIVE
@ TIFOP_NOT_IN_RANGE_INCLUSIVE
Definition: gsttensor_if.h:69
tensor_if.h
NNStreamer APIs for tensor_if custom condition.
TIFOP_END
@ TIFOP_END
Definition: gsttensor_if.h:71
TIFOP_GE
@ TIFOP_GE
Definition: gsttensor_if.h:64
TIFOP_RANGE_EXCLUSIVE
@ TIFOP_RANGE_EXCLUSIVE
Definition: gsttensor_if.h:68
TIFB_END
@ TIFB_END
Definition: gsttensor_if.h:90
_GstTensorIf::sinkpad
GstPad * sinkpad
Definition: gsttensor_if.h:125