frameset.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 #include <jni.h>
5 #include "error.h"
6 #include "../../../include/librealsense2/rs.h"
7 
8 extern "C" JNIEXPORT void JNICALL
10  rs2_error *e = NULL;
11  rs2_frame_add_ref((rs2_frame *) handle, &e);
12  handle_error(env, e);
13 }
14 
15 extern "C" JNIEXPORT void JNICALL
17  jlong handle) {
18  rs2_release_frame(reinterpret_cast<rs2_frame *>(handle));
19 }
20 
21 extern "C" JNIEXPORT jlong JNICALL
23  jlong handle, jint index) {
24  rs2_error *e = NULL;
25  rs2_frame *rv = rs2_extract_frame(reinterpret_cast<rs2_frame *>(handle), index, &e);
26  handle_error(env, e);
27  return reinterpret_cast<jlong>(rv);
28 }
29 
30 extern "C" JNIEXPORT jint JNICALL
32  jlong handle) {
33  rs2_error *e = NULL;
34  int rv = rs2_embedded_frames_count(reinterpret_cast<rs2_frame *>(handle), &e);
35  handle_error(env, e);
36  return rv;
37 }
GLuint64 GLenum void * handle
Definition: glext.h:7785
void handle_error(JNIEnv *env, rs2_error *error)
Definition: error.cpp:6
e
Definition: rmse.py:177
GLuint index
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FrameSet_nRelease(JNIEnv *env, jclass type, jlong handle)
Definition: frameset.cpp:16
int rs2_embedded_frames_count(rs2_frame *composite, rs2_error **error)
Definition: rs.cpp:2144
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FrameSet_nExtractFrame(JNIEnv *env, jclass type, jlong handle, jint index)
Definition: frameset.cpp:22
GLenum type
void rs2_frame_add_ref(rs2_frame *frame, rs2_error **error)
Definition: rs.cpp:1015
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FrameSet_nAddRef(JNIEnv *env, jclass type, jlong handle)
Definition: frameset.cpp:9
#define NULL
Definition: tinycthread.c:47
void rs2_release_frame(rs2_frame *frame)
Definition: rs.cpp:993
rs2_frame * rs2_extract_frame(rs2_frame *composite, int index, rs2_error **error)
Definition: rs.cpp:2114
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_FrameSet_nFrameCount(JNIEnv *env, jclass type, jlong handle)
Definition: frameset.cpp:31
struct rs2_frame rs2_frame
Definition: rs_types.h:261


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:14