Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaronkot committed Jan 15, 2025
1 parent 3faabac commit d51dad3
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/android/jni/jni_gpupixel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <jni.h>
#include <string>
#include <list>
#include <face_reshape_filter.h>
#include "gpupixel_context.h"
#include "jni_helpers.h"
#include "libyuv.h"
Expand Down Expand Up @@ -367,21 +366,7 @@ extern "C" void Java_com_pixpark_gpupixel_GPUPixel_nativeSetLandmarkCallback (
jclass obj,
jobject source,
jlong classId) {

jobject globalSourceRef = env->NewGlobalRef(source);
((SourceCamera*)classId)->RegLandmarkCallback([=](std::vector<float> landmarks) {
jclass cls = env->GetObjectClass(globalSourceRef);
jmethodID methodID = env->GetMethodID(cls, "onFaceLandmark", "([F)V");

jfloatArray arr = env->NewFloatArray(landmarks.size());
env->SetFloatArrayRegion( arr, 0, landmarks.size(), landmarks.data());

env->CallVoidMethod(globalSourceRef, methodID, arr);

env->DeleteLocalRef(arr);

});

//todo
};

extern "C"
Expand Down

0 comments on commit d51dad3

Please sign in to comment.