android/jni/context.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 #include "../../../include/librealsense2/hpp/rs_context.hpp"
9 
10 extern "C" JNIEXPORT jlong JNICALL
12  rs2_error* e = NULL;
14  handle_error(env, e);
15  return (jlong) handle;
16 }
17 
18 extern "C" JNIEXPORT void JNICALL
21 }
22 
23 extern "C" JNIEXPORT jlong JNICALL
25  jlong handle, jint mask) {
26  rs2_error* e = NULL;
27  rs2_device_list* device_list_handle = rs2_query_devices_ex((rs2_context *) handle, mask, &e);
28  handle_error(env, e);
29  return (jlong) device_list_handle;
30 }
31 
32 extern "C"
33 JNIEXPORT jstring JNICALL
35  return env->NewStringUTF(RS2_API_VERSION_STR);
36 }
rs2_error
Definition: rs.cpp:227
Java_com_intel_realsense_librealsense_RsContext_nDelete
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_RsContext_nDelete(JNIEnv *env, jclass type, jlong handle)
Definition: android/jni/context.cpp:19
rs2_delete_context
void rs2_delete_context(rs2_context *context)
Frees the relevant context object.
Definition: rs.cpp:269
type
GLenum type
Definition: glad/glad/glad.h:135
mask
GLint GLuint mask
Definition: glad/glad/glad.h:1460
rs2_create_context
rs2_context * rs2_create_context(int api_version, rs2_error **error)
Creates RealSense context that is required for the rest of the API. Context settings are taken from t...
Definition: rs.cpp:252
rs2_context
Definition: rs.cpp:169
NULL
#define NULL
Definition: tinycthread.c:47
handle_error
void handle_error(JNIEnv *env, rs2_error *error)
Definition: error.cpp:6
error.h
Java_com_intel_realsense_librealsense_RsContext_nGetVersion
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_RsContext_nGetVersion(JNIEnv *env, jclass type)
Definition: android/jni/context.cpp:34
rs2_device_list
Definition: rs.cpp:83
RS2_API_VERSION_STR
#define RS2_API_VERSION_STR
Definition: rs.h:44
Java_com_intel_realsense_librealsense_RsContext_nCreate
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_RsContext_nCreate(JNIEnv *env, jclass type)
Definition: android/jni/context.cpp:11
rs2_query_devices_ex
rs2_device_list * rs2_query_devices_ex(const rs2_context *context, int product_mask, rs2_error **error)
Definition: rs.cpp:312
RS2_API_VERSION
#define RS2_API_VERSION
Definition: rs.h:42
rmse.e
e
Definition: rmse.py:177
unit-test-config.handle
handle
Definition: unit-test-config.py:371
Java_com_intel_realsense_librealsense_RsContext_nQueryDevices
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_RsContext_nQueryDevices(JNIEnv *env, jclass type, jlong handle, jint mask)
Definition: android/jni/context.cpp:24


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01