[Common] remove typefind function
authorJaeyun <jy1210.jung@samsung.com>
Thu, 25 Apr 2019 09:04:35 +0000 (18:04 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Sat, 11 May 2019 12:59:49 +0000 (21:59 +0900)
Remove typefind function.

TODO
Consider to add typefind later in tensor-save/load plugins.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/nnstreamer/tensor_common.c
gst/nnstreamer/tensor_common.h

index 1160371..f69ea7d 100644 (file)
@@ -1008,26 +1008,6 @@ find_key_strv (const gchar ** strv, const gchar * key)
 }
 
 /**
- * @brief A callback for typefind, trying to find whether a file is other/tensors or not.
- * For the concrete definition of headers, please look at the wiki page of nnstreamer:
- * https://github.com/nnsuite/nnstreamer/wiki/Design-External-Save-Format-for-other-tensor-and-other-tensors-Stream-for-TypeFind
- */
-void
-gst_tensors_typefind_function (GstTypeFind * tf, gpointer pdata)
-{
-  const guint8 *data = gst_type_find_peek (tf, 0, 40);  /* The first 40 bytes are header-0 in v.1 protocol */
-  const char formatstr[] = "TENSORST";
-  const unsigned int *supported_version = (const unsigned int *) (&data[8]);
-  const unsigned int *num_tensors = (const unsigned int *) (&data[12]);
-  if (data &&
-      memcmp (data, formatstr, 8) == 0 &&
-      *supported_version == 1 && *num_tensors <= 16 && *num_tensors >= 1) {
-    gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM,
-        gst_caps_new_simple ("other/tensorsave", NULL, NULL));
-  }
-}
-
-/**
  * @brief A function call to decide current timestamp among collected pads based on PTS.
  * It will decide current timestamp according to sync option.
  */
index f00ca1e..630a942 100644 (file)
@@ -107,19 +107,6 @@ typedef struct
 } GstTensorPad;
 
 /**
- * @brief A callback for typefind, trying to find whether a file is other/tensors or not.
- * For the concrete definition of headers, please look at the wiki page of nnstreamer:
- * https://github.com/nnsuite/nnstreamer/wiki/Design-External-Save-Format-for-other-tensor-and-other-tensors-Stream-for-TypeFind
- */
-extern void gst_tensors_typefind_function (GstTypeFind * tf, gpointer pdata);
-
-#define GST_TENSOR_TYPEFIND_REGISTER(plugin)  do { \
-    gst_type_find_register (plugin, "other/tensorsave", \
-        GST_RANK_PRIMARY, gst_tensors_typefind_function, "tnsr", \
-        gst_caps_new_simple ("other/tensorsave", NULL, NULL), NULL, NULL); \
-    } while (0)
-
-/**
  * @brief A function call to decide current timestamp among collected pads based on PTS.
  * It will decide current timestamp according to sync option.
  * @return True / False if EOS, it return TRUE.