<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] new rtspclient implementation
question</title></head><body>
<blockquote type="cite" cite>I just recently started developing some
code to implement a simple RTSP client.</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>I have been using the new RTSPClient
implementation. (the one with the non blocking sockets)</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Below is an excerpt from my
code:</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite> <b> rtspclient =
RTSPClient::createNew(*env,link,verbosity_level,app_name,tunnel);</b
></blockquote>
<blockquote type="cite" cite><b><br></b></blockquote>
<blockquote type="cite" cite><b> *env << "created
rtsp client\n";</b></blockquote>
<blockquote type="cite" cite><b><br></b></blockquote>
<blockquote type="cite" cite><b> RTSPClient::responseHandler
*fun = &printOptions; //printOptions prints the options response
to stdout</b></blockquote>
<blockquote type="cite" cite><b> cseq =
rtspclient->sendOptionsCommand(fun,NULL);</b></blockquote>
<blockquote type="cite" cite><b> *env << "Options
Cseq = "<< cseq << "\n";</b></blockquote>
<blockquote type="cite" cite><b><br></b></blockquote>
<blockquote type="cite" cite><b> fun =
&printDescribe;//printDescribe prints the sdp description to
stdout</b></blockquote>
<blockquote type="cite" cite><b> cseq =
rtspclient->sendDescribeCommand(fun,NULL);</b></blockquote>
<blockquote type="cite" cite><b> *env << "Describe
Cseq = " << cseq << "\n";</b></blockquote>
<blockquote type="cite" cite><b><br></b></blockquote>
<blockquote type="cite" cite><b>
env->taskScheduler().doEventLoop(); </b></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Now, I know that the last statement
effectively terminates the current thread of execution.</blockquote>
<div><br></div>
<div>No it doesn't - it just moves the "current thread of
execution" into the event loop.</div>
<div><br></div>
<div>And that's exactly what should be happening. The handling
of incoming RTSP responses - and the subsequent calling of the
response handler function for each response - takes place within the
event loop. Note that LIVE555 applications are
event-driven.</div>
<div><br></div>
<div>If you set the "verbosity_level" parameter to 1, you
should see more information about what's happening.</div>
<div><br></div>
<div>I notice, though, that you're trying to send 'pipelined'
requests: I.e., you're sending a "DESCRIBE" command before
you receive a response to the previous "OPTIONS" command.
This is something that RTSP allows, and which our RTSP client software
supports (though it has not been extensively tested yet).
However, it's possible that your server does not support it.</div>
<div><br></div>
<div>So, at least at first, I suggest that you don't try to pipeline
requests. In particular, I suggest that you move the call to
"doEventLoop()" after the call to
"sendOptionsCommand()" (and then move the call to
"sendDescribeCommand()" to the end of the
"printOptions" response handler).</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>