[Live-devel] Detect proxy name before being proccessed

Ross Finlayson finlayson at live555.com
Mon Jun 25 17:14:35 PDT 2012


> So my question is, how can i be able to detect when the proxy has
> finished with it's configuration and added the camera connection
> ProxyServerMediaSubsessions?

First, please add the following - as a public member function - to "liveMedia/include/ProxyServerMediaSession.hh":

	Boolean hasBeenInitialized() const { return fProxyRTSPClient != NULL;	}

(I'll include this addition in the next release of the software.)  This function will let you check whether the proxy's back-end "DESCRIBE" command has completed yet.

Then you'll need to add code like the following to your "lookupServerMediaSession()" implementation, after you've created (or looked up) the "ProxyServerMediaSession" object.  This will 'poll' the "ProxyServerMediaSession" object until its initialization has completed:

while (!proxyServerMediaSession->hasBeenInitialized()) {
	int uSecsToDelay = 100000; // 100 ms (polling interval)
	env->taskScheduler().scheduleDelayedTask(uSecsToDelay, (TaskFunc*)pollProxyServerMediaSession, NULL);

	env->taskScheduler().doEventLoop(&doneFlag);
		// where "doneFlag" is a "char" - initialized to 0
}

Then define "pollProxyServerMediaSession" to be something like:

static void pollProxyServerMediaSession(void* clientData) {
    // Signal the event loop that we're done:
    doneFlag = ~0;
}



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/20120625/651b612c/attachment-0001.html>


More information about the live-devel mailing list