[Live-devel] Question about Recursive TaskScheduler::doEventLoop Call

Ross Finlayson finlayson at live555.com
Thu Jan 14 09:58:52 PST 2021



> On Jan 12, 2021, at 7:39 PM, Ross Finlayson <finlayson at live555.com> wrote:
> 
> Because your use case seems reasonable, I think the best solution is for us to update the code so that “lookupServerMediaSession()” is an asynchronous operation (taking a ‘callback’ parameter that will get called when the the lookup completes).  This will allow you to do what you want to do (in your “RTSPServer” subclass).  (I’ll send an email to this list when this is done; stay tuned…)

I have now installed a new version (2021.01.14) of the “LIVE555 Streaming Media” code that makes the “lookupServerMediaSession()” function asynchronous.  (This function now includes parameters “completionFunc” and “completionClientData”, see “liveMedia/include/GenericMediaServer.hh”.)

If you want to reimplement this virtual function (e.g., a subclass of “RTSPServer”), you can do so as follows:
	Once you done the lookup, to get a “ServerMediaSession*” pointer (e.g., named “sms”), which might be NULL (if the lookup failed):
		if (completionFunc != NULL) {
			(*completionFunc)(completionClientData, sms);
		}


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




More information about the live-devel mailing list