Currently I use ls -ltrh /dev/video*
to list all the video devices in the terminal, or cat /sys/class/video4linux/video0/name
to display the name of that video device in terminal. I wonder is there a way to call some api in the C++ to get these information as well? Thanks.
Asked
Active
Viewed 109 times
0

Tim
- 47
- 7
-
1[`/sys` filesystem](https://man7.org/linux/man-pages/man5/sysfs.5.html) is the API. – Maxim Egorushkin Jun 18 '20 at 18:03
-
I guess the call you want is readdir_r – stark Jun 18 '20 at 18:17