Description
1. Environment
Project Platform: Android
Compiler: LLVM for arm64
Filter Type: Custom RKNN tensor filter using NNStreamer
Libraries Used: RKNN library
NNStreamer Source Code File: tensor_filter_custom.c
project Integration File: Integrated .so file using .mk file
2. Problem Description
Currently, I am developing a custom tensor filter using RKNN to apply NNStreamer to an Android application. To do this, I modified the existing example code (tensor_filter_custom.c) to add RKNN functionality, then built the .so file using the LLVM compiler for arm64.
After integrating the built .so file into the Android project, I attempted to call the init function of the custom filter in the nnstreamer-jni.c file, but the Android project fails to recognize this function, resulting in an error.
Additionally, I changed the init/fini function names to avoid conflicts with other custom filters, but the function is still not recognized.
3. Attempted Solutions
Built the .so file as a shared library according to the official documentation.
Integrated the project using the .mk file and attempted to call the init function in nnstreamer-jni.c.
Added all related header files to the project and kept the function format as consistent with the original code as possible.
Observed examples from other custom filters where init/fini function names were modified, and changed the function names to avoid conflicts.
4. Expected Outcome
I would like assistance to ensure that the init function inside the .so file is properly recognized and called in the Android project.
I am seeking advice on why the custom tensor filter init function is not being recognized, and how to link the .so file properly despite the header file lacking function declarations.
5. Relevant Code Snippet
void init_filter_rknn(void) {
nnstreamer_filter_probe(&NNS_support_custom);
}
void fini_filter_rknn(void) {
nnstreamer_filter_exit(NNS_support_custom.name);
}