-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enumerate video nodes by name #11319
Conversation
[ADL-P] LRS V4L2 Backend Enumerate video nodes by name [LRS-573] rs-enum.sh: - Create symbolic links for video nodes and for metadata nodes - /dev/video-rs-[<sensor>|<sensor>-md]-[camera-index] - Enable ipu6 link enumeration backend-v4l2.cpp: - scan for rs-enum links Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
src/linux/backend-v4l2.cpp
Outdated
continue; | ||
if (vfd) | ||
::close(vfd); | ||
info = info = get_info_from_mipi_device_path(video_md_path, device_md_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo? info=info=
src/linux/backend-v4l2.cpp
Outdated
@@ -838,11 +879,14 @@ namespace librealsense | |||
{ | |||
info = get_info_from_usb_device_path(video_path, name); | |||
} | |||
else //video4linux devices that are not USB devices | |||
else if(mipi_nodes.empty()) //video4linux devices that are not USB devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and not previously enumerated by rs links
src/linux/backend-v4l2.cpp
Outdated
{ | ||
info = get_info_from_mipi_device_path(video_path, name); | ||
} | ||
|
||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: continue as we already have mipi nodes in uvc_nodes
src/linux/backend-v4l2.cpp
Outdated
@@ -838,11 +879,14 @@ namespace librealsense | |||
{ | |||
info = get_info_from_usb_device_path(video_path, name); | |||
} | |||
else //video4linux devices that are not USB devices | |||
else if(mipi_nodes.empty()) //video4linux devices that are not USB devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change mipi_nodes to mipi_rs_enum_nodes
src/linux/backend-v4l2.cpp
Outdated
typedef std::pair<uvc_device_info,std::string> node_info; | ||
std::vector<node_info> uvc_nodes,uvc_devices; | ||
std::vector<node_info> mipi_nodes; | ||
/* With usage of rs-enum script */ | ||
std::vector<std::string> video_sensors = {"depth", "rgb", "ir", "imu"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change "Rgb" to "color" ?
scripts/rs-enum.sh
Outdated
|
||
declare -A d4xx_vc=([1]=1 [2]=3 [4]=5) | ||
declare -A d4xx_vc_named=([depth]=1 [rgb]=3 ["motion detection"]=5 [imu]=7) | ||
declare -A camera_names=( [depth]=depth [rgb]=rgb ["motion detection"]=ir [imu]=imu ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change rgb to color?
@remibettan and @Nir-Az , please review after changes |
@dmipx please notice the CI error It means that Jetson MIPI crash when questing for devices, please investigate.. |
|
||
// Get metadata node | ||
// Check if file on video_md_path is exists | ||
vfd = open(video_md_path.c_str(), O_RDONLY | O_NONBLOCK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this line before:
vfd = -1;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? no reason to.
rs-enum: add comments, change rgb to color. backend-v4l2: change rgb to color, comments, try/catch for throwing module. Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LRS V4L2 Backend Enumerate video nodes by name [LRS-573] rs-enum.sh: - Create symbolic links for video nodes and for metadata nodes - /dev/video-rs-[|-md]-[camera-index] backend-v4l2.cpp: - scan for rs-enum links Follow-by: IntelRealSense#11319 Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
LRS V4L2 Backend Enumerate video nodes by name [LRS-573] rs-enum.sh: - Create symbolic links for video nodes and for metadata nodes - /dev/video-rs-[|-md]-[camera-index] backend-v4l2.cpp: - scan for rs-enum links Follow-by: IntelRealSense#11319 Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
[ADL-P] LRS V4L2 Backend Enumerate video nodes by name [LRS-573]
rs-enum.sh:
backend-v4l2.cpp:
Signed-off-by: Dmitry Perchanov dmitry.perchanov@intel.com