Multiple Video Sink servers at a timer



I was wondering if it was possible to have 2 video sink servers up at one time. I tried to do it, but both severs displayed the same image.

Here is my code:


getServer() with no parameters always returns the server for the first startAutomaticCapture() (the “primary source”), so in your current code, both serverOne and serverTwo are the same object.

There’s a few different ways to fix this. The easiest is to change the second line to call getServer("serve_USB Camera 1") which is the internally generated server name created by the second startAutomaticCapture().

Note by default startAutomaticCapture() calls setSource() for you to the created camera. So you only need to do that if you’re switching the source of the camera later on.


Thank you! I don’t have access to the robot right now, but I will try that as soon as I can.


That worked. Thank you!