[Live-devel] Query regarding turnOnBackgroundReadHandling()

venugopalpaikr venugopalpaikr at tataelxsi.co.in
Fri Sep 26 02:16:30 PDT 2008


Thanks Ross

Additionally i also wanted to know as to how the flow will go to the
function
void RTSPServer::incomingConnectionHandler(void* instance, int /*mask*/)
from the function
	  env.taskScheduler().turnOnBackgroundReadHandling(fServerSocket,
        (TaskScheduler::BackgroundHandlerProc*)&incomingConnectionHandler,
                                                    this);
         }

I also went through "onDemandRTSPServer" and found that a server session is
created initially mentioning the streamname. But my requirement is to wait
for an incoming connection and then create a session.
So what i have found out is that after the function
env.taskScheduler().turnOnBackgroundReadHandling()
my flow should go to incomingConnectionHandler() to
incomingConnectionHandler1() where the client object is created.
But am not able to achieve this flow as the control goes back to the main()
function after env.taskScheduler().turnOnBackgroundReadHandling().

Is my approach right? If not then where could be the flaw?

-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com]On Behalf Of Ross Finlayson
Sent: Friday, September 26, 2008 11:18 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Query regarding turnOnBackgroundReadHandling()



>         env.taskScheduler().turnOnBackgroundReadHandling(fServerSocket,
>         (TaskScheduler::BackgroundHandlerProc*)&incomingConnectionHandler,
>                                                    this);
>         }
>
>1. Am building an RTSPServer using RTSPServer.cpp code. So will the above
>function continously read a particular port until it gets a request from
the
>client or do we need to add a while loop anywhere in the code to make it
>read continously?

No, you don't need to modify the existing "RTSPServer" code at all.

>2. OR Do we have to use env.taskScheduler().doEventLoop() to continously
>monitor for requests?

Yes.  Your application (like all applications that use the "LIVE555
Streaming Media" code) must use an event loop.

>  If so wat should the parameter to this function?

"doEventLoop()" need not take a parameter.

See the code for the "testOnDemandRTSPServer" demo application for an
example of RTSP server code.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>

_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


More information about the live-devel mailing list