7 #include "../../../include/librealsense2/rs.h" 9 extern "C" JNIEXPORT jboolean JNICALL
17 extern "C" JNIEXPORT
void JNICALL
21 rs2_set_option(reinterpret_cast<const rs2_options *>(handle), static_cast<rs2_option>(option), value, &e);
25 extern "C" JNIEXPORT jfloat JNICALL
29 float rv =
rs2_get_option(reinterpret_cast<const rs2_options *>(handle),
30 static_cast<rs2_option>(option), &e);
35 extern "C" JNIEXPORT
void JNICALL
37 jint
option, jobject outParams) {
43 jclass clazz = env->GetObjectClass(outParams);
46 static_cast<rs2_option>(option), &min, &max, &step, &def, &e);
52 jfieldID minField = env->GetFieldID(clazz,
"min",
"F");
53 jfieldID maxField = env->GetFieldID(clazz,
"max",
"F");
54 jfieldID stepField = env->GetFieldID(clazz,
"step",
"F");
55 jfieldID defField = env->GetFieldID(clazz,
"def",
"F");
57 env->SetFloatField(outParams, minField, min);
58 env->SetFloatField(outParams, maxField, max);
59 env->SetFloatField(outParams, stepField, step);
60 env->SetFloatField(outParams, defField, def);
63 extern "C" JNIEXPORT jboolean JNICALL
68 static_cast<rs2_option>(option), &e);
73 extern "C" JNIEXPORT jstring JNICALL
78 static_cast<rs2_option>(option), &e);
80 return env->NewStringUTF(rv);
83 extern "C" JNIEXPORT jstring JNICALL
89 static_cast<rs2_option>(option), value, &e);
91 return env->NewStringUTF(rv);
float rs2_get_option(const rs2_options *options, rs2_option option, rs2_error **error)
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
GLuint64 GLenum void * handle
void handle_error(JNIEnv *env, rs2_error *error)
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_Options_nIsReadOnly(JNIEnv *env, jclass type, jlong handle, jint option)
int rs2_supports_option(const rs2_options *options, rs2_option option, rs2_error **error)
const char * rs2_get_option_value_description(const rs2_options *options, rs2_option option, float value, rs2_error **error)
void rs2_get_option_range(const rs2_options *sensor, rs2_option option, float *min, float *max, float *step, float *def, rs2_error **error)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Options_nGetRange(JNIEnv *env, jclass type, jlong handle, jint option, jobject outParams)
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_Options_nSupports(JNIEnv *env, jclass type, jlong handle, jint option)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Options_nSetValue(JNIEnv *env, jclass type, jlong handle, jint option, jfloat value)
const char * rs2_get_option_description(const rs2_options *options, rs2_option option, rs2_error **error)
int rs2_is_option_read_only(const rs2_options *options, rs2_option option, rs2_error **error)
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_Options_nGetDescription(JNIEnv *env, jclass type, jlong handle, jint option)
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_Options_nGetValueDescription(JNIEnv *env, jclass type, jlong handle, jint option, jfloat value)
void rs2_set_option(const rs2_options *options, rs2_option option, float value, rs2_error **error)
JNIEXPORT jfloat JNICALL Java_com_intel_realsense_librealsense_Options_nGetValue(JNIEnv *env, jclass type, jlong handle, jint option)