[subplugin] Refactor subplugin interface
authorParichay Kapoor <pk.kapoor@samsung.com>
Mon, 3 Feb 2020 10:18:26 +0000 (19:18 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 13 Feb 2020 03:57:13 +0000 (19:57 -0800)
commitc119a3af506ccc3c137c88c51d20ba6e37b5ab67
tree7a00b69c5a7d7cdea630b2cc195f43d472579a30
parentb6a911933fa86d8360cdf6ed7fff6d94bb7c3860
[subplugin] Refactor subplugin interface

Refactor subplugin interface
Add new interface for the subplugins along with the old interface
Added version number to check if old subplugin interface is used or new one

Both the interfaces are added as a union,
This will allow for staggered changes rather a big change to be made at once

V2:
- Merged operation GET_INPUT_INFO and GET_OUTPUT_INFO into 1. Now atleast one of
SET_INPUT_INFO and GET_INOUT_INFO must be supported.
- Added framework versioning helper macros
- Older framework is now version 0 and newer one is version 1
- Renamed sendEvent to eventHandler
- private_data is a double pointer only in open/close in v1
- Invoke in v1 compared to invoke_NN in v0 where private_data is not a double pointer
- Moved init and fini functions in tensor_filter_cpp for readability

V3:
Update GstTensorFilterFramework function pointers set for all filters to pass all build

V4:
Added to description - eventHandler argument `void *data` is allowed to be NULL

V5:
Added tensor filter API versions for external subplugins to verify compatibility at compile time
Renamed GET_INOUT_INFO to GET_IN_OUT_INFO for readability

V6:
Added more operations to be supported with eventHandler which allow updating the properties
Added GstTensorFilterFrameworkEventData which allows arguments to be passed dependent on the event
GstTensorFilterProperties is passed to all the callbacks

V7:
Updated destroyNotify to take private_data as an input for V0, and corresponding changes in tensor_filter and subplugins
Added allocateInInvoke for V0

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
15 files changed:
ext/nnstreamer/tensor_filter/tensor_filter_armnn.cc
ext/nnstreamer/tensor_filter/tensor_filter_caffe2.cc
ext/nnstreamer/tensor_filter/tensor_filter_cpp.cc
ext/nnstreamer/tensor_filter/tensor_filter_edgetpu.cc
ext/nnstreamer/tensor_filter/tensor_filter_movidius_ncsdk2.c
ext/nnstreamer/tensor_filter/tensor_filter_nnfw.c
ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc
ext/nnstreamer/tensor_filter/tensor_filter_python.cc
ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc
ext/nnstreamer/tensor_filter/tensor_filter_tensorflow.cc
ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
gst/nnstreamer/nnstreamer_plugin_api_filter.h
gst/nnstreamer/tensor_filter/tensor_filter.c
gst/nnstreamer/tensor_filter/tensor_filter_custom.c
gst/nnstreamer/tensor_filter/tensor_filter_custom_easy.c