参考:

The Linux USB Video Class (UVC) driverlibrary and sample to access to UVC web camera on non-rooted Android device

《Universal Serial Bus Device Class Definition for Video Devices: H.264 Payload》

Gstreamer测试UVC

设备为 /dev/video1

gst-launch-1.0 --gst-debug-level=3  imxv4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480,framerate=15/1 ! imxvideoconvert_g2d ! imxvideoconvert_ipu ! vpuenc_h264 ! rtph264pay pt=102 ! application/x-rtp ! udpsink host=192.168.1.13 port=5004

gst-launch-1.0 --gst-debug-level=3 v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720,framerate=30/1 ! vpudec ! imxvideoconvert_g2d ! imxvideoconvert_ipu ! vpuenc_h264 ! rtph264pay pt=102 ! application/x-rtp ! udpsink host=192.168.1.13 port=5004


gst-launch-1.0 --gst-debug-level=3 v4l2src device=/dev/video1 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! vpudec  ! overlaysink

gst-launch-1.0 --gst-debug-level=3 v4l2src device=/dev/video1 ! video/x-h264,width=1280,height=720,framerate=30/1 ! rtph264pay pt=102 ! application/x-rtp ! udpsink host=192.168.1.13 port=5004

Extension Unit (XU)接口–IOCTL

XU controls映射到V4L2 controls:

UVCIOC_CTRL_MAP - Map a UVC control to a V4L2 control

查询与设置

UVCIOC_CTRL_QUERY - Query a UVC XU control
具体例子可参考代码:
(https://github.com/MagicPrince666/fpv_tx/blob/8e7ed85401c49be5a63688a60328778e5540f5c1/H264_camera/h264_xu_ctrls.cpp)

(https://github.com/Jin992/robo_vision_mavalink/blob/c10d67cafcd65ac9efbf7bd84b2b117e00764fbf/Video/VideoCapture.cpp)