[Common] Add other/tensors parsing rule.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 2 Apr 2019 10:06:40 +0000 (19:06 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 3 Apr 2019 04:18:15 +0000 (13:18 +0900)
dimensions and types are not deliminated by both '.' and ','.
It is to support GstCap (CapsFilter) with other/tensors string
expressions.

Note that ... ! other/tensors,types=float32,int32 !...
is not supported. We need to use . instead in such cases.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gst/nnstreamer/tensor_common.c

index 2d092c6..92cc4b2 100644 (file)
@@ -326,7 +326,7 @@ gst_tensors_info_parse_dimensions_string (GstTensorsInfo * info,
     guint i;
     gchar **str_dims;
 
-    str_dims = g_strsplit (dim_string, ",", -1);
+    str_dims = g_strsplit_set (dim_string, ",.", -1);
     num_dims = g_strv_length (str_dims);
 
     if (num_dims > NNS_TENSOR_SIZE_LIMIT) {
@@ -364,7 +364,7 @@ gst_tensors_info_parse_types_string (GstTensorsInfo * info,
     guint i;
     gchar **str_types;
 
-    str_types = g_strsplit (type_string, ",", -1);
+    str_types = g_strsplit_set (type_string, ",.", -1);
     num_types = g_strv_length (str_types);
 
     if (num_types > NNS_TENSOR_SIZE_LIMIT) {