saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.99k stars 1.2k forks source link

open uvc camera fail #212

Open java-Xs opened 7 years ago

java-Xs commented 7 years ago

android TV BOX 5.1 Hisilicon SC823 camera is Logitech C270 The app running demo is test8, and at connect, the return value is -1. I trace the code and find that the function parse_interface () returns r = -1, A section of code is as follows Skip over any class interface or vendor / descriptors While (size = LIBUSB_DT_HEADER_SIZE/DESC_HEADER_LENGTH/) { Usbi_parse_descriptor (buffer, BB, &header, 0); If UNLIKELY (header.bLength < LIBUSB_DT_HEADER_SIZE/DESC_HEADER_LENGTH/) { Usbi_err (CTX, invalid, extra, INTF, DESC, len (%d), header.bLength); LOGE (invalid, extra, INTF, DESC, len (%d), header.bLength); //error R = LIBUSB_ERROR_IO; Goto err; } else if (header.bLength > size) { Usbi_warn (ctx, "Short, extra, INTF, DESC, read,%d/%d."", Size, header.bLength); RETURN (parsed, int); } MARK ("bDescriptorType=0x%02x", header.bDescriptorType); We find another / * If "proper" descriptor then we're done. If (is_known_descriptor_type (header.bDescriptorType)) Break; Buffer = header.bLength; Parsed = header.bLength; Size = header.bLength; } Has anyone ever had the same problem?

xbesung commented 7 years ago

Yes, I did. Are you using ndk15? #181