[TensorDecoder] Update the plugin information and its testcase
authorSangjung woo <sangjung.woo@samsung.com>
Thu, 20 Sep 2018 07:36:33 +0000 (16:36 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 20 Sep 2018 22:27:30 +0000 (07:27 +0900)
This patch updates the plugin information such as Name, Description when
getting by gst-inspect tool. Moreover, this updates its test case since
the name is changed.

Signed-off-by: Sangjung woo <sangjung.woo@samsung.com>
gst/tensor_decoder/CMakeLists.txt
gst/tensor_decoder/tensordec.c
tests/nnstreamer_decoder/runTest.sh

index 0770549..4acb5d6 100644 (file)
@@ -1,14 +1,14 @@
-ADD_LIBRARY(tensor_dec SHARED tensordec.c)
-ADD_LIBRARY(tensor_decStatic STATIC tensordec.c)
+ADD_LIBRARY(tensor_decoder SHARED tensordec.c)
+ADD_LIBRARY(tensor_decoderStatic STATIC tensordec.c)
 
-TARGET_LINK_LIBRARIES(tensor_dec ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_dec PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_dec PUBLIC ${pkgs_CFLAGS_OTHER})
-TARGET_LINK_LIBRARIES(tensor_decStatic ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(tensor_decStatic PUBLIC ${pkgs_INCLUDE_DIRS})
-TARGET_COMPILE_OPTIONS(tensor_decStatic PUBLIC ${pkgs_CFLAGS_OTHER})
+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_dec tensor_decStatic
+INSTALL(TARGETS tensor_decoder tensor_decoderStatic
        RUNTIME DESTINATION ${EXEC_PREFIX}
        LIBRARY DESTINATION ${GST_INSTALL_DIR}
        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
index 6fcb23d..748b0d7 100644 (file)
@@ -35,7 +35,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v -m fakesink ! tensordec ! fakesrc silent=TRUE
+ * gst-launch -v -m fakesink ! tensor_decoder ! fakesrc silent=TRUE
  * ]|
  * </refsect2>
  */
@@ -444,7 +444,7 @@ gst_tensordec_class_init (GstTensorDecClass * klass)
           DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gst_element_class_set_details_simple (gstelement_class,
-      "TensorDec",
+      "TensorDecoder",
       "Converter/Tensor",
       "Converts tensor stream of C-Array for neural network framework filters to audio or video stream",
       "Jijoong Moon <jijoong.moon@samsung.com>");
@@ -952,10 +952,10 @@ gst_tensordec_plugin_init (GstPlugin * plugin)
   /**
    * debug category for fltering log messages
    */
-  GST_DEBUG_CATEGORY_INIT (gst_tensordec_debug, "tensordec",
+  GST_DEBUG_CATEGORY_INIT (gst_tensordec_debug, "tensor_decoder",
       0, "Element to convert tensor to media stream");
 
-  return gst_element_register (plugin, "tensordec", GST_RANK_NONE,
+  return gst_element_register (plugin, "tensor_decoder", GST_RANK_NONE,
       GST_TYPE_TENSORDEC);
 }
 
@@ -966,15 +966,15 @@ gst_tensordec_plugin_init (GstPlugin * plugin)
  * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
  */
 #ifndef PACKAGE
-#define PACKAGE "tensordec"
+#define PACKAGE "tensor_decoder"
 #endif
 
 /**
- * gstreamer looks for this structure to register tensordec
+ * gstreamer looks for this structure to register tensor_decoder
  */
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
-    tensordec,
+    tensor_decoder,
     "Element to convert tensor to media stream",
     gst_tensordec_plugin_init,
     VERSION, "LGPL", "GStreamer", "http://gstreamer.net/");
index 081869c..5a22642 100755 (executable)
@@ -17,7 +17,7 @@ function do_test {
     param="${4}_gen_golden_data"
     gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=testcase01_${1}_${2}x${3}.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=${1},width=${2},height=${3},framerate=0/1 ! filesink location=\"testcase01_${1}_${2}x${3}.golden.raw\" sync=true" $param
 
-    gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=testcase01_${1}_${2}x${3}.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=${1},width=${2},height=${3},framerate=0/1 ! tensor_converter ! tensordec silent=false ! filesink location=\"testcase01_${1}_${2}x${3}.log\" sync=true" ${4}
+    gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=testcase01_${1}_${2}x${3}.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=${1},width=${2},height=${3},framerate=0/1 ! tensor_converter ! tensor_decoder silent=false ! filesink location=\"testcase01_${1}_${2}x${3}.log\" sync=true" ${4}
 
     compareAllSizeLimit testcase01_${1}_${2}x${3}.log testcase01_${1}_${2}x${3}.golden.raw ${4}
 }
@@ -28,7 +28,7 @@ do_test BGRx 640 480 1-2
 do_test BGRx 642 480 1-3
 
 # Test with a stream of 10 small PNG frames
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tee name=t ! queue ! tensordec ! filesink location=\"testcase2.dec.log\" sync=true t. ! queue ! filesink location=\"testcase2.con.log\" sync=true" 2
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tee name=t ! queue ! tensor_decoder ! filesink location=\"testcase2.dec.log\" sync=true t. ! queue ! filesink location=\"testcase2.con.log\" sync=true" 2
 compareAll testcase2.con.log testcase2.dec.log 2
 
 report