#include <nnstreamer_plugin_api_decoder.h>
#include <nnstreamer_plugin_api.h>
+void init_bb (void) __attribute__ ((constructor));
+void fini_bb (void) __attribute__ ((destructor));
+
#define BOX_SIZE 4
#define TFLITE_SSD_DETECTION_MAX 1917
#define TFLITE_SSD_MAX_TENSORS 2
};
/** @brief Initialize this object for tensordec-plugin */
-__attribute__ ((constructor))
- void init_bb (void)
+void
+init_bb (void)
{
tensordec_probe (&boundingBox);
}
/** @brief Destruct this object for tensordec-plugin */
-__attribute__ ((destructor))
- void fini_bb (void)
+void
+fini_bb (void)
{
tensordec_exit (boundingBox.modename);
}
#include <gst/video/video-format.h>
#include <nnstreamer_plugin_api_decoder.h>
+void init_dv (void) __attribute__ ((constructor));
+void fini_dv (void) __attribute__ ((destructor));
+
#define DECODER_DV_VIDEO_CAPS_STR \
GST_VIDEO_CAPS_MAKE ("{ RGB, BGRx, GRAY8 }") \
", views = (int) 1, interlace-mode = (string) progressive"
};
/** @brief Initialize this object for tensordec-plugin */
-__attribute__ ((constructor))
- void init_dv (void)
+void
+init_dv (void)
{
tensordec_probe (&directVideo);
}
/** @brief Destruct this object for tensordec-plugin */
-__attribute__ ((destructor))
- void fini_dv (void)
+void
+fini_dv (void)
{
tensordec_exit (directVideo.modename);
}
#include <nnstreamer_plugin_api_decoder.h>
#include <nnstreamer_plugin_api.h>
+void init_il (void) __attribute__ ((constructor));
+void fini_il (void) __attribute__ ((destructor));
+
#define DECODER_IL_TEXT_CAPS_STR \
"text/x-raw, format = (string) utf8"
};
/** @brief Initialize this object for tensordec-plugin */
-__attribute__ ((constructor))
- void init_il (void)
+void
+init_il (void)
{
tensordec_probe (&imageLabeling);
}
/** @brief Destruct this object for tensordec-plugin */
-__attribute__ ((destructor))
- void fini_il (void)
+void
+fini_il (void)
{
tensordec_exit (imageLabeling.modename);
}
#include <string.h>
#include <nnstreamer_conf.h>
+void init_filter_tf (void) __attribute__ ((constructor));
+void fini_filter_tf (void) __attribute__ ((destructor));
+
/**
* @brief internal data of tensorflow
*/
};
/** @brief Initialize this object for tensor_filter subplugin runtime register */
-__attribute__ ((constructor))
- void init_filter_tf (void)
+void
+init_filter_tf (void)
{
tensor_filter_probe (&NNS_support_tensorflow);
}
/** @brief Destruct the subplugin */
-__attribute__ ((destructor))
- void fini_filter_tf (void)
+void
+fini_filter_tf (void)
{
tensor_filter_exit (NNS_support_tensorflow.name);
}
#include <glib.h>
#include <string.h>
+void init_filter_tflite (void) __attribute__ ((constructor));
+void fini_filter_tflite (void) __attribute__ ((destructor));
+
/**
* @brief internal data of tensorflow lite
*/
};
/** @brief Initialize this object for tensor_filter subplugin runtime register */
-__attribute__ ((constructor))
- void init_filter_tflite (void)
+void
+init_filter_tflite (void)
{
tensor_filter_probe (&NNS_support_tensorflow_lite);
}
/** @brief Destruct the subplugin */
-__attribute__ ((destructor))
- void fini_filter_tflite (void)
+void
+fini_filter_tflite (void)
{
tensor_filter_exit (NNS_support_tensorflow_lite.name);
}
gst_tensordec_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- GstTensorDec *self = GST_TENSORDEC (object);
+ GstTensorDec *self;
gchar *temp_string;
+ self = GST_TENSOR_DECODER (object);
+
switch (prop_id) {
case PROP_SILENT:
self->silent = g_value_get_boolean (value);
gst_tensordec_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
- GstTensorDec *self = GST_TENSORDEC (object);
+ GstTensorDec *self;
+
+ self = GST_TENSOR_DECODER (object);
switch (prop_id) {
case PROP_SILENT:
static void
gst_tensordec_class_finalize (GObject * object)
{
- GstTensorDec *decoder = GST_TENSORDEC (object);
+ GstTensorDec *self;
+
+ self = GST_TENSOR_DECODER (object);
- if (decoder->cleanup_plugin_data) {
- decoder->cleanup_plugin_data (&decoder->plugin_data);
+ if (self->cleanup_plugin_data) {
+ self->cleanup_plugin_data (&self->plugin_data);
}
G_OBJECT_CLASS (parent_class)->finalize (object);
GstTensorDec *self;
GstFlowReturn res;
- self = GST_TENSORDEC_CAST (trans);
+ self = GST_TENSOR_DECODER_CAST (trans);
if (G_UNLIKELY (!self->negotiated))
goto unknown_tensor;
GstTensorDec *self;
GstCaps *result;
- self = GST_TENSORDEC_CAST (trans);
+ self = GST_TENSOR_DECODER_CAST (trans);
/* Not ready */
if (self->decoder == NULL)
GstCaps *supposed;
GstCaps *result;
- self = GST_TENSORDEC_CAST (trans);
+ self = GST_TENSOR_DECODER_CAST (trans);
silent_debug_caps (caps, "from caps");
silent_debug_caps (othercaps, "from othercaps");
{
GstTensorDec *self;
- self = GST_TENSORDEC_CAST (trans);
+ self = GST_TENSOR_DECODER_CAST (trans);
self->negotiated = TRUE;
silent_debug_caps (incaps, "from incaps");
if (direction == GST_PAD_SRC)
return FALSE;
/** @todo If direction = SRC, you may need different interpretation! */
- self = GST_TENSORDEC_CAST (trans);
+ self = GST_TENSOR_DECODER_CAST (trans);
g_assert (self->configured);
0, "Element to convert tensor to media stream");
return gst_element_register (plugin, "tensor_decoder", GST_RANK_NONE,
- GST_TYPE_TENSORDEC);
+ GST_TYPE_TENSOR_DECODER);
}
#include <nnstreamer_plugin_api_decoder.h>
G_BEGIN_DECLS
-#define GST_TYPE_TENSORDEC \
+
+#define GST_TYPE_TENSOR_DECODER \
(gst_tensordec_get_type())
-#define GST_TENSORDEC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TENSORDEC,GstTensorDec))
-#define GST_TENSORDEC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TENSORDEC,GstTensorDecClass))
-#define GST_IS_TENSORDEC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSORDEC))
-#define GST_IS_TENSORDEC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSORDEC))
-#define GST_TENSORDEC_CAST(obj) ((GstTensorDec *)(obj))
+#define GST_TENSOR_DECODER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TENSOR_DECODER,GstTensorDec))
+#define GST_TENSOR_DECODER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TENSOR_DECODER,GstTensorDecClass))
+#define GST_IS_TENSOR_DECODER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_DECODER))
+#define GST_IS_TENSOR_DECODER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_DECODER))
+#define GST_TENSOR_DECODER_CAST(obj) ((GstTensorDec *)(obj))
+
typedef struct _GstTensorDec GstTensorDec;
typedef struct _GstTensorDecClass GstTensorDecClass;
-
#define TensorDecMaxOpNum (9)
+
/**
* @brief Internal data structure for tensordec instances.
*/
GType gst_tensordec_get_type (void);
G_END_DECLS
+
#endif /* __GST_TENSORDEC_H__ */
#include <string.h>
#include "tensor_filter.h"
+#include "nnstreamer_plugin_api_filter.h"
/**
* @brief Macro for debug mode.
#include <glib.h>
#include <dlfcn.h>
+void init_filter_custom (void) __attribute__ ((constructor));
+void fini_filter_custom (void) __attribute__ ((destructor));
+
static GstTensorFilterFramework NNS_support_custom;
/**
};
/** @brief Initialize this object for tensor_filter subplugin runtime register */
-__attribute__ ((constructor))
- void init_filter_custom (void)
+void
+init_filter_custom (void)
{
tensor_filter_probe (&NNS_support_custom);
}
/** @brief Destruct the subplugin */
-__attribute__ ((destructor))
- void fini_filter_custom (void)
+void
+fini_filter_custom (void)
{
tensor_filter_exit (NNS_support_custom.name);
}
* @param config Tensor Config Data
* @return true / false
*/
-gboolean
+static gboolean
gst_merge_tensors_config (GstTensorMerge * tensor_merge,
GstTensorsConfig * configs, GstTensorConfig * config)
{