| 31 | } |
| 32 | |
| 33 | jint processVideoFrame(JNIEnv *env, jobject instance, |
| 34 | jlong native_algorithm_ptr, jlong native_video_frame_ptr, |
| 35 | jlong native_process_param_ptr) { |
| 36 | bmf_lite::IAlgorithm *algorithm_ptr = |
| 37 | reinterpret_cast<bmf_lite::IAlgorithm *>(native_algorithm_ptr); |
| 38 | if (algorithm_ptr == nullptr) { |
| 39 | return (jint)bmf_lite::BMF_LITE_NullPtr; |
| 40 | } |
| 41 | bmf_lite::Param *param_ptr = |
| 42 | reinterpret_cast<bmf_lite::Param *>(native_process_param_ptr); |
| 43 | if (param_ptr == nullptr) { |
| 44 | return (jint)bmf_lite::BMF_LITE_NullPtr; |
| 45 | } |
| 46 | bmf_lite::VideoFrame *video_frame_ptr = |
| 47 | reinterpret_cast<bmf_lite::VideoFrame *>(native_video_frame_ptr); |
| 48 | if (video_frame_ptr == nullptr) { |
| 49 | return (jint)bmf_lite::BMF_LITE_NullPtr; |
| 50 | } |
| 51 | |
| 52 | int ret = algorithm_ptr->processVideoFrame(*video_frame_ptr, *param_ptr); |
| 53 | return jint(ret); |
| 54 | } |
| 55 | |
| 56 | jobject getVideoFrameOutput(JNIEnv *env, jobject instance, |
| 57 | jlong native_algorithm_ptr) { |
no test coverage detected