[Repo/Push] Use Has Table to handle repo & add slot_id property
authorjijoong.moon <jijoong.moon@samsung.com>
Wed, 21 Nov 2018 01:46:32 +0000 (10:46 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Tue, 27 Nov 2018 09:36:23 +0000 (09:36 +0000)
- Instead of single linked list, Hash table is used to manage repo's
  data. Hash Table is "key [slot_id], GstTensorData*" where slot_id is
  given by user when the tensor_repopush is used.

- Slot Id is added to use as key for hash table. This should be same
  with tensor_repopop element. "tensor_repopop" will withdraw the data
  according to this slot_id.

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
gst/nnstreamer/tensor_repo.c
gst/tensor_repopush/tensor_repopush.c

index c2e8c51..61f342b 100644 (file)
@@ -84,6 +84,8 @@ gst_tensor_repo_push_buffer (guint nth, GstBuffer * buffer)
   g_return_val_if_fail (data != NULL, FALSE);
 
   data->buffer = buffer;
+  _print_log ("Buffer Updated : Buffer Size[%lu]\n",
+      gst_buffer_get_size (data->buffer));
   GST_TENSOR_REPO_BROADCAST (nth);
   GST_TENSOR_REPO_UNLOCK (nth);
   return TRUE;
index cde3af7..eabf796 100644 (file)
@@ -158,6 +158,10 @@ gst_tensor_repopush_init (GstTensorRepoPush * self)
   ret = gst_tensor_repo_add_data (&self->data, self->myid);
   g_assert (ret);
 
+<<<<<<< HEAD
+=======
+  silent_debug ("GstTensorData is sucessfully added : key[%d]", self->myid);
+>>>>>>> [Repo/Push] Use Has Table to handle repo & add slot_id property
 
   self->silent = DEFAULT_SILENT;
   self->signal_rate = DEFAULT_SIGNAL_RATE;