[Live-devel] use ServerMediaSubsession for RTP & RTCP streaming
Ross Finlayson
finlayson at live555.com
Tue Jul 15 06:37:52 PDT 2014
> I have some doubts on how to use the OnDemandServerMediaSubsession class. I am actually using it (we defined a very simple extension of it
By "extension of it", I hope you mean "subclass of it". (Generally speaking, if you modify the supplied code, you can't expect support on this mailing list.)
> Now I am trying to achieve is to be able to stream the same source via RTSP (to any client that connects to the rtsp url) and via an static RTP/RTCP session (by static I mean that I want the server to stream to an specific IP and port, passed as a command argument for instance).
OK, it sounds like - for this purpose - you want to use a "PassiveServerMediaSubsession", not an "OnDemandServerMediaSubsession". An "OnDemandServerMediaSubsession" is explicitly intended for streaming, on demand, to a different unicast IP address and port (i.e., different for each requesting client). Therefore that's *not* what you should be using here.
A "PassiveServerMediaSubsession", however, is used for streaming to an IP address (usually multicast, though it can be unicast) and port number that is specified externally (i.e., not by each requesting client). Thus, it sounds like this is what you want.
Note that - when using a "PassiveServerMediaSubsession" - the "RTPSink" and "RTCPInstance" objects are also set up ahead of time (rather than on demand, for each requesting client). There are several examples of this in the code; note the various "test*Streamer.cpp" demo applications in "testProgs".
> At the moment I am using:
>
> subsession->getStreamParameters(...);
>
> subsession->startStream(...);
No, your own code should not be calling these functions at all!
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140715/b9a350bf/attachment.html>
More information about the live-devel
mailing list