Commit 50df762c authored by Ethan Rublee's avatar Ethan Rublee

giving the android jni a start up function OnLoad

parent 91b5c97d
# The ARMv7 is significanly faster due to the use of the hardware FPU
APP_ABI := armeabi armeabi-v7a
APP_BUILD_SCRIPT := $(call my-dir)/Android.mk
APP_PROJECT_PATH := $(PROJECT_PATH)
\ No newline at end of file
APP_MODULES := android-opencv
......@@ -34,6 +34,7 @@ using namespace cv;
}
%}
%pragma(java) jniclasscode=%{
static {
try {
......@@ -48,6 +49,7 @@ using namespace cv;
}
%}
%include "cv.i"
%include "glcamera.i"
......
......@@ -5,6 +5,16 @@
#include <android/log.h>
#include <opencv2/imgproc/imgproc.hpp>
#define LOG_TAG "libandroid-opencv"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
JNIEnv *env;
LOGI("JNI_OnLoad called for opencv");
return JNI_VERSION_1_4;
}
JNIEXPORT void JNICALL Java_com_opencv_jni_opencvJNI_addYUVtoPool(JNIEnv * env,
jclass thiz, jlong ppool, jobject _jpool, jbyteArray jbuffer,
......
......@@ -9,7 +9,7 @@ using namespace cv;
extern "C" {
#endif
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved);
//
//JNIEXPORT jobject JNICALL Java_com_opencv_jni_opencvJNI_getBitmapBuffer(
// JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment