[Live-devel] problems moving to asynchronous rtsp interface

Ross Finlayson finlayson at live555.com
Sat Nov 26 13:22:57 PST 2011


> Threads != instances???. Don’t I still need a way of keeping all the instance data separate? How does the callback allow me to differentiate between different instances (other than just the RTSPClient* itself?

Once again, I don't understand.  What's an "instance".  Your "RTSPClient" subclass can contain whatever fields you like.  The "RTSPClient*" pointer that you get in each of your response handler callbacks will be the same "RTSPClient*" on which you made the request; it should be able to (unambigously) give you all the state that you need.

And no, don't "lie" to the interface (at least, not if you expect help on this mailing list).

And yes, of course the "RTSPClient*" is used internally.

Once again - if you (e.g.) call
	fooClient->sendOptionsCommand(continueAfterOPTIONS, ourAuthenticator);
Then, when the "continueAfterOPTIONS()" response handler later gets called, its first parameter will be "fooClient" - i.e., a pointer to the same "RTSPClient" object on which you made the request.

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/20111126/0c7cc1de/attachment.html>


More information about the live-devel mailing list