Skip to content

android - add presets support, enable camera stream configuration - #3771

Merged
ev-mp merged 5 commits into
realsenseai:developmentfrom
matkatz:android-presets-support
Apr 18, 2019
Merged

android - add presets support, enable camera stream configuration#3771
ev-mp merged 5 commits into
realsenseai:developmentfrom
matkatz:android-presets-support

Conversation

@matkatz

@matkatz matkatz commented Apr 16, 2019

Copy link
Copy Markdown
Contributor

This PR enables depth presets via Java Android wrapper.

It also contains new features to the Android camera app:

  • loading depth presets.
  • stream configuration.
  • camera info.
  • live streaming statistics.
    camera_app

Tracked on: DSO-12447

Comment thread src/android/jni/advanced_mode.cpp Outdated
Java_com_intel_realsense_librealsense_Device_nSerializePresetToJson(JNIEnv *env, jclass type,
jlong handle) {
rs2_error* e = NULL;
rs2_raw_data_buffer* raw_data_buffer = rs2_serialize_json(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raw_data_buffer should probably be wrapped in RAII in order jByteArray will throw.
Check the implementation for std::vector<uint8_t> send_and_receive_raw_data(con in rs_device.hpp

Comment thread src/android/usb_host/usb_pipe.cpp Outdated
for(int i = 0; i < response->actual_length; i++)
buff += ", " + std::to_string(((uint8_t*)response->buffer)[i]);
LOG_DEBUG("interrupt_request: " << buff.c_str());
if(response->actual_length == 6){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace all the hard-coded codes with enum for maintainability

long[] streamProfilesHandles = nGetStreamProfiles(mHandle);
List<StreamProfile> rv = new ArrayList<>();
for(long h : streamProfilesHandles){
rv.add(new VideoStreamProfile(h));// TODO check if extendable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put provision for motion sensor

Comment thread src/android/usb_host/usb_pipe.cpp Outdated
0x01, //CLEAR_FEATURE
0, _endpoint.get_endpoint_address(), NULL, 0, 10) == UVC_SUCCESS;
0x01, //CLEAR_FEATURE
0, _endpoint.get_endpoint_address(), NULL, 0, 10) == UVC_SUCCESS;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment for 10

@ev-mp
ev-mp merged commit d894c53 into realsenseai:development Apr 18, 2019
@matkatz
matkatz deleted the android-presets-support branch July 9, 2019 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants