Skip to content

Android error handling fix - #4032

Merged
ev-mp merged 4 commits into
realsenseai:developmentfrom
matkatz:android-error-handling-fix
May 28, 2019
Merged

Android error handling fix#4032
ev-mp merged 4 commits into
realsenseai:developmentfrom
matkatz:android-error-handling-fix

Conversation

@matkatz

@matkatz matkatz commented May 21, 2019

Copy link
Copy Markdown
Contributor
  • reset the streaming endpoint in case of overflow.
  • fix wrong error handling on android usb transfer commands
  • release device/sensor instances that kept alive in the camera app

messenger->reset_endpoint(read_ep, reset_ep_timeout);
break;
case librealsense::platform::RS2_USB_STATUS_SUCCESS:
strctx->stream->got_bytes = transferred;

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.

gottransferred_bytes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the name in all of our UVC implementations, we can change it when moving to rsuvc

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am using libuvc under Android, how can I handle the error?

Comment thread src/android/usb_host/android_uvc.cpp Outdated
do {
auto i = strctx->stream->stream_if->interface;
uint32_t transferred = 0;
auto sts = messenger->bulk_transfer(read_ep, strctx->stream->outbuf, LIBUVC_XFER_BUF_SIZE, transferred, 1000);

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.

Why do you use hard-coded timeouts ? (1000, 50)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will create a define, it is not accessible to the app level

Comment thread src/usbhost/messenger-usbhost.cpp Outdated
@ev-mp
ev-mp merged commit 0e19e4d into realsenseai:development May 28, 2019
@matkatz
matkatz deleted the android-error-handling-fix 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