[Issue type] new feature
Introduce machine_learning_native_remove(handle, task_name) function
to remove task matching `task_name` from the handle which was added
using machine_learning_native_add().
Change-Id: I4c341205737b91995da7992462a85d3655e997e2
Signed-off-by: Vibhav Aggarwal <v.aggarwal@samsung.com>
{
void *machine_learning_native_create();
void machine_learning_native_add(void *handle, const std::string &task_name, mediavision::common::ITask *task);
+void machine_learning_native_remove(void *handle, const std::string &task_name);
void machine_learning_native_destroy(void *handle);
void machine_learning_native_configure(void *handle, const std::string &task_name);
void machine_learning_native_prepare(void *handle, const std::string &task_name);
context->__tasks.insert(make_pair(task_name, task));
}
+void machine_learning_native_remove(void *handle, const string &task_name)
+{
+ auto context = static_cast<Context *>(handle);
+
+ context->__tasks.erase(task_name);
+}
+
void machine_learning_native_destroy(void *handle)
{
auto context = static_cast<Context *>(handle);