Hello, <div><br></div><div>I just recently started developing some code to implement a simple RTSP client. </div><div><br></div><div>I have been using the new RTSPClient implementation. (the one with the non blocking sockets)</div>
<div><br></div><div>Below is an excerpt from my code:</div><div><br></div><div><div><br></div><div> <b>rtspclient = RTSPClient::createNew(*env,link,verbosity_level,app_name,tunnel);</b></div><div><b><br></b></div><div><b> *env << "created rtsp client\n";</b></div>
<div><b><br></b></div><div><b> RTSPClient::responseHandler *fun = &printOptions; //printOptions prints the options response to stdout</b></div><div><b> cseq = rtspclient->sendOptionsCommand(fun,NULL);</b></div><div>
<b> *env << "Options Cseq = "<< cseq << "\n";</b></div><div><b><br></b></div><div><b> fun = &printDescribe;//printDescribe prints the sdp description to stdout</b></div><div><b> cseq = rtspclient->sendDescribeCommand(fun,NULL);</b></div>
<div><b> *env << "Describe Cseq = " << cseq << "\n";</b></div><div><b><br></b></div><div><b> env->taskScheduler().doEventLoop(); </b></div><div><br></div><div><br></div><div>Now, I know that the last statement effectively terminates the current thread of execution. However, without this statement, the printOptions and printDescribe functions dont output anything. This would have probably worked fine without the last statement if blocking sockets were used. </div>
<div><br></div><div>Is there a way for the printOptions/Describe functions to be called without using the env->taskScheduler().doEventLoop() statement?</div><div><br></div><div>I tried looking through the UsageEnvironment and TaskScheduler classes, but I'm not as comfortable with C++ as I am with C, so I would really appreciate any help/suggestions I could get. </div>
<div><br></div><div>Thanks,</div><div>Rachit</div></div>