From 0d488de36b3c4e371ac6afa5e602b28d8dcb1b0d Mon Sep 17 00:00:00 2001 From: Jaeyun Date: Thu, 25 Apr 2019 18:04:35 +0900 Subject: [PATCH] [Common] remove typefind function Remove typefind function. TODO Consider to add typefind later in tensor-save/load plugins. Signed-off-by: Jaeyun Jung --- gst/nnstreamer/tensor_common.c | 20 -------------------- gst/nnstreamer/tensor_common.h | 13 ------------- 2 files changed, 33 deletions(-) diff --git a/gst/nnstreamer/tensor_common.c b/gst/nnstreamer/tensor_common.c index 1160371..f69ea7d 100644 --- a/gst/nnstreamer/tensor_common.c +++ b/gst/nnstreamer/tensor_common.c @@ -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. */ diff --git a/gst/nnstreamer/tensor_common.h b/gst/nnstreamer/tensor_common.h index f00ca1e..630a942 100644 --- a/gst/nnstreamer/tensor_common.h +++ b/gst/nnstreamer/tensor_common.h @@ -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. -- 2.7.4