91 for (idx = 0; idx <
sizeof(
uvc_error_msgs) /
sizeof(*uvc_error_msgs); ++idx) {
92 if (uvc_error_msgs[idx].err == err) {
93 return uvc_error_msgs[idx].
msg;
97 return "Unknown error";
110 fprintf(stream,
"bmHint: %04x\n", ctrl->
bmHint);
111 fprintf(stream,
"bFormatIndex: %d\n", ctrl->
bFormatIndex);
112 fprintf(stream,
"bFrameIndex: %d\n", ctrl->
bFrameIndex);
115 fprintf(stream,
"wPFrameRate: %d\n", ctrl->
wPFrameRate);
116 fprintf(stream,
"wCompQuality: %d\n", ctrl->
wCompQuality);
118 fprintf(stream,
"wDelay: %d\n", ctrl->
wDelay);
127 return "UncompressedFormat";
129 return "MJPEGFormat";
131 return "FrameFormat";
147 if (devh->info->ctrl_if.bcdUVC) {
148 uvc_streaming_interface_t *stream_if;
154 fprintf(stream,
"DEVICE CONFIGURATION (%04x:%04x/%s) ---\n",
160 fprintf(stream,
"Status: %s\n", devh->streams ?
"streaming" :
"idle");
162 fprintf(stream,
"VideoControl:\n" 163 "\tbcdUVC: 0x%04x\n",
164 devh->info->ctrl_if.bcdUVC);
166 DL_FOREACH(devh->info->stream_ifs, stream_if) {
171 fprintf(stream,
"VideoStreaming(%d):\n" 172 "\tbEndpointAddress: %d\n\tFormats:\n",
173 stream_idx, stream_if->bEndpointAddress);
175 DL_FOREACH(stream_if->format_descs, fmt_desc) {
185 "\t\t bits per pixel: %d\n" 191 for (i = 0; i < 16; ++i)
192 fprintf(stream,
"%02x", fmt_desc->
guidFormat[i]);
197 "\t\t default frame: %d\n" 198 "\t\t aspect ratio: %dx%d\n" 199 "\t\t interlace flags: %02x\n" 200 "\t\t copy protect: %02x\n",
208 uint32_t *interval_ptr;
211 "\t\t\tFrameDescriptor(%d)\n" 212 "\t\t\t capabilities: %02x\n" 213 "\t\t\t size: %dx%d\n" 214 "\t\t\t bit rate: %d-%d\n" 215 "\t\t\t max frame size: %d\n" 216 "\t\t\t default interval: 1/%d\n",
226 for (interval_ptr = frame_desc->
intervals;
230 "\t\t\t interval[%d]: 1/%d\n",
231 (
int) (interval_ptr - frame_desc->
intervals),
232 10000000 / *interval_ptr);
236 "\t\t\t min interval[%d] = 1/%d\n" 237 "\t\t\t max interval[%d] = 1/%d\n",
244 "\t\t\t interval step[%d] = 1/%d\n",
251 fprintf(stream,
"\t-UnknownFormat (%d)\n",
257 fprintf(stream,
"END DEVICE CONFIGURATION\n");
259 fprintf(stream,
"uvc_print_diag: Device not configured!\n");
enum uvc_error uvc_error_t
#define DL_FOREACH(head, el)
void uvc_print_diag(uvc_device_handle_t *devh, FILE *stream)
Print camera capabilities and configuration.
static const char * _uvc_name_for_format_subtype(uint8_t subtype)
const char * serialNumber
void uvc_free_device_descriptor(uvc_device_descriptor_t *desc)
Frees a device descriptor created with uvc_get_device_descriptor.
uint32_t dwFrameIntervalStep
uint32_t dwMaxVideoFrameBufferSize
uint32_t dwMaxPayloadTransferSize
void uvc_perror(uvc_error_t err, const char *msg)
Print a message explaining an error in the UVC driver.
Implementation-specific UVC constants and structures.
const char * uvc_strerror(uvc_error_t err)
Return a string explaining an error in the UVC driver.
uint32_t dwMaxVideoFrameSize
void uvc_print_stream_ctrl(uvc_stream_ctrl_t *ctrl, FILE *stream)
Print the values in a stream control block.
static const _uvc_error_msg_t uvc_error_msgs[]
uvc_error_t uvc_get_device_descriptor(uvc_device_t *dev, uvc_device_descriptor_t **desc)
Get a descriptor that contains the general information about a deviceFree *desc with uvc_free_device_...
struct uvc_device_handle uvc_device_handle_t
uint32_t dwMinFrameInterval
struct _uvc_error_msg _uvc_error_msg_t
uint32_t dwMaxFrameInterval
uint32_t dwDefaultFrameInterval