Updated Manager for Android

This commit is contained in:
Maksim Shabunin
2015-05-20 17:59:42 +03:00
parent a28c8d002d
commit caffbaafbe
156 changed files with 507 additions and 38206 deletions

View File

@@ -507,55 +507,6 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
"moveWindow" : {'j_code' : '', 'jn_code' : '', 'cpp_code' : '' },
"resizeWindow" : {'j_code' : '', 'jn_code' : '', 'cpp_code' : '' },
}, # Highgui
'VideoCapture' :
{
"getSupportedPreviewSizes" :
{
'j_code' :
"""
public java.util.List<org.opencv.core.Size> getSupportedPreviewSizes()
{
String[] sizes_str = getSupportedPreviewSizes_0(nativeObj).split(",");
java.util.List<org.opencv.core.Size> sizes = new java.util.ArrayList<org.opencv.core.Size>(sizes_str.length);
for (String str : sizes_str) {
String[] wh = str.split("x");
sizes.add(new org.opencv.core.Size(Double.parseDouble(wh[0]), Double.parseDouble(wh[1])));
}
return sizes;
}
""",
'jn_code' :
"""\n private static native String getSupportedPreviewSizes_0(long nativeObj);\n""",
'cpp_code' :
"""
JNIEXPORT jstring JNICALL Java_org_opencv_videoio_VideoCapture_getSupportedPreviewSizes_10
(JNIEnv *env, jclass, jlong self);
JNIEXPORT jstring JNICALL Java_org_opencv_videoio_VideoCapture_getSupportedPreviewSizes_10
(JNIEnv *env, jclass, jlong self)
{
static const char method_name[] = "videoio::VideoCapture_getSupportedPreviewSizes_10()";
try {
LOGD("%s", method_name);
VideoCapture* me = (VideoCapture*) self; //TODO: check for NULL
union {double prop; const char* name;} u;
u.prop = me->get(CAP_PROP_ANDROID_PREVIEW_SIZES_STRING);
return env->NewStringUTF(u.name);
} catch(const std::exception &e) {
throwJavaException(env, &e, method_name);
} catch (...) {
throwJavaException(env, 0, method_name);
}
return env->NewStringUTF("");
}
""",
}, # getSupportedPreviewSizes
}, # VideoCapture
}
# { class : { func : { arg_name : {"ctype" : ctype, "attrib" : [attrib]} } } }