9 #include "../../../include/librealsense2/rs.h" 12 JNIEXPORT
void JNICALL
18 JNIEXPORT jlongArray JNICALL
22 std::shared_ptr<rs2_stream_profile_list> list(
30 std::vector<const rs2_stream_profile*>
profiles;
36 profiles.push_back(sp);
40 jlongArray rv = env->NewLongArray(profiles.size());
43 env->SetLongArrayRegion(rv,
i, 1, reinterpret_cast<const jlong *>(&profiles[
i]));
49 JNIEXPORT jboolean JNICALL
51 jlong
handle, jint extension) {
54 static_cast<rs2_extension>(extension), &e);
61 JNIEXPORT
void JNICALL
64 jint min_y, jint max_x,
72 JNIEXPORT
void JNICALL
74 jlong
handle, jobject roi) {
75 int min_x, min_y, max_x, max_y;
83 jclass clazz = env->GetObjectClass(roi);
85 jfieldID min_x_field = env->GetFieldID(clazz,
"minX",
"I");
86 jfieldID min_y_field = env->GetFieldID(clazz,
"minY",
"I");
87 jfieldID max_x_field = env->GetFieldID(clazz,
"maxX",
"I");
88 jfieldID max_y_field = env->GetFieldID(clazz,
"maxY",
"I");
90 env->SetIntField(roi, min_x_field, min_x);
91 env->SetIntField(roi, min_y_field, min_y);
92 env->SetIntField(roi, max_x_field, max_x);
93 env->SetIntField(roi, max_y_field, max_y);
97 JNIEXPORT jfloat JNICALL
float rs2_get_depth_scale(rs2_sensor *sensor, rs2_error **error)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_RoiSensor_nSetRegionOfInterest(JNIEnv *env, jclass clazz, jlong handle, jint min_x, jint min_y, jint max_x, jint max_y)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Sensor_nRelease(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_RoiSensor_nGetRegionOfInterest(JNIEnv *env, jclass type, jlong handle, jobject roi)
JNIEXPORT jlongArray JNICALL Java_com_intel_realsense_librealsense_Sensor_nGetStreamProfiles(JNIEnv *env, jclass type, jlong handle)
GLuint64 GLenum void * handle
void rs2_set_region_of_interest(const rs2_sensor *sensor, int min_x, int min_y, int max_x, int max_y, rs2_error **error)
sets the active region of interest to be used by auto-exposure algorithm
void handle_error(JNIEnv *env, rs2_error *error)
rs2_stream_profile_list * rs2_get_stream_profiles(rs2_sensor *sensor, rs2_error **error)
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_Sensor_nIsSensorExtendableTo(JNIEnv *env, jclass type, jlong handle, jint extension)
void rs2_delete_sensor(rs2_sensor *sensor)
void rs2_get_region_of_interest(const rs2_sensor *sensor, int *min_x, int *min_y, int *max_x, int *max_y, rs2_error **error)
gets the active region of interest to be used by auto-exposure algorithm
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
JNIEXPORT jfloat JNICALL Java_com_intel_realsense_librealsense_DepthSensor_nGetDepthScale(JNIEnv *env, jclass clazz, jlong handle)
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)