Server side plugin sample code that gets a camera video stream

Is there server side plugin sample code that gets a camera video stream?

No. Allow me to explain why no: A server side plugin would mean a plugin running in a the XProtect Event Server. It is deliberate design that image retrieval is not open for a plugin in the Event Server. I believe it was made so under consideration to performance and scalability. What is recommended is to build an independent service, it would leave all options open; install with the other XProtect server components, on a dedicated server or distributed like a service in every recording server.