[Live-devel] recommended way of running two instances of RTSPServer in a single process

Ross Finlayson finlayson at live555.com
Thu Jul 14 11:34:39 PDT 2016


> I'd like to have a single process expose two separate RTSP addresses: 
> 
> rtsp://<myip>:<myport1>/endpoint1
> rtsp://<myip>:<myport2>/endpoint2
> 
> ...as opposed to having multiple video subsessions from one server media session, I'd like two separate servers on different port numbers, etc. For management (for us, anyway), it'll be easier if it's hosted in a single process. 

A “RTSPServer” can have several “ServerMediaSession” objects (each, of course, with a different “streamName”).  In this case, there’s a single RTSP server, with a single RTSP server port number - but multiple possible RTSP streams, each with a different name,

Alternatively, if you want to use different RTSP port numbers (although I’m not sure why you would want this), you could create multiple “RTSPServer” objects (each with a different RTSP server port number).

In each case, you can use the same “TaskScheduler” and “UsageEnvironment” objects.  (The only time you need to use multiple "TaskScheduler” and “UsageEnvironment” objects is if you have multiple threads within a single process.)

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list