Skip to content

Commit

Permalink
* Add long rs2_get_frame_data_address() to reduce garbage for real…
Browse files Browse the repository at this point in the history
…-time applications using librealsense2 (discussion bytedeco/javacpp#532)
  • Loading branch information
saudet committed Jan 7, 2022
1 parent 91e56d2 commit 7f0122b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Add `long rs2_get_frame_data_address()` to reduce garbage for real-time applications using librealsense2 ([discussion bytedeco/javacpp#532](https://github.com/bytedeco/javacpp/discussions/532))
* Add to `torch.Tensor` convenient `create()`, `createBuffer()`, and `createIndexer()` factory methods for PyTorch
* Upgrade requirements to Android 7.0 for camera support in OpenCV and FFmpeg ([issue bytedeco/javacv#1692](https://github.com/bytedeco/javacv/issues/1692))
* Include new `llvm-c/Transforms/PassBuilder.h` header file in presets for LLVM ([pull #1093](https://github.com/bytedeco/javacpp-presets/pull/1093))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,8 @@ public static native float rs2_calculate_target_z(rs2_device device, rs2_frame_q
*/
public static native @Const Pointer rs2_get_frame_data(@Const rs2_frame frame, @Cast("rs2_error**") PointerPointer error);
public static native @Const Pointer rs2_get_frame_data(@Const rs2_frame frame, @ByPtrPtr rs2_error error);
public static native @Cast("const void*") @Name("rs2_get_frame_data") long rs2_get_frame_data_address(@Const rs2_frame frame, @Cast("rs2_error**") PointerPointer error);
public static native @Cast("const void*") @Name("rs2_get_frame_data") long rs2_get_frame_data_address(@Const rs2_frame frame, @ByPtrPtr rs2_error error);

/**
* retrieve frame width in pixels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public void map(InfoMap infoMap) {
infoMap.put(new Info("rs2_camera_info", "rs2_stream").cast().valueTypes("int").pointerTypes("IntPointer", "IntBuffer", "int[]"))
.put(new Info("RS2_API_VERSION_STR").cppTypes("const char*").pointerTypes("String").translate(false))
.put(new Info("RS2_API_FULL_VERSION_STR").cppTypes("const char*").pointerTypes("String").translate(false))
.put(new Info("rs2_get_frame_data").javaText(
"public static native @Const Pointer rs2_get_frame_data(@Const rs2_frame frame, @Cast(\"rs2_error**\") PointerPointer error);\n"
+ "public static native @Const Pointer rs2_get_frame_data(@Const rs2_frame frame, @ByPtrPtr rs2_error error);\n"
+ "public static native @Cast(\"const void*\") @Name(\"rs2_get_frame_data\") long rs2_get_frame_data_address(@Const rs2_frame frame, @Cast(\"rs2_error**\") PointerPointer error);\n"
+ "public static native @Cast(\"const void*\") @Name(\"rs2_get_frame_data\") long rs2_get_frame_data_address(@Const rs2_frame frame, @ByPtrPtr rs2_error error);\n"))
.put(new Info("rs2_create_playback_device", "rs2_cah_trigger_to_string", "rs2_ambient_light_to_string", "rs2_digital_gain_to_string",
"rs2_create_y411_decoder").skip());
}
Expand Down

0 comments on commit 7f0122b

Please sign in to comment.