native-lib.cpp
Go to the documentation of this file.
1 #include <jni.h>
2 #include "librealsense2/rs.hpp"
3 
4 extern "C" JNIEXPORT jstring JNICALL
6  return (*env).NewStringUTF(RS2_API_VERSION_STR);
7 }
8 
9 extern "C" JNIEXPORT jint JNICALL
12  return ctx.query_devices().size();;
13 }
device_list query_devices() const
Definition: rs_context.hpp:112
uint32_t size() const
Definition: rs_device.hpp:711
JNIEXPORT jint JNICALL Java_com_example_realsense_1native_1example_MainActivity_nGetCamerasCountFromJNI(JNIEnv *env, jclass type)
Definition: native-lib.cpp:10
JNIEXPORT jstring JNICALL Java_com_example_realsense_1native_1example_MainActivity_nGetLibrealsenseVersionFromJNI(JNIEnv *env, jclass type)
Definition: native-lib.cpp:5
GLenum type
#define RS2_API_VERSION_STR
Definition: rs.h:43


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