From 1d46ed34fb7a572aedd392e82e695eb95799e0d1 Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Tue, 4 Jul 2023 18:52:07 +0900 Subject: [PATCH] [Common] change function name Change the name of common util function. Signed-off-by: Jaeyun Jung --- gst/datarepo/gstdatareposink.c | 2 +- gst/nnstreamer/include/nnstreamer_plugin_api.h | 2 +- gst/nnstreamer/nnstreamer_plugin_api_impl.c | 4 ++-- gst/nnstreamer/tensor_filter/tensor_filter.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gst/datarepo/gstdatareposink.c b/gst/datarepo/gstdatareposink.c index 38d1fea..5b6e638 100644 --- a/gst/datarepo/gstdatareposink.c +++ b/gst/datarepo/gstdatareposink.c @@ -320,7 +320,7 @@ gst_data_repo_sink_write_flexible_tensors (GstDataRepoSink * sink, GST_OBJECT_LOCK (sink); - num_tensors = gst_buffer_n_tensor (buffer); + num_tensors = gst_tensor_buffer_get_count (buffer); GST_INFO_OBJECT (sink, "num_tensors: %u", num_tensors); for (i = 0; i < num_tensors; i++) { diff --git a/gst/nnstreamer/include/nnstreamer_plugin_api.h b/gst/nnstreamer/include/nnstreamer_plugin_api.h index 7fe1adb..e1db435 100644 --- a/gst/nnstreamer/include/nnstreamer_plugin_api.h +++ b/gst/nnstreamer/include/nnstreamer_plugin_api.h @@ -141,7 +141,7 @@ gst_tensor_buffer_append_memory (GstBuffer * buffer, GstMemory * memory, const G * @brief Get the number of tensors in the buffer. */ extern guint -gst_buffer_n_tensor (GstBuffer * buffer); +gst_tensor_buffer_get_count (GstBuffer * buffer); G_END_DECLS #endif /* __NNS_PLUGIN_API_H__ */ diff --git a/gst/nnstreamer/nnstreamer_plugin_api_impl.c b/gst/nnstreamer/nnstreamer_plugin_api_impl.c index dfc3c44..a45483b 100644 --- a/gst/nnstreamer/nnstreamer_plugin_api_impl.c +++ b/gst/nnstreamer/nnstreamer_plugin_api_impl.c @@ -1550,7 +1550,7 @@ gst_tensor_buffer_get_nth_memory (GstBuffer * buffer, const guint index) return NULL; } - num_tensors = gst_buffer_n_tensor (buffer); + num_tensors = gst_tensor_buffer_get_count (buffer); if (num_tensors == 0U) { nns_loge ("num_tensors is 0. Please check the buffer."); return NULL; @@ -1760,7 +1760,7 @@ gst_tensor_buffer_append_memory (GstBuffer * buffer, GstMemory * memory, * @brief Get the number of tensors in the buffer. */ guint -gst_buffer_n_tensor (GstBuffer * buffer) +gst_tensor_buffer_get_count (GstBuffer * buffer) { guint num_mems; GstMemory *mem; diff --git a/gst/nnstreamer/tensor_filter/tensor_filter.c b/gst/nnstreamer/tensor_filter/tensor_filter.c index ea02f8b..6d5e78b 100644 --- a/gst/nnstreamer/tensor_filter/tensor_filter.c +++ b/gst/nnstreamer/tensor_filter/tensor_filter.c @@ -685,7 +685,7 @@ gst_tensor_filter_transform (GstBaseTransform * trans, /* 1. Get all input tensors from inbuf. */ /* Internal Logic Error or GST Bug (sinkcap changed!) */ - num_tensors = gst_buffer_n_tensor (inbuf); + num_tensors = gst_tensor_buffer_get_count (inbuf); for (i = 0; i < num_tensors; i++) { in_mem[i] = gst_tensor_buffer_get_nth_memory (inbuf, i); @@ -912,7 +912,7 @@ gst_tensor_filter_transform (GstBaseTransform * trans, return GST_FLOW_OK; mem_map_error: - num_tensors = gst_buffer_n_tensor (inbuf); + num_tensors = gst_tensor_buffer_get_count (inbuf); for (i = 0; i < num_tensors; i++) { if (in_mem[i]) { gst_memory_unmap (in_mem[i], &in_info[i]); -- 2.7.4