[Live-devel] Run a method when streaming starts for another client?

Usama Shah usama.shah at gorillabox.net
Tue Aug 18 01:03:15 PDT 2015


Thank you. That worked perfectly. I also had to overwrite createNew(),
constructor and destructor as well to make it work properly.

You should not need to do this (especially if you want support on this
> mailing list).
>
> If you don’t have “reuseFirstSource” set to True in your
> “OnDemandServerMediaSubsession” subclass(es), then a new instance of your
> media source object will be created each time a new client connects.  In
> that case you can simply insert the ‘I frames’ at the start of the data
> that your media source object delivers.
>
> If, however, you have "reuseFirstSource” set to True in your
> “OnDemandServerMediaSubsession” subclass(es) - e.g., because you’re
> streaming from a live source - then things get more complicated (because
> the media source object doesn’t learn directly when the 2nd (and later)
> concurrent client connects to the server).  In that case, you could
> subclass your “RTSPServer”, and reimplement either the
> createNewClientSession()
> virtual function (which gets called after each client’s first “SETUP”
> command), or the
> RTSPClientSession::handleCmd_PLAY()
> virtual function (which gets called each each client’s “PLAY” command).
> <http://lists.live555.com/mailman/listinfo/live-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150818/1e71a56a/attachment.html>


More information about the live-devel mailing list