The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/v4l2: Expose more information

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
bd257500 fa274863

+19 -3
+1
doc/changes/drivers/mr.665.1.md
··· 1 + v4l2: Expose more information through new fields in XRT interface.
+9 -1
src/xrt/drivers/v4l2/v4l2_driver.c
··· 740 740 } 741 741 742 742 struct xrt_fs * 743 - v4l2_fs_create(struct xrt_frame_context *xfctx, const char *path) 743 + v4l2_fs_create(struct xrt_frame_context *xfctx, 744 + const char *path, 745 + const char *product, 746 + const char *manufacturer, 747 + const char *serial) 744 748 { 745 749 struct v4l2_fs *vid = U_TYPED_CALLOC(struct v4l2_fs); 746 750 vid->base.enumerate_modes = v4l2_fs_enumerate_modes; ··· 752 756 vid->node.destroy = v4l2_fs_node_destroy; 753 757 vid->ll = debug_get_log_option_v4l2_log(); 754 758 vid->fd = -1; 759 + 760 + snprintf(vid->base.product, sizeof(vid->base.product), "%s", product); 761 + snprintf(vid->base.manufacturer, sizeof(vid->base.manufacturer), "%s", manufacturer); 762 + snprintf(vid->base.serial, sizeof(vid->base.serial), "%s", serial); 755 763 756 764 int fd = open(path, O_RDWR, 0); 757 765 if (fd < 0) {
+7 -1
src/xrt/drivers/v4l2/v4l2_interface.h
··· 58 58 uint32_t rate; 59 59 }; 60 60 61 + 62 + 61 63 /*! 62 64 * Create a v4l2 frameserver 63 65 * 64 66 * @ingroup drv_v4l2 65 67 */ 66 68 struct xrt_fs * 67 - v4l2_fs_create(struct xrt_frame_context *xfctx, const char *path); 69 + v4l2_fs_create(struct xrt_frame_context *xfctx, 70 + const char *path, 71 + const char *product, 72 + const char *manufacturer, 73 + const char *serial); 68 74 69 75 70 76 #ifdef __cplusplus
+2 -1
src/xrt/state_trackers/prober/p_prober.c
··· 758 758 return -1; 759 759 } 760 760 761 - struct xrt_fs *xfs = v4l2_fs_create(xfctx, pdev->v4ls[0].path); 761 + struct xrt_fs *xfs = 762 + v4l2_fs_create(xfctx, pdev->v4ls[0].path, pdev->usb.product, pdev->usb.manufacturer, pdev->usb.serial); 762 763 if (xfs == NULL) { 763 764 return -1; 764 765 }