Functions
dev.c File Reference
#include "libuvc.h"
#include "libuvc_internal.h"
Include dependency graph for dev.c:

Go to the source code of this file.

Functions

void LIBUSB_CALL _uvc_status_callback (struct libusb_transfer *transfer)
 
int uvc_already_open (uvc_context_t *ctx, struct libusb_device *usb_dev)
 
uvc_error_t uvc_claim_if (uvc_device_handle_t *devh, int idx)
 
void uvc_close (uvc_device_handle_t *devh)
 Close a device. More...
 
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. More...
 
void uvc_free_devh (uvc_device_handle_t *devh)
 
void uvc_free_device_descriptor (uvc_device_descriptor_t *desc)
 Frees a device descriptor created with uvc_get_device_descriptor. More...
 
void uvc_free_device_info (uvc_device_info_t *info)
 
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. More...
 
uint8_t uvc_get_bus_number (uvc_device_t *dev)
 Get the number of the bus to which the device is attached. More...
 
uvc_device_tuvc_get_device (uvc_device_handle_t *devh)
 Get the uvc_device_t corresponding to an open device. More...
 
uint8_t uvc_get_device_address (uvc_device_t *dev)
 Get the number assigned to the device within its bus. More...
 
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_descriptor when you're done. More...
 
uvc_error_t uvc_get_device_info (uvc_device_t *dev, uvc_device_info_t **info)
 
uvc_error_t uvc_get_device_info2 (uvc_device_t *dev, uvc_device_info_t **info, int camera_number)
 
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. More...
 
const uvc_extension_unit_tuvc_get_extension_units (uvc_device_handle_t *devh)
 Get extension unit descriptors for the open device. More...
 
const uvc_format_desc_tuvc_get_format_descs (uvc_device_handle_t *devh)
 Get format descriptions for the open device. More...
 
const uvc_input_terminal_tuvc_get_input_terminals (uvc_device_handle_t *devh)
 Get input terminal descriptors for the open device. More...
 
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 on the same device, e.g. a webcam microphone. More...
 
const uvc_output_terminal_tuvc_get_output_terminals (uvc_device_handle_t *devh)
 Get output terminal descriptors for the open device. More...
 
const uvc_processing_unit_tuvc_get_processing_units (uvc_device_handle_t *devh)
 Get processing unit descriptors for the open device. More...
 
size_t uvc_num_devices (uvc_context_t *ctx)
 
uvc_error_t uvc_open (uvc_device_t *dev, uvc_device_handle_t **devh)
 Open a UVC device, defaulting to the first interface found. More...
 
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. More...
 
uvc_error_t uvc_parse_vc (uvc_device_t *dev, uvc_device_info_t *info, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vc_extension_unit (uvc_device_t *dev, uvc_device_info_t *info, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vc_header (uvc_device_t *dev, uvc_device_info_t *info, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vc_input_terminal (uvc_device_t *dev, uvc_device_info_t *info, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vc_processing_unit (uvc_device_t *dev, uvc_device_info_t *info, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs (uvc_device_t *dev, uvc_device_info_t *info, uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_format_mjpeg (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_format_uncompressed (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_frame_format (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_frame_frame (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_frame_uncompressed (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
uvc_error_t uvc_parse_vs_input_header (uvc_streaming_interface_t *stream_if, const unsigned char *block, size_t block_size)
 
void uvc_process_status_xfer (uvc_device_handle_t *devh, struct libusb_transfer *transfer)
 
void uvc_ref_device (uvc_device_t *dev)
 Increment the reference count for a device. More...
 
uvc_error_t uvc_release_if (uvc_device_handle_t *devh, int idx)
 
uvc_error_t uvc_scan_control (uvc_device_t *dev, uvc_device_info_t *info)
 
uvc_error_t uvc_scan_streaming (uvc_device_t *dev, uvc_device_info_t *info, int interface_idx)
 
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. More...
 
void uvc_unref_device (uvc_device_t *dev)
 Decrement the reference count for a device device. More...
 

Function Documentation

void LIBUSB_CALL _uvc_status_callback ( struct libusb_transfer *  transfer)

Definition at line 1564 of file dev.c.

int uvc_already_open ( uvc_context_t ctx,
struct libusb_device *  usb_dev 
)

Definition at line 105 of file dev.c.

uvc_error_t uvc_claim_if ( uvc_device_handle_t devh,
int  idx 
)

Definition at line 782 of file dev.c.

void uvc_free_devh ( uvc_device_handle_t devh)

Definition at line 1390 of file dev.c.

void uvc_free_device_info ( uvc_device_info_t *  info)

Definition at line 381 of file dev.c.

uvc_error_t uvc_get_device_info ( uvc_device_t dev,
uvc_device_info_t **  info 
)

Definition at line 312 of file dev.c.

uvc_error_t uvc_get_device_info2 ( uvc_device_t dev,
uvc_device_info_t **  info,
int  camera_number 
)

Definition at line 328 of file dev.c.

const uvc_extension_unit_t* uvc_get_extension_units ( uvc_device_handle_t devh)

Get extension unit descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 737 of file dev.c.

const uvc_format_desc_t* uvc_get_format_descs ( uvc_device_handle_t devh)

Get format descriptions for the open device.

Note
Do not modify the returned structure.
Parameters
devhDevice handle to an open UVC device

Definition at line 1614 of file dev.c.

const uvc_input_terminal_t* uvc_get_input_terminals ( uvc_device_handle_t devh)

Get input terminal descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 698 of file dev.c.

const uvc_output_terminal_t* uvc_get_output_terminals ( uvc_device_handle_t devh)

Get output terminal descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 711 of file dev.c.

const uvc_processing_unit_t* uvc_get_processing_units ( uvc_device_handle_t devh)

Get processing unit descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 724 of file dev.c.

size_t uvc_num_devices ( uvc_context_t ctx)

Definition at line 1445 of file dev.c.

uvc_error_t uvc_parse_vc ( uvc_device_t dev,
uvc_device_info_t *  info,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1046 of file dev.c.

uvc_error_t uvc_parse_vc_extension_unit ( uvc_device_t dev,
uvc_device_info_t *  info,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1016 of file dev.c.

uvc_error_t uvc_parse_vc_header ( uvc_device_t dev,
uvc_device_info_t *  info,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 914 of file dev.c.

uvc_error_t uvc_parse_vc_input_terminal ( uvc_device_t dev,
uvc_device_info_t *  info,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 956 of file dev.c.

uvc_error_t uvc_parse_vc_processing_unit ( uvc_device_t dev,
uvc_device_info_t *  info,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 991 of file dev.c.

uvc_error_t uvc_parse_vs ( uvc_device_t dev,
uvc_device_info_t *  info,
uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)
Todo:
handle JPEG and maybe still frames or even DV...

Definition at line 1343 of file dev.c.

uvc_error_t uvc_parse_vs_format_mjpeg ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1210 of file dev.c.

uvc_error_t uvc_parse_vs_format_uncompressed ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1150 of file dev.c.

uvc_error_t uvc_parse_vs_frame_format ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1180 of file dev.c.

uvc_error_t uvc_parse_vs_frame_frame ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1239 of file dev.c.

uvc_error_t uvc_parse_vs_frame_uncompressed ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1291 of file dev.c.

uvc_error_t uvc_parse_vs_input_header ( uvc_streaming_interface_t *  stream_if,
const unsigned char *  block,
size_t  block_size 
)

Definition at line 1134 of file dev.c.

void uvc_process_status_xfer ( uvc_device_handle_t devh,
struct libusb_transfer *  transfer 
)

Definition at line 1460 of file dev.c.

uvc_error_t uvc_release_if ( uvc_device_handle_t devh,
int  idx 
)

Definition at line 810 of file dev.c.

uvc_error_t uvc_scan_control ( uvc_device_t dev,
uvc_device_info_t *  info 
)

Definition at line 843 of file dev.c.

uvc_error_t uvc_scan_streaming ( uvc_device_t dev,
uvc_device_info_t *  info,
int  interface_idx 
)

Definition at line 1091 of file dev.c.

void uvc_unref_device ( uvc_device_t dev)

Decrement the reference count for a device device.

Note
If the count reaches zero, the device will be discarded
Parameters
devDevice to unreference

Definition at line 763 of file dev.c.



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