Switch between 2 different camera v4l2src

Hello, I have a code written in c language that reads and broadcasts signals from a single camera.
I want to make a system where I can switch between 2 cameras, I couldn’t find which methods to use, I would appreciate if you could help, thanks.

Hi,
A possible solution is to link the two cameras to appsink like

v4l2src device=_CAMERA_0_ ! appsink
v4l2src device=_CAMERA_1_ ! appsink

And run a third pipeline starting with appsrc for boradcasting. Here is a sample having one pipeline generating frame and the other two pipelines doing JPEG encoding. It is not same as your use-case but may be a reference:
Starvation (?) of gstreamer threads - #12 by DaneLLL

Please take a look.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.