diff --git a/src/xrt/drivers/v4l2/v4l2_driver.c b/src/xrt/drivers/v4l2/v4l2_driver.c index 766b26478..ac736a416 100644 --- a/src/xrt/drivers/v4l2/v4l2_driver.c +++ b/src/xrt/drivers/v4l2/v4l2_driver.c @@ -157,8 +157,6 @@ struct v4l2_fs bool is_running; bool print_spew; bool print_debug; - - char card[521]; }; /*! @@ -317,7 +315,7 @@ v4l2_query_cap_and_validate(struct v4l2_fs *vid) * Find quirks */ char *card = (char *)cap.card; - snprintf(vid->card, sizeof(vid->card), "%s", card); + snprintf(vid->base.name, sizeof(vid->base.name), "%s", card); vid->quirks.ps4_cam = strcmp(card, "USB Camera-OV580: USB Camera-OV") == 0; @@ -793,7 +791,7 @@ v4l2_fs_create(struct xrt_frame_context *xfctx, const char *path) // Start the variable tracking after we know what device we have. // clang-format off u_var_add_root(vid, "V4L2 Frameserver", true); - u_var_add_ro_text(vid, vid->card, "Card"); + u_var_add_ro_text(vid, vid->base.name, "Card"); u_var_add_bool(vid, &vid->print_debug, "Debug"); u_var_add_bool(vid, &vid->print_spew, "Spew"); for (size_t i = 0; i < vid->num_states; i++) { diff --git a/src/xrt/include/xrt/xrt_frameserver.h b/src/xrt/include/xrt/xrt_frameserver.h index d48944a9f..3af4f3917 100644 --- a/src/xrt/include/xrt/xrt_frameserver.h +++ b/src/xrt/include/xrt/xrt_frameserver.h @@ -50,6 +50,11 @@ struct xrt_fs_mode */ struct xrt_fs { + /*! + * Name of the frame server source. + */ + char name[512]; + /*! * All frames produced by this frameserver is tagged with this id. */