- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My device is fx3.
- I tried read UVC header via v4l2(https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-meta-uvc.html)
- The procedure is something like that in librealsense(https://github.com/IntelRealSense/librealsense/blob/master/src/linux/backend-v4l2.h). Open the video capture and meta device synchronously, after streamon, read video capture and meta one by one.
- In my experiment, the meta buffer is zero length as below shown
vidcap, buf: index: 0, byteused: 1843200, length: 1843200, ts: 90818755
meta, buf: index: 0, bytesused: 0, length: 1024, flags: 12000, ts: 90818755
vidcap, buf: index: 1, byteused: 1843200, length: 1843200, ts: 90818787
meta, buf: index: 1, bytesused: 0, length: 1024, flags: 12000, ts: 90818787
vidcap, buf: index: 2, byteused: 1843200, length: 1843200, ts: 90818823
meta, buf: index: 2, bytesused: 0, length: 1024, flags: 12000, ts: 90818823
vidcap, buf: index: 0, byteused: 1843200, length: 1843200, ts: 90818855
meta, buf: index: 0, bytesused: 0, length: 1024, flags: 12000, ts: 90818855
vidcap, buf: index: 1, byteused: 1843200, length: 1843200, ts: 90818891
meta, buf: index: 1, bytesused: 0, length: 1024, flags: 12000, ts: 90818891
vidcap, buf: index: 2, byteused: 1843200, length: 1843200, ts: 90818923
meta, buf: index: 2, bytesused: 0, length: 1024, flags: 12000, ts: 90818923
vidcap, buf: index: 0, byteused: 1843200, length: 1843200, ts: 90818955
meta, buf: index: 0, bytesused: 0, length: 1024, flags: 12000, ts: 90818955
vidcap, buf: index: 1, byteused: 1843200, length: 1843200, ts: 90818991
meta, buf: index: 1, bytesused: 0, length: 1024, flags: 12000, ts: 90818991
vidcap, buf: index: 2, byteused: 1843200, length: 1843200, ts: 90819023
meta, buf: index: 2, bytesused: 0, length: 1024, flags: 12000, ts: 90819023
vidcap, buf: index: 0, byteused: 1843200, length: 1843200, ts: 90819059
meta, buf: index: 0, bytesused: 0, length: 1024, flags: 12000, ts: 90819059
Any suggestions, Thanks in advance.
Regards
Rossi
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Rossi,
As you will be aware that the standard UVC header payload is appended to the start of each buffer. The buffer received can be parsed to get the header length and parse different fields to get the header information.
Similar, implementation is seen here
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know the metadata added to the UVC header from FX3. From the link shared, it looks like Meta data is not the same the UVC header but is in addition to the UVC header.
Kindly refer to V4L2-ctl app to understand how to read the UVC header from the Host app.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank Rashi for your fast reply.
The added UVC header in my test is the "12 bytes standard UVC header" as that in example an75779
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Rossi,
As you will be aware that the standard UVC header payload is appended to the start of each buffer. The buffer received can be parsed to get the header length and parse different fields to get the header information.
Similar, implementation is seen here
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi
As I use the v4l2 interface, it seems impossible to access the raw buffer of the UVC since v4l2 doesn't expose it to me. Do I have to modify the driver like librealsense did?
Regards
Rossi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi
Finally, I find out why there's no buffer read. As the comment in the link you provided above https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_video.c#L1300. the UVC driver does some validations on the SCR data. The an75779 sends constant SCR which violates the validation.
Regards
Rossi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Rossi,
Glad to hear that the link was helpful
Rashi