1. Merge decoder,demux for the new build scheme.
2. Rephrase related code of aggregator, converter
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
# Supported projects for the single binary
SET(PROJECTS
- tensor_converter
tensor_aggregator
+ tensor_converter
+ tensor_decoder
+ tensor_demux
)
ADD_SUBDIRECTORY(gst/tensor_filter)
-ADD_SUBDIRECTORY(gst/tensor_decoder)
ADD_SUBDIRECTORY(gst/tensor_sink)
ADD_SUBDIRECTORY(gst/tensor_mux)
-ADD_SUBDIRECTORY(gst/tensor_demux)
ADD_SUBDIRECTORY(gst/tensor_split)
ADD_SUBDIRECTORY(gst/tensor_merge)
ADD_SUBDIRECTORY(gst/tensor_transform)
NNSTREAMER_PLUGIN (tensor_converter);
NNSTREAMER_PLUGIN (tensor_aggregator);
+NNSTREAMER_PLUGIN (tensor_decoder);
+NNSTREAMER_PLUGIN (tensor_demux);
#define NNSTREAMER_INIT(name, plugin) \
do { \
{
NNSTREAMER_INIT (tensor_converter, plugin);
NNSTREAMER_INIT (tensor_aggregator, plugin);
+ NNSTREAMER_INIT (tensor_decoder, plugin);
+ NNSTREAMER_INIT (tensor_demux, plugin);
return TRUE;
}
GST_RANK_NONE, GST_TYPE_TENSOR_AGGREGATOR);
}
+#ifndef SINGLE_BINARY
/**
* @brief Definition for identifying tensor_aggregator plugin.
*
* compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
*/
#ifndef PACKAGE
-#define PACKAGE "tensor_aggregator"
+#define PACKAGE "nnstreamer"
#endif
-#ifndef SINGLE_BINARY
/**
* @brief Macro to define the entry point of the plugin.
*/
GST_VERSION_MINOR,
tensor_aggregator,
"GStreamer plugin to aggregate tensor stream",
- gst_tensor_aggregator_plugin_init, VERSION, "LGPL", "GStreamer",
- "http://gstreamer.net/");
+ gst_tensor_aggregator_plugin_init, VERSION, "LGPL", "nnstreamer",
+ "http://github.com/nnsuite/nnstreamer/");
#endif
GST_RANK_NONE, GST_TYPE_TENSOR_CONVERTER);
}
+#ifndef SINGLE_BINARY
/**
* @brief Definition for identifying tensor_converter plugin.
*
* compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
*/
#ifndef PACKAGE
-#define PACKAGE "tensor_converter"
+#define PACKAGE "nnstreamer"
#endif
-#ifndef SINGLE_BINARY
/**
* @brief Macro to define the entry point of the plugin.
*/
GST_VERSION_MINOR,
tensor_converter,
"GStreamer plugin to convert media types to tensors",
- gst_tensor_converter_plugin_init, VERSION, "LGPL", "GStreamer",
+ gst_tensor_converter_plugin_init, VERSION, "LGPL", "nnstreamer",
"http://github.com/nnsuite/nnstreamer/");
#endif
-ADD_LIBRARY(tensor_decoder SHARED tensordec.c)
-ADD_LIBRARY(tensor_decoderStatic STATIC tensordec.c)
-
-TARGET_LINK_LIBRARIES(tensor_decoder ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_decoder PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_decoder PUBLIC ${pkgs_CFLAGS_OTHER})
-TARGET_LINK_LIBRARIES(tensor_decoderStatic ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_decoderStatic PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_decoderStatic PUBLIC ${pkgs_CFLAGS_OTHER})
-
-INSTALL(TARGETS tensor_decoder tensor_decoderStatic
- RUNTIME DESTINATION ${EXEC_PREFIX}
- LIBRARY DESTINATION ${GST_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
- )
+ADD_LIBRARY(tensor_decoderOBJ OBJECT tensordec.c)
* initialize the plug-in itself
* register the element factories and other features
*/
-static gboolean
-gst_tensordec_plugin_init (GstPlugin * plugin)
+NNSTREAMER_PLUGIN_INIT (tensor_decoder)
{
/**
* debug category for fltering log messages
GST_TYPE_TENSORDEC);
}
+#ifndef SINGLE_BINARY
/**
* PACKAGE: this is usually set by autotools depending on some _INIT macro
* in configure.ac and then written into and defined in config.h, but we can
* compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
*/
#ifndef PACKAGE
-#define PACKAGE "tensor_decoder"
+#define PACKAGE "nnstreamer"
#endif
/**
GST_VERSION_MINOR,
tensor_decoder,
"Element to convert tensor to media stream",
- gst_tensordec_plugin_init,
- VERSION, "LGPL", "GStreamer", "http://gstreamer.net/");
+ gst_tensor_decoder_plugin_init,
+ VERSION, "LGPL", "nnstreamer", "http://github.com/nnsuite/nnstreamer/");
+#endif
-ADD_LIBRARY(tensor_demux SHARED gsttensordemux.c )
-ADD_LIBRARY(tensor_demuxStatic STATIC gsttensordemux.c)
-
-TARGET_LINK_LIBRARIES(tensor_demux ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_demux PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_demux PUBLIC ${pkgs_CFLAGS_OTHER})
-TARGET_LINK_LIBRARIES(tensor_demuxStatic ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_demuxStatic PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_demuxStatic PUBLIC ${pkgs_CFLAGS_OTHER})
-
-INSTALL(TARGETS tensor_demux tensor_demuxStatic
- RUNTIME DESTINATION ${EXEC_PREFIX}
- LIBRARY DESTINATION ${GST_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
- )
+ADD_LIBRARY(tensor_demuxOBJ OBJECT gsttensordemux.c )
}
/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "tensor_demux"
-#endif
-
-/**
* @brief entry point to initialize the plug-in
* initialize the plug-in itself
* register the element factories and other features
*/
-gboolean
-gst_tensor_demux_plugin_init (GstPlugin * tensordemux)
+NNSTREAMER_PLUGIN_INIT (tensor_demux)
{
/** debug category for fltering log messages
* exchange the string 'Template tensor_demux' with your description
*/
GST_DEBUG_CATEGORY_INIT (gst_tensor_demux_debug, "tensor_demux", 0,
"Tensor Demuxer");
- return gst_element_register (tensordemux, "tensor_demux",
+ return gst_element_register (plugin, "tensor_demux",
GST_RANK_NONE, GST_TYPE_TENSOR_DEMUX);
}
+#ifndef SINGLE_BINARY
+/**
+ * PACKAGE: this is usually set by autotools depending on some _INIT macro
+ * in configure.ac and then written into and defined in config.h, but we can
+ * just set it ourselves here in case someone doesn't use autotools to
+ * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
+ */
+#ifndef PACKAGE
+#define PACKAGE "nnstreamer"
+#endif
+
/**
* @brief gstreamer looks for this structure to register tensor_demux
*/
GST_VERSION_MINOR,
tensor_demux,
"tensor_demux",
- gst_tensor_demux_plugin_init, VERSION, "LGPL", "GStreamer",
- "http://gstreamer.net/");
+ gst_tensor_demux_plugin_init, VERSION, "LGPL", "nnstreamer",
+ "http://github.com/nnsuite/nnstreamer/");
+#endif