Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Apr 18, 2019

Conversation

matkatz
Copy link
Contributor

@matkatz matkatz commented Apr 16, 2019

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

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
Collaborator

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

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
Collaborator

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
Collaborator

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

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
Collaborator

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 IntelRealSense: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