6 #include "../../../include/librealsense2/rs.h" 8 extern "C" JNIEXPORT
void JNICALL
15 extern "C" JNIEXPORT
void JNICALL
20 extern "C" JNIEXPORT jlong JNICALL
24 reinterpret_cast<const rs2_frame *>(handle), &e);
30 JNIEXPORT jint JNICALL
39 extern "C" JNIEXPORT
void JNICALL
42 jsize
length = env->GetArrayLength(data_);
44 env->SetByteArrayRegion(data_, 0, length, static_cast<const jbyte *>(
rs2_get_frame_data(
45 reinterpret_cast<const rs2_frame *>(handle), &e)));
50 JNIEXPORT
void JNICALL
53 jsize
length = env->GetArrayLength(data_);
55 env->SetFloatArrayRegion(data_, 0, length, static_cast<const jfloat *>(
rs2_get_frame_data(
56 reinterpret_cast<const rs2_frame *>(handle), &e)));
61 JNIEXPORT
void JNICALL
65 jsize
length = env->GetArrayLength(data_);
68 reinterpret_cast<const rs2_frame *>(handle), &e)));
72 extern "C" JNIEXPORT jboolean JNICALL
74 jlong
handle, jint extension) {
77 static_cast<rs2_extension>(extension), &e);
82 extern "C" JNIEXPORT jint JNICALL
90 extern "C" JNIEXPORT jint JNICALL
98 extern "C" JNIEXPORT jint JNICALL
107 extern "C" JNIEXPORT jint JNICALL
116 extern "C" JNIEXPORT jint JNICALL
124 extern "C" JNIEXPORT jfloat JNICALL
133 extern "C" JNIEXPORT jfloat JNICALL
141 extern "C" JNIEXPORT jint JNICALL
150 JNIEXPORT
void JNICALL
152 jstring filePath_, jlong textureHandle) {
153 const char *filePath = env->GetStringUTFChars(filePath_, 0);
156 reinterpret_cast<rs2_frame *>(textureHandle), &e);
158 env->ReleaseStringUTFChars(filePath_, filePath);
161 extern "C" JNIEXPORT jdouble JNICALL
169 extern "C" JNIEXPORT jint JNICALL
178 extern "C" JNIEXPORT jlong JNICALL
180 jint metadata_type) {
183 static_cast<rs2_frame_metadata_value>(metadata_type), &e);
188 extern "C" JNIEXPORT jboolean JNICALL
190 jint metadata_type) {
193 static_cast<rs2_frame_metadata_value>(metadata_type), &e);
void rs2_export_to_ply(const rs2_frame *frame, const char *fname, rs2_frame *texture, rs2_error **error)
float rs2_depth_frame_get_units(const rs2_frame *frame, rs2_error **error)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Frame_nGetData(JNIEnv *env, jclass type, jlong handle, jbyteArray data_)
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_Frame_nGetStreamProfile(JNIEnv *env, jclass type, jlong handle)
int rs2_get_frame_points_count(const rs2_frame *frame, rs2_error **error)
const rs2_stream_profile * rs2_get_frame_stream_profile(const rs2_frame *frame, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_Points_nGetCount(JNIEnv *env, jclass type, jlong handle)
int rs2_is_frame_extendable_to(const rs2_frame *frame, rs2_extension extension_type, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_VideoFrame_nGetHeight(JNIEnv *env, jclass type, jlong handle)
GLuint64 GLenum void * handle
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Points_nGetData(JNIEnv *env, jclass type, jlong handle, jfloatArray data_)
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_Frame_nSupportsMetadata(JNIEnv *env, jclass type, jlong handle, jint metadata_type)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Points_nGetTextureCoordinates(JNIEnv *env, jclass type, jlong handle, jfloatArray data_)
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_Frame_nIsFrameExtendableTo(JNIEnv *env, jclass type, jlong handle, jint extension)
void handle_error(JNIEnv *env, rs2_error *error)
rs2_time_t rs2_get_frame_timestamp(const rs2_frame *frame, rs2_error **error)
rs2_pixel * rs2_get_frame_texture_coordinates(const rs2_frame *frame, rs2_error **error)
JNIEXPORT jfloat JNICALL Java_com_intel_realsense_librealsense_DepthFrame_nGetDistance(JNIEnv *env, jclass type, jlong handle, jint x, jint y)
int rs2_supports_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
int rs2_get_frame_height(const rs2_frame *frame, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_Frame_nGetTimestampDomain(JNIEnv *env, jclass type, jlong handle)
int rs2_get_frame_stride_in_bytes(const rs2_frame *frame, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_VideoFrame_nGetWidth(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT jfloat JNICALL Java_com_intel_realsense_librealsense_DepthFrame_nGetUnits(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_Frame_nGetDataSize(JNIEnv *env, jclass type, jlong handle)
int rs2_get_frame_width(const rs2_frame *frame, rs2_error **error)
float rs2_depth_frame_get_distance(const rs2_frame *frame_ref, int x, int y, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_VideoFrame_nGetStride(JNIEnv *env, jclass type, jlong handle)
rs2_timestamp_domain rs2_get_frame_timestamp_domain(const rs2_frame *frameset, rs2_error **error)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_VideoFrame_nGetBitsPerPixel(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Frame_nRelease(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Points_nExportToPly(JNIEnv *env, jclass type, jlong handle, jstring filePath_, jlong textureHandle)
unsigned long long rs2_get_frame_number(const rs2_frame *frame, rs2_error **error)
int rs2_get_frame_data_size(const rs2_frame *frame, rs2_error **error)
JNIEXPORT jdouble JNICALL Java_com_intel_realsense_librealsense_Frame_nGetTimestamp(JNIEnv *env, jclass type, jlong handle)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_Frame_nGetNumber(JNIEnv *env, jclass type, jlong handle)
void rs2_frame_add_ref(rs2_frame *frame, rs2_error **error)
GLenum GLuint GLenum GLsizei length
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_Frame_nGetMetadata(JNIEnv *env, jclass type, jlong handle, jint metadata_type)
void rs2_release_frame(rs2_frame *frame)
rs2_metadata_type rs2_get_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_Frame_nAddRef(JNIEnv *env, jclass type, jlong handle)
int rs2_get_frame_bits_per_pixel(const rs2_frame *frame, rs2_error **error)
struct rs2_frame rs2_frame
const void * rs2_get_frame_data(const rs2_frame *frame, rs2_error **error)