libuvc.h
Go to the documentation of this file.
1 #ifndef LIBUVC_H
2 #define LIBUVC_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stdio.h> // FILE
9 #include <errno.h>
10 #include <libusb.h>
11 #include <sys/time.h> // timeval
12 #include "libuvc_config.h"
13 
17 typedef enum uvc_error {
52 } uvc_error_t;
53 
70 };
71 
72 struct uvc_format_desc;
73 struct uvc_frame_desc;
74 
81 typedef struct uvc_frame_desc {
87  uint8_t bFrameIndex;
88  uint8_t bmCapabilities;
90  uint16_t wWidth;
92  uint16_t wHeight;
94  uint32_t dwMinBitRate;
96  uint32_t dwMaxBitRate;
110  uint32_t dwBytesPerLine;
112  uint32_t *intervals;
114 
120 typedef struct uvc_format_desc {
121  struct uvc_streaming_interface *parent;
126  uint8_t bFormatIndex;
129  union {
130  uint8_t guidFormat[16];
131  uint8_t fourccFormat[4];
132  };
134  union {
136  uint8_t bBitsPerPixel;
138  uint8_t bmFlags;
139  };
142  uint8_t bAspectRatioX;
143  uint8_t bAspectRatioY;
145  uint8_t bCopyProtect;
146  uint8_t bVariableSize;
150 
154  UVC_SET_CUR = 0x01,
155  UVC_GET_CUR = 0x81,
156  UVC_GET_MIN = 0x82,
157  UVC_GET_MAX = 0x83,
158  UVC_GET_RES = 0x84,
159  UVC_GET_LEN = 0x85,
160  UVC_GET_INFO = 0x86,
161  UVC_GET_DEF = 0x87
162 };
163 
167 };
168 
192 };
193 
216 };
217 
222 };
223 
227  UVC_ITT_CAMERA = 0x0201,
229 };
230 
234  UVC_OTT_DISPLAY = 0x0301,
236 };
237 
244 };
245 
252 struct uvc_context;
253 typedef struct uvc_context uvc_context_t;
254 
259 struct uvc_device;
260 typedef struct uvc_device uvc_device_t;
261 
267 struct uvc_device_handle;
268 typedef struct uvc_device_handle uvc_device_handle_t;
269 
275 struct uvc_stream_handle;
276 typedef struct uvc_stream_handle uvc_stream_handle_t;
277 
279 typedef struct uvc_input_terminal {
282  uint8_t bTerminalID;
289  uint64_t bmControls;
291 
292 typedef struct uvc_output_terminal {
296 
298 typedef struct uvc_processing_unit {
301  uint8_t bUnitID;
303  uint8_t bSourceID;
305  uint64_t bmControls;
307 
309 typedef struct uvc_extension_unit {
312  uint8_t bUnitID;
314  uint8_t guidExtensionCode[16];
316  uint64_t bmControls;
318 
323 };
324 
330 };
331 
335 typedef void(uvc_status_callback_t)(enum uvc_status_class status_class,
336  int event,
337  int selector,
338  enum uvc_status_attribute status_attribute,
339  void *data, size_t data_len,
340  void *user_ptr);
341 
346 typedef struct uvc_device_descriptor {
348  uint16_t idVendor;
350  uint16_t idProduct;
352  uint16_t bcdUVC;
354  const char *serialNumber;
356  const char *manufacturer;
358  const char *product;
360 
364 typedef struct uvc_frame {
366  void *data;
368  size_t data_bytes;
370  uint32_t width;
372  uint32_t height;
374  uint32_t fourcc;
376  size_t step;
378  uint32_t sequence;
380  struct timeval capture_time;
391 } uvc_frame_t;
392 
396 typedef void(uvc_frame_callback_t)(struct uvc_frame *frame, void *user_ptr);
397 
401 typedef struct uvc_stream_ctrl {
402  uint16_t bmHint;
403  uint8_t bFormatIndex;
404  uint8_t bFrameIndex;
405  uint32_t dwFrameInterval;
406  uint16_t wKeyFrameRate;
407  uint16_t wPFrameRate;
408  uint16_t wCompQuality;
409  uint16_t wCompWindowSize;
410  uint16_t wDelay;
414  uint8_t bmFramingInfo;
416  uint8_t bMinVersion;
417  uint8_t bMaxVersion;
421 
422 uvc_error_t uvc_init(uvc_context_t **ctx, struct libusb_context *usb_ctx);
423 void uvc_exit(uvc_context_t *ctx);
424 
427  uvc_device_t ***list);
428 void uvc_free_device_list(uvc_device_t **list, uint8_t unref_devices);
429 
431  uvc_device_t *dev,
432  uvc_device_descriptor_t **desc);
435 
438 
441  uvc_device_t **dev,
442  int vid, int pid, const char *sn);
443 
445  uvc_device_t *dev,
446  uvc_device_handle_t **devh);
447 
449  uvc_device_t *dev,
450  uvc_device_handle_t **devh,
451  int camera_number);
452 
453 void uvc_close(uvc_device_handle_t *devh);
454 
456 libusb_device_handle *uvc_get_libusb_handle(uvc_device_handle_t *devh);
457 
460 
463  void *user_ptr);
464 
469 
471  uvc_device_handle_t *devh,
472  uvc_stream_ctrl_t *ctrl,
473  uint32_t fourcc,
474  int width, int height,
475  int fps
476  );
477 
479 
481  uvc_device_handle_t *devh,
482  uvc_stream_ctrl_t *ctrl);
483 
485  uvc_device_handle_t *devh,
486  uvc_stream_ctrl_t *ctrl,
488  void *user_ptr,
489  uint8_t flags,
490  int num_transfer_buffers);
491 
493  uvc_device_handle_t *devh,
494  uvc_stream_ctrl_t *ctrl,
496  void *user_ptr);
497 
499 
504  void *user_ptr,
505  uint8_t flags,
506  int num_transfer_buffers);
509  void *user_ptr);
511  uvc_stream_handle_t *strmh,
512  uvc_frame_t **frame,
513  int32_t timeout_us
514 );
517 
518 int uvc_get_ctrl_len(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl);
519 int uvc_get_ctrl(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len, enum uvc_req_code req_code);
520 int uvc_set_ctrl(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len);
521 
524 
525 /* AUTO-GENERATED control accessors! Update them with the output of `ctrl-gen.py decl`. */
528 
529 uvc_error_t uvc_get_ae_mode(uvc_device_handle_t *devh, uint8_t* mode, enum uvc_req_code req_code);
531 
532 uvc_error_t uvc_get_ae_priority(uvc_device_handle_t *devh, uint8_t* priority, enum uvc_req_code req_code);
533 uvc_error_t uvc_set_ae_priority(uvc_device_handle_t *devh, uint8_t priority);
534 
535 uvc_error_t uvc_get_exposure_abs(uvc_device_handle_t *devh, uint32_t* time, enum uvc_req_code req_code);
537 
538 uvc_error_t uvc_get_exposure_rel(uvc_device_handle_t *devh, int8_t* step, enum uvc_req_code req_code);
540 
541 uvc_error_t uvc_get_focus_abs(uvc_device_handle_t *devh, uint16_t* focus, enum uvc_req_code req_code);
542 uvc_error_t uvc_set_focus_abs(uvc_device_handle_t *devh, uint16_t focus);
543 
544 uvc_error_t uvc_get_focus_rel(uvc_device_handle_t *devh, int8_t* focus_rel, uint8_t* speed, enum uvc_req_code req_code);
545 uvc_error_t uvc_set_focus_rel(uvc_device_handle_t *devh, int8_t focus_rel, uint8_t speed);
546 
547 uvc_error_t uvc_get_focus_simple_range(uvc_device_handle_t *devh, uint8_t* focus, enum uvc_req_code req_code);
549 
552 
553 uvc_error_t uvc_get_iris_abs(uvc_device_handle_t *devh, uint16_t* iris, enum uvc_req_code req_code);
554 uvc_error_t uvc_set_iris_abs(uvc_device_handle_t *devh, uint16_t iris);
555 
556 uvc_error_t uvc_get_iris_rel(uvc_device_handle_t *devh, uint8_t* iris_rel, enum uvc_req_code req_code);
557 uvc_error_t uvc_set_iris_rel(uvc_device_handle_t *devh, uint8_t iris_rel);
558 
559 uvc_error_t uvc_get_zoom_abs(uvc_device_handle_t *devh, uint16_t* focal_length, enum uvc_req_code req_code);
560 uvc_error_t uvc_set_zoom_abs(uvc_device_handle_t *devh, uint16_t focal_length);
561 
562 uvc_error_t uvc_get_zoom_rel(uvc_device_handle_t *devh, int8_t* zoom_rel, uint8_t* digital_zoom, uint8_t* speed, enum uvc_req_code req_code);
563 uvc_error_t uvc_set_zoom_rel(uvc_device_handle_t *devh, int8_t zoom_rel, uint8_t digital_zoom, uint8_t speed);
564 
565 uvc_error_t uvc_get_pantilt_abs(uvc_device_handle_t *devh, int32_t* pan, int32_t* tilt, enum uvc_req_code req_code);
566 uvc_error_t uvc_set_pantilt_abs(uvc_device_handle_t *devh, int32_t pan, int32_t tilt);
567 
568 uvc_error_t uvc_get_pantilt_rel(uvc_device_handle_t *devh, int8_t* pan_rel, uint8_t* pan_speed, int8_t* tilt_rel, uint8_t* tilt_speed, enum uvc_req_code req_code);
569 uvc_error_t uvc_set_pantilt_rel(uvc_device_handle_t *devh, int8_t pan_rel, uint8_t pan_speed, int8_t tilt_rel, uint8_t tilt_speed);
570 
571 uvc_error_t uvc_get_roll_abs(uvc_device_handle_t *devh, int16_t* roll, enum uvc_req_code req_code);
573 
574 uvc_error_t uvc_get_roll_rel(uvc_device_handle_t *devh, int8_t* roll_rel, uint8_t* speed, enum uvc_req_code req_code);
575 uvc_error_t uvc_set_roll_rel(uvc_device_handle_t *devh, int8_t roll_rel, uint8_t speed);
576 
577 uvc_error_t uvc_get_privacy(uvc_device_handle_t *devh, uint8_t* privacy, enum uvc_req_code req_code);
578 uvc_error_t uvc_set_privacy(uvc_device_handle_t *devh, uint8_t privacy);
579 
580 uvc_error_t uvc_get_digital_window(uvc_device_handle_t *devh, uint16_t* window_top, uint16_t* window_left, uint16_t* window_bottom, uint16_t* window_right, uint16_t* num_steps, uint16_t* num_steps_units, enum uvc_req_code req_code);
581 uvc_error_t uvc_set_digital_window(uvc_device_handle_t *devh, uint16_t window_top, uint16_t window_left, uint16_t window_bottom, uint16_t window_right, uint16_t num_steps, uint16_t num_steps_units);
582 
583 uvc_error_t uvc_get_digital_roi(uvc_device_handle_t *devh, uint16_t* roi_top, uint16_t* roi_left, uint16_t* roi_bottom, uint16_t* roi_right, uint16_t* auto_controls, enum uvc_req_code req_code);
584 uvc_error_t uvc_set_digital_roi(uvc_device_handle_t *devh, uint16_t roi_top, uint16_t roi_left, uint16_t roi_bottom, uint16_t roi_right, uint16_t auto_controls);
585 
586 uvc_error_t uvc_get_backlight_compensation(uvc_device_handle_t *devh, uint16_t* backlight_compensation, enum uvc_req_code req_code);
587 uvc_error_t uvc_set_backlight_compensation(uvc_device_handle_t *devh, uint16_t backlight_compensation);
588 
589 uvc_error_t uvc_get_brightness(uvc_device_handle_t *devh, int16_t* brightness, enum uvc_req_code req_code);
590 uvc_error_t uvc_set_brightness(uvc_device_handle_t *devh, int16_t brightness);
591 
592 uvc_error_t uvc_get_contrast(uvc_device_handle_t *devh, uint16_t* contrast, enum uvc_req_code req_code);
593 uvc_error_t uvc_set_contrast(uvc_device_handle_t *devh, uint16_t contrast);
594 
595 uvc_error_t uvc_get_contrast_auto(uvc_device_handle_t *devh, uint8_t* contrast_auto, enum uvc_req_code req_code);
596 uvc_error_t uvc_set_contrast_auto(uvc_device_handle_t *devh, uint8_t contrast_auto);
597 
598 uvc_error_t uvc_get_gain(uvc_device_handle_t *devh, uint16_t* gain, enum uvc_req_code req_code);
599 uvc_error_t uvc_set_gain(uvc_device_handle_t *devh, uint16_t gain);
600 
601 uvc_error_t uvc_get_power_line_frequency(uvc_device_handle_t *devh, uint8_t* power_line_frequency, enum uvc_req_code req_code);
602 uvc_error_t uvc_set_power_line_frequency(uvc_device_handle_t *devh, uint8_t power_line_frequency);
603 
604 uvc_error_t uvc_get_hue(uvc_device_handle_t *devh, int16_t* hue, enum uvc_req_code req_code);
605 uvc_error_t uvc_set_hue(uvc_device_handle_t *devh, int16_t hue);
606 
607 uvc_error_t uvc_get_hue_auto(uvc_device_handle_t *devh, uint8_t* hue_auto, enum uvc_req_code req_code);
608 uvc_error_t uvc_set_hue_auto(uvc_device_handle_t *devh, uint8_t hue_auto);
609 
610 uvc_error_t uvc_get_saturation(uvc_device_handle_t *devh, uint16_t* saturation, enum uvc_req_code req_code);
611 uvc_error_t uvc_set_saturation(uvc_device_handle_t *devh, uint16_t saturation);
612 
613 uvc_error_t uvc_get_sharpness(uvc_device_handle_t *devh, uint16_t* sharpness, enum uvc_req_code req_code);
614 uvc_error_t uvc_set_sharpness(uvc_device_handle_t *devh, uint16_t sharpness);
615 
616 uvc_error_t uvc_get_gamma(uvc_device_handle_t *devh, uint16_t* gamma, enum uvc_req_code req_code);
617 uvc_error_t uvc_set_gamma(uvc_device_handle_t *devh, uint16_t gamma);
618 
619 uvc_error_t uvc_get_white_balance_temperature(uvc_device_handle_t *devh, uint16_t* temperature, enum uvc_req_code req_code);
621 
622 uvc_error_t uvc_get_white_balance_temperature_auto(uvc_device_handle_t *devh, uint8_t* temperature_auto, enum uvc_req_code req_code);
624 
625 uvc_error_t uvc_get_white_balance_component(uvc_device_handle_t *devh, uint16_t* blue, uint16_t* red, enum uvc_req_code req_code);
627 
628 uvc_error_t uvc_get_white_balance_component_auto(uvc_device_handle_t *devh, uint8_t* white_balance_component_auto, enum uvc_req_code req_code);
629 uvc_error_t uvc_set_white_balance_component_auto(uvc_device_handle_t *devh, uint8_t white_balance_component_auto);
630 
631 uvc_error_t uvc_get_digital_multiplier(uvc_device_handle_t *devh, uint16_t* multiplier_step, enum uvc_req_code req_code);
632 uvc_error_t uvc_set_digital_multiplier(uvc_device_handle_t *devh, uint16_t multiplier_step);
633 
634 uvc_error_t uvc_get_digital_multiplier_limit(uvc_device_handle_t *devh, uint16_t* multiplier_step, enum uvc_req_code req_code);
635 uvc_error_t uvc_set_digital_multiplier_limit(uvc_device_handle_t *devh, uint16_t multiplier_step);
636 
637 uvc_error_t uvc_get_analog_video_standard(uvc_device_handle_t *devh, uint8_t* video_standard, enum uvc_req_code req_code);
638 uvc_error_t uvc_set_analog_video_standard(uvc_device_handle_t *devh, uint8_t video_standard);
639 
642 
643 uvc_error_t uvc_get_input_select(uvc_device_handle_t *devh, uint8_t* selector, enum uvc_req_code req_code);
644 uvc_error_t uvc_set_input_select(uvc_device_handle_t *devh, uint8_t selector);
645 /* end AUTO-GENERATED control accessors */
646 
647 void uvc_perror(uvc_error_t err, const char *msg);
648 const char* uvc_strerror(uvc_error_t err);
649 void uvc_print_diag(uvc_device_handle_t *devh, FILE *stream);
651 
652 uvc_frame_t *uvc_allocate_frame(size_t data_bytes);
653 void uvc_free_frame(uvc_frame_t *frame);
654 
656 
657 #ifdef __cplusplus
658 }
659 #endif
660 
661 #endif // !def(LIBUVC_H)
662 
void uvc_ref_device(uvc_device_t *dev)
Increment the reference count for a device.
Definition: dev.c:747
uint16_t wOcularFocalLength
Definition: libuvc.h:287
uvc_vs_desc_subtype
Definition: libuvc.h:55
const uvc_input_terminal_t * uvc_get_input_terminals(uvc_device_handle_t *devh)
Get input terminal descriptors for the open device.
Definition: dev.c:698
uvc_error_t uvc_open(uvc_device_t *dev, uvc_device_handle_t **devh)
Open a UVC device, defaulting to the first interface found.
Definition: dev.c:200
uvc_error_t uvc_set_focus_rel(uvc_device_handle_t *devh, int8_t focus_rel, uint8_t speed)
const uvc_extension_unit_t * uvc_get_extension_units(uvc_device_handle_t *devh)
Get extension unit descriptors for the open device.
Definition: dev.c:737
uint16_t wObjectiveFocalLengthMin
Definition: libuvc.h:285
uint8_t bUnitID
Definition: libuvc.h:312
uvc_error_t uvc_get_white_balance_temperature(uvc_device_handle_t *devh, uint16_t *temperature, enum uvc_req_code req_code)
uvc_req_code
Definition: libuvc.h:152
uvc_error_t uvc_set_saturation(uvc_device_handle_t *devh, uint16_t saturation)
uvc_et_type
Definition: libuvc.h:239
uvc_error_t uvc_find_device(uvc_context_t *ctx, uvc_device_t **dev, int vid, int pid, const char *sn)
Finds a camera identified by vendor, product and/or serial number.
Definition: dev.c:126
uvc_error_t uvc_init(uvc_context_t **ctx, struct libusb_context *usb_ctx)
Initializes the UVC context.
uvc_error_t uvc_set_hue_auto(uvc_device_handle_t *devh, uint8_t hue_auto)
uvc_error_t uvc_get_device_list(uvc_context_t *ctx, uvc_device_t ***list)
Get a list of the UVC devices attached to the system.
Definition: dev.c:532
uvc_error_t uvc_set_gain(uvc_device_handle_t *devh, uint16_t gain)
uint8_t bSourceID
Definition: libuvc.h:303
enum uvc_error uvc_error_t
uvc_error_t uvc_start_iso_streaming(uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uvc_frame_callback_t *cb, void *user_ptr)
uvc_error_t uvc_get_digital_window(uvc_device_handle_t *devh, uint16_t *window_top, uint16_t *window_left, uint16_t *window_bottom, uint16_t *window_right, uint16_t *num_steps, uint16_t *num_steps_units, enum uvc_req_code req_code)
uvc_error_t uvc_get_scanning_mode(uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
size_t data_bytes
Definition: libuvc.h:368
enum uvc_it_type wTerminalType
Definition: libuvc.h:284
int uvc_set_ctrl(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len)
Perform a SET_CUR request to a terminal or unit.
Definition: ctrl.c:113
const char * manufacturer
Definition: libuvc.h:356
uvc_error_t uvc_stream_ctrl(uvc_stream_handle_t *strmh, uvc_stream_ctrl_t *ctrl)
Reconfigure stream with a new stream format.This may be executed whether or not the stream is running...
Definition: stream.c:190
uvc_error_t uvc_get_gamma(uvc_device_handle_t *devh, uint16_t *gamma, enum uvc_req_code req_code)
uvc_error_t uvc_set_contrast_auto(uvc_device_handle_t *devh, uint8_t contrast_auto)
uint16_t wWidth
Definition: libuvc.h:90
GLint GLint GLsizei GLsizei height
Definition: glext.h:112
uint32_t * intervals
Definition: libuvc.h:112
uvc_error_t uvc_get_exposure_abs(uvc_device_handle_t *devh, uint32_t *time, enum uvc_req_code req_code)
uvc_error_t uvc_set_iris_abs(uvc_device_handle_t *devh, uint16_t iris)
uvc_error_t uvc_get_backlight_compensation(uvc_device_handle_t *devh, uint16_t *backlight_compensation, enum uvc_req_code req_code)
uvc_error_t uvc_duplicate_frame(uvc_frame_t *in, uvc_frame_t *out)
Duplicate a frame, preserving color format.
Definition: frame.c:109
void uvc_stop_streaming(uvc_device_handle_t *devh)
Stop streaming videoCloses all streams, ends threads and cancels pollers.
Definition: stream.c:1043
uint8_t guidExtensionCode[16]
Definition: libuvc.h:314
uvc_device_t * uvc_get_device(uvc_device_handle_t *devh)
Get the uvc_device_t corresponding to an open device.
Definition: dev.c:668
uvc_error_t uvc_stream_start(uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr, uint8_t flags, int num_transfer_buffers)
Definition: stream.c:704
uvc_error_t uvc_get_pantilt_rel(uvc_device_handle_t *devh, int8_t *pan_rel, uint8_t *pan_speed, int8_t *tilt_rel, uint8_t *tilt_speed, enum uvc_req_code req_code)
const uvc_output_terminal_t * uvc_get_output_terminals(uvc_device_handle_t *devh)
Get output terminal descriptors for the open device.
Definition: dev.c:711
uvc_error_t uvc_set_white_balance_component(uvc_device_handle_t *devh, uint16_t blue, uint16_t red)
void uvc_print_diag(uvc_device_handle_t *devh, FILE *stream)
Print camera capabilities and configuration.
Definition: diag.c:143
uvc_error_t uvc_start_streaming(uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uvc_frame_callback_t *cb, void *user_ptr, uint8_t flags, int num_transfer_buffers)
Definition: stream.c:581
uint16_t wHeight
Definition: libuvc.h:92
struct uvc_processing_unit * prev
Definition: libuvc.h:299
uvc_error_t uvc_get_white_balance_component_auto(uvc_device_handle_t *devh, uint8_t *white_balance_component_auto, enum uvc_req_code req_code)
const char * serialNumber
Definition: libuvc.h:354
uvc_error_t uvc_get_sharpness(uvc_device_handle_t *devh, uint16_t *sharpness, enum uvc_req_code req_code)
uvc_error_t uvc_get_pantilt_abs(uvc_device_handle_t *devh, int32_t *pan, int32_t *tilt, enum uvc_req_code req_code)
uint16_t idProduct
Definition: libuvc.h:350
uvc_error_t uvc_set_sharpness(uvc_device_handle_t *devh, uint16_t sharpness)
uvc_error_t uvc_get_gain(uvc_device_handle_t *devh, uint16_t *gain, enum uvc_req_code req_code)
uint8_t bMaxVersion
Definition: libuvc.h:417
uvc_error_t uvc_stream_get_frame(uvc_stream_handle_t *strmh, uvc_frame_t **frame, int32_t timeout_us)
Definition: stream.c:977
struct uvc_format_desc * prev
Definition: libuvc.h:122
struct uvc_device uvc_device_t
Definition: libuvc.h:260
uvc_error_t uvc_get_contrast_auto(uvc_device_handle_t *devh, uint8_t *contrast_auto, enum uvc_req_code req_code)
struct uvc_frame_desc * prev
Definition: libuvc.h:83
const char * product
Definition: libuvc.h:358
struct uvc_output_terminal * prev
Definition: libuvc.h:293
uvc_error_t uvc_get_focus_rel(uvc_device_handle_t *devh, int8_t *focus_rel, uint8_t *speed, enum uvc_req_code req_code)
uvc_error_t uvc_probe_stream_ctrl(uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl)
Definition: stream.c:349
uvc_error_t uvc_get_ae_mode(uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
uint32_t height
Definition: libuvc.h:372
struct uvc_input_terminal * prev
Definition: libuvc.h:280
void uvc_free_device_list(uvc_device_t **list, uint8_t unref_devices)
Frees a list of device structures created with uvc_get_device_list.
Definition: dev.c:643
struct uvc_output_terminal uvc_output_terminal_t
GLbyte GLbyte blue
Definition: glext.h:379
uvc_device_power_mode
Definition: libuvc.h:164
GLbitfield flags
Definition: glext.h:1478
GLuint GLuint stream
Definition: glext.h:1774
struct uvc_processing_unit uvc_processing_unit_t
uvc_error_t uvc_set_zoom_rel(uvc_device_handle_t *devh, int8_t zoom_rel, uint8_t digital_zoom, uint8_t speed)
void uvc_free_device_descriptor(uvc_device_descriptor_t *desc)
Frees a device descriptor created with uvc_get_device_descriptor.
Definition: dev.c:504
uint32_t dwMinBitRate
Definition: libuvc.h:94
uvc_error_t uvc_set_digital_multiplier_limit(uvc_device_handle_t *devh, uint16_t multiplier_step)
uvc_frame_t * uvc_allocate_frame(size_t data_bytes)
Allocate a frame structure.
Definition: frame.c:64
uvc_error_t uvc_get_power_mode(uvc_device_handle_t *devh, enum uvc_device_power_mode *mode, enum uvc_req_code req_code)
Definition: ctrl.c:125
uint32_t dwFrameIntervalStep
Definition: libuvc.h:106
struct uvc_format_desc * parent
Definition: libuvc.h:82
uint16_t wObjectiveFocalLengthMax
Definition: libuvc.h:286
uint32_t dwMaxVideoFrameBufferSize
Definition: libuvc.h:98
uvc_error_t uvc_set_roll_abs(uvc_device_handle_t *devh, int16_t roll)
void( uvc_status_callback_t)(enum uvc_status_class status_class, int event, int selector, enum uvc_status_attribute status_attribute, void *data, size_t data_len, void *user_ptr)
Definition: libuvc.h:335
uvc_error_t uvc_set_privacy(uvc_device_handle_t *devh, uint8_t privacy)
uint8_t library_owns_data
Definition: libuvc.h:390
GLenum GLsizei len
Definition: glext.h:3213
uint8_t bInterfaceNumber
Definition: libuvc.h:418
struct uvc_format_desc uvc_format_desc_t
uvc_error_t uvc_set_power_line_frequency(uvc_device_handle_t *devh, uint8_t power_line_frequency)
uint8_t bFrameIntervalType
Definition: libuvc.h:108
libusb_device_handle * uvc_get_libusb_handle(uvc_device_handle_t *devh)
Get the underlying libusb device handle for an open deviceThis can be used to access other interfaces...
Definition: dev.c:685
uvc_stream_handle_t * handle
Definition: libuvc.h:419
enum uvc_vs_desc_subtype bDescriptorSubtype
Definition: libuvc.h:85
uint32_t fourcc
Definition: libuvc.h:374
uint8_t bBitsPerPixel
Definition: libuvc.h:136
uvc_status_class
Definition: libuvc.h:319
uint32_t dwMaxPayloadTransferSize
Definition: libuvc.h:412
uvc_error_t uvc_set_digital_roi(uvc_device_handle_t *devh, uint16_t roi_top, uint16_t roi_left, uint16_t roi_bottom, uint16_t roi_right, uint16_t auto_controls)
uvc_error_t uvc_set_pantilt_rel(uvc_device_handle_t *devh, int8_t pan_rel, uint8_t pan_speed, int8_t tilt_rel, uint8_t tilt_speed)
uint32_t width
Definition: libuvc.h:370
uvc_error_t uvc_stream_open_ctrl(uvc_device_handle_t *devh, uvc_stream_handle_t **strmh, uvc_stream_ctrl_t *ctrl)
Definition: stream.c:637
uint32_t dwFrameInterval
Definition: libuvc.h:405
uvc_error_t uvc_set_iris_rel(uvc_device_handle_t *devh, uint8_t iris_rel)
uint8_t bFormatIndex
Definition: libuvc.h:126
struct uvc_stream_ctrl uvc_stream_ctrl_t
uint32_t dwMaxBitRate
Definition: libuvc.h:96
const uvc_format_desc_t * uvc_get_format_descs(uvc_device_handle_t *)
Get format descriptions for the open device.
Definition: dev.c:1614
uint8_t bDefaultFrameIndex
Definition: libuvc.h:141
uvc_error_t uvc_stream_stop(uvc_stream_handle_t *strmh)
Stop stream.Stops stream, ends threads and cancels pollers.
Definition: stream.c:1058
uint32_t dwClockFrequency
Definition: libuvc.h:413
uvc_error_t uvc_get_privacy(uvc_device_handle_t *devh, uint8_t *privacy, enum uvc_req_code req_code)
void uvc_perror(uvc_error_t err, const char *msg)
Print a message explaining an error in the UVC driver.
Definition: diag.c:73
uvc_it_type
Definition: libuvc.h:225
uvc_pu_ctrl_selector
Definition: libuvc.h:195
const char * uvc_strerror(uvc_error_t err)
Return a string explaining an error in the UVC driver.
Definition: diag.c:88
uvc_error_t uvc_get_zoom_abs(uvc_device_handle_t *devh, uint16_t *focal_length, enum uvc_req_code req_code)
uvc_error_t uvc_set_scanning_mode(uvc_device_handle_t *devh, uint8_t mode)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * data
Definition: glext.h:223
void uvc_unref_device(uvc_device_t *dev)
Decrement the reference count for a device device.
Definition: dev.c:763
uvc_error_t uvc_get_focus_auto(uvc_device_handle_t *devh, uint8_t *state, enum uvc_req_code req_code)
uint8_t bAspectRatioY
Definition: libuvc.h:143
uint16_t bmHint
Definition: libuvc.h:402
uvc_error_t uvc_get_white_balance_component(uvc_device_handle_t *devh, uint16_t *blue, uint16_t *red, enum uvc_req_code req_code)
uvc_error_t uvc_get_exposure_rel(uvc_device_handle_t *devh, int8_t *step, enum uvc_req_code req_code)
uvc_error_t uvc_set_contrast(uvc_device_handle_t *devh, uint16_t contrast)
uint8_t bmFramingInfo
Definition: libuvc.h:414
uint16_t wKeyFrameRate
Definition: libuvc.h:406
uint8_t bCopyProtect
Definition: libuvc.h:145
struct uvc_stream_handle uvc_stream_handle_t
Definition: libuvc.h:276
uint8_t uvc_get_bus_number(uvc_device_t *dev)
Get the number of the bus to which the device is attached.
Definition: dev.c:180
struct uvc_frame_desc uvc_frame_desc_t
uvc_error_t uvc_set_zoom_abs(uvc_device_handle_t *devh, uint16_t focal_length)
void uvc_set_status_callback(uvc_device_handle_t *devh, uvc_status_callback_t cb, void *user_ptr)
Set a callback function to receive status updates.
Definition: dev.c:1595
uvc_error_t uvc_get_stream_ctrl_format_size(uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uint32_t fourcc, int width, int height, int fps)
Definition: stream.c:268
auto ctx
uint64_t bmControls
Definition: libuvc.h:316
uvc_error_t uvc_get_contrast(uvc_device_handle_t *devh, uint16_t *contrast, enum uvc_req_code req_code)
GLuint GLuint64EXT * capture_time
Definition: glext.h:10662
uint64_t bmControls
Definition: libuvc.h:305
uvc_error_t uvc_get_focus_abs(uvc_device_handle_t *devh, uint16_t *focus, enum uvc_req_code req_code)
uvc_error_t uvc_set_pantilt_abs(uvc_device_handle_t *devh, int32_t pan, int32_t tilt)
uint16_t wCompWindowSize
Definition: libuvc.h:409
struct uvc_input_terminal uvc_input_terminal_t
uvc_error_t uvc_get_power_line_frequency(uvc_device_handle_t *devh, uint8_t *power_line_frequency, enum uvc_req_code req_code)
uvc_error_t uvc_set_hue(uvc_device_handle_t *devh, int16_t hue)
void uvc_close(uvc_device_handle_t *devh)
Close a device.
Definition: dev.c:1412
GLenum mode
Definition: glext.h:1117
uvc_error_t uvc_get_digital_multiplier_limit(uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
uint8_t bmCapabilities
Definition: libuvc.h:88
struct uvc_frame_desc * next
Definition: libuvc.h:83
uvc_error_t uvc_set_white_balance_temperature_auto(uvc_device_handle_t *devh, uint8_t temperature_auto)
uvc_error_t uvc_get_analog_video_lock_status(uvc_device_handle_t *devh, uint8_t *status, enum uvc_req_code req_code)
uint16_t wPFrameRate
Definition: libuvc.h:407
uvc_error_t uvc_get_analog_video_standard(uvc_device_handle_t *devh, uint8_t *video_standard, enum uvc_req_code req_code)
struct _cl_event * event
Definition: glext.h:2917
typedef void(APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode
uvc_error_t uvc_get_white_balance_temperature_auto(uvc_device_handle_t *devh, uint8_t *temperature_auto, enum uvc_req_code req_code)
struct uvc_device_descriptor uvc_device_descriptor_t
uvc_error_t uvc_set_focus_simple_range(uvc_device_handle_t *devh, uint8_t focus)
uvc_error_t uvc_set_white_balance_temperature(uvc_device_handle_t *devh, uint16_t temperature)
uint32_t dwBytesPerLine
Definition: libuvc.h:110
uint8_t bAspectRatioX
Definition: libuvc.h:142
uvc_device_handle_t * source
Definition: libuvc.h:383
uvc_error_t uvc_set_focus_auto(uvc_device_handle_t *devh, uint8_t state)
uvc_error_t uvc_set_brightness(uvc_device_handle_t *devh, int16_t brightness)
uint32_t dwMaxVideoFrameSize
Definition: libuvc.h:411
struct uvc_frame uvc_frame_t
uvc_error_t uvc_get_roll_abs(uvc_device_handle_t *devh, int16_t *roll, enum uvc_req_code req_code)
uvc_error_t uvc_get_hue(uvc_device_handle_t *devh, int16_t *hue, enum uvc_req_code req_code)
uvc_error_t uvc_get_digital_roi(uvc_device_handle_t *devh, uint16_t *roi_top, uint16_t *roi_left, uint16_t *roi_bottom, uint16_t *roi_right, uint16_t *auto_controls, enum uvc_req_code req_code)
uvc_error_t uvc_get_saturation(uvc_device_handle_t *devh, uint16_t *saturation, enum uvc_req_code req_code)
uint8_t bFrameIndex
Definition: libuvc.h:87
uvc_error_t uvc_open2(uvc_device_t *dev, uvc_device_handle_t **devh, int camera_number)
Open a UVC device, specifying the camera number, zero-based.
Definition: dev.c:215
uint16_t wDelay
Definition: libuvc.h:410
uint32_t sequence
Definition: libuvc.h:378
GLuint in
Definition: glext.h:8313
uvc_error_t uvc_set_white_balance_component_auto(uvc_device_handle_t *devh, uint8_t white_balance_component_auto)
GLint GLint GLsizei width
Definition: glext.h:112
uint8_t uvc_get_device_address(uvc_device_t *dev)
Get the number assigned to the device within its bus.
Definition: dev.c:187
int uvc_get_ctrl(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len, enum uvc_req_code req_code)
Perform a GET_* request from an extension unit.
Definition: ctrl.c:90
uvc_ct_ctrl_selector
Definition: libuvc.h:170
void uvc_print_stream_ctrl(uvc_stream_ctrl_t *ctrl, FILE *stream)
Print the values in a stream control block.
Definition: diag.c:106
struct uvc_context uvc_context_t
Definition: libuvc.h:253
uint64_t bmControls
Definition: libuvc.h:289
uvc_error_t uvc_get_roll_rel(uvc_device_handle_t *devh, int8_t *roll_rel, uint8_t *speed, enum uvc_req_code req_code)
uvc_error_t uvc_get_input_select(uvc_device_handle_t *devh, uint8_t *selector, enum uvc_req_code req_code)
rs_device * dev
uint8_t bFrameIndex
Definition: libuvc.h:404
uint8_t bNumFrameDescriptors
Definition: libuvc.h:127
uvc_error_t uvc_stream_start_iso(uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr)
uvc_error_t uvc_get_brightness(uvc_device_handle_t *devh, int16_t *brightness, enum uvc_req_code req_code)
uvc_error_t uvc_get_iris_rel(uvc_device_handle_t *devh, uint8_t *iris_rel, enum uvc_req_code req_code)
uvc_error_t uvc_set_focus_abs(uvc_device_handle_t *devh, uint16_t focus)
uint8_t bmFlags
Definition: libuvc.h:138
uvc_error_t uvc_get_ae_priority(uvc_device_handle_t *devh, uint8_t *priority, enum uvc_req_code req_code)
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_...
Definition: dev.c:444
uvc_error_t uvc_get_zoom_rel(uvc_device_handle_t *devh, int8_t *zoom_rel, uint8_t *digital_zoom, uint8_t *speed, enum uvc_req_code req_code)
uvc_status_attribute
Definition: libuvc.h:325
void uvc_exit(uvc_context_t *ctx)
Closes the UVC context, shutting down any active cameras.
uvc_error_t uvc_set_exposure_rel(uvc_device_handle_t *devh, int8_t step)
uint8_t bUnitID
Definition: libuvc.h:301
uvc_error_t uvc_set_digital_window(uvc_device_handle_t *devh, uint16_t window_top, uint16_t window_left, uint16_t window_bottom, uint16_t window_right, uint16_t num_steps, uint16_t num_steps_units)
uvc_error_t uvc_set_digital_multiplier(uvc_device_handle_t *devh, uint16_t multiplier_step)
uvc_error_t uvc_set_analog_video_standard(uvc_device_handle_t *devh, uint8_t video_standard)
uvc_error_t uvc_set_exposure_abs(uvc_device_handle_t *devh, uint32_t time)
uvc_error_t uvc_set_gamma(uvc_device_handle_t *devh, uint16_t gamma)
size_t step
Definition: libuvc.h:376
struct uvc_extension_unit * prev
Definition: libuvc.h:310
void uvc_free_frame(uvc_frame_t *frame)
Free a frame structure.
Definition: frame.c:92
uvc_error_t uvc_get_focus_simple_range(uvc_device_handle_t *devh, uint8_t *focus, enum uvc_req_code req_code)
struct uvc_extension_unit uvc_extension_unit_t
struct uvc_device_handle uvc_device_handle_t
Definition: libuvc.h:268
int uvc_get_ctrl_len(uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl)
Get the length of a control on a terminal or unit.
Definition: ctrl.c:59
uint32_t dwMinFrameInterval
Definition: libuvc.h:102
uint16_t wCompQuality
Definition: libuvc.h:408
uint8_t bmInterlaceFlags
Definition: libuvc.h:144
uvc_error_t uvc_set_roll_rel(uvc_device_handle_t *devh, int8_t roll_rel, uint8_t speed)
uvc_error_t uvc_get_iris_abs(uvc_device_handle_t *devh, uint16_t *iris, enum uvc_req_code req_code)
uvc_error_t uvc_get_hue_auto(uvc_device_handle_t *devh, uint8_t *hue_auto, enum uvc_req_code req_code)
uint8_t bMinVersion
Definition: libuvc.h:416
uvc_ot_type
Definition: libuvc.h:232
uint16_t idVendor
Definition: libuvc.h:348
uvc_error_t uvc_set_ae_mode(uvc_device_handle_t *devh, uint8_t mode)
struct uvc_frame_desc * frame_descs
Definition: libuvc.h:148
uvc_error_t uvc_set_ae_priority(uvc_device_handle_t *devh, uint8_t priority)
uint8_t bPreferredVersion
Definition: libuvc.h:415
uvc_error
Definition: libuvc.h:17
uvc_error_t uvc_set_power_mode(uvc_device_handle_t *devh, enum uvc_device_power_mode mode)
Definition: ctrl.c:146
uint8_t bFormatIndex
Definition: libuvc.h:403
uint32_t dwMaxFrameInterval
Definition: libuvc.h:104
uint32_t dwDefaultFrameInterval
Definition: libuvc.h:100
void( uvc_frame_callback_t)(struct uvc_frame *frame, void *user_ptr)
Definition: libuvc.h:396
struct uvc_streaming_interface * parent
Definition: libuvc.h:121
const uvc_processing_unit_t * uvc_get_processing_units(uvc_device_handle_t *devh)
Get processing unit descriptors for the open device.
Definition: dev.c:724
uvc_error_t uvc_get_digital_multiplier(uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
uint8_t bVariableSize
Definition: libuvc.h:146
void uvc_stream_close(uvc_stream_handle_t *strmh)
Close stream.Closes stream, frees handle and all streaming resources.
Definition: stream.c:1137
void * data
Definition: libuvc.h:366
uvc_error_t uvc_set_input_select(uvc_device_handle_t *devh, uint8_t selector)
uvc_term_type
Definition: libuvc.h:219
uint8_t bTerminalID
Definition: libuvc.h:282
uvc_error_t uvc_set_analog_video_lock_status(uvc_device_handle_t *devh, uint8_t status)
uvc_error_t uvc_set_backlight_compensation(uvc_device_handle_t *devh, uint16_t backlight_compensation)


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:17