before i start accessing a /dev/video3 device, i would like to check if there is an actual camera connected to it. How do i do this .
For USB cameras this is easy, as if the camera is disconnected it won’t have a device
for cameras connected to an analog->MIPI capture boards it is a bit more difficult as there are always 4 devices /dev/video…/dev/video3 … however not all (or none for that matter) may have an analog camera attached to it.
does anyone have a tip on what to check ?
nvidia@localhost:~$ v4l2-ctl --list-devices vi-output, tp2850 0-0001 (platform:15700000.vi:0): /dev/video0 vi-output, tp2850 0-0002 (platform:15700000.vi:2): /dev/video1 vi-output, tp2850 1-0003 (platform:15700000.vi:3): /dev/video2 vi-output, tp2850 1-0004 (platform:15700000.vi:4): /dev/video3
also always shows 4 devices… no matter what is actually connected