<div dir="ltr"><div>Ok Ross, thank you for explanations.</div><div><br></div><div>Last question!</div><div>Using the class QuickTimeFileSink, how to access the buffer and the number of bytes captured RTSP.</div><div>DummySink this information are fReceiveBuffer and frameSize. I need access to this data!</div>
<div><br></div><div>Thanks</div><div><br></div><div><div style="color:rgb(80,0,80);font-size:13px;border-collapse:separate;font-family:'courier new',monospace"><font color="#888888"><span style="border-collapse:collapse"><font color="#666666"><span style="border-collapse:separate;font-size:small"><b><span style="font-family:arial,helvetica,sans-serif">Felipe Lemos</span><br>
<br></b></span><i style="font-family:arial,helvetica,sans-serif"><font color="#666666"><span style="border-collapse:collapse"><font color="#666666"><font color="#666666"><font color="#888888">Graduate</font></font></font></span></font><span style="border-collapse:separate;font-size:small"><b><font color="#888888"> </font></b></span><font color="#666666"><font color="#888888">in Computer Science</font></font></i></font></span></font></div>
<div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;border-collapse:separate"><font color="#666666"><i style="font-family:arial,helvetica,sans-serif"><font color="#888888">MSc. in Computer Science<br>
Federal University of Paraíba</font></i><div style="font-family:'courier new',monospace"><font color="#888888"><i style="font-family:arial,helvetica,sans-serif"><font color="#888888">E-mail: felipel at lavid dot ufpb dot br</font></i></font></div>
</font></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/5 Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><div><blockquote type="cite"><div dir="ltr"><span lang="en"><span>I looked at the</span> <span>code</span> <span>openRTSP</span>.<br>
<span>I changed the</span> <span>code</span> <span>of</span> <span>testRTSPClient</span> <span>adding</span> <span>QuickTimeFileSink</span> <span>::</span> <span>createnew</span>.<br>
</span><div><span>But the</span> <span>video</span> <span>does not play</span> <span>generated</span>.</div><div><br></div><div>Code</div><div> </div><div> //scs.subsession->sink = DummySink::createNew(env, *scs.subsession, rtspClient->url()); </div>
<div> qtOut = QuickTimeFileSink::createNew(env, *scs.session, "video.mp4", fileSinkBufferSize, 1280, 720, 25, false, true, true, true);</div><div> qtOut->startPlaying(subsessionAfterPlaying, NULL);</div>
<div><br></div><div> env << *rtspClient << "Created a data sink for the \"" << *scs.subsession << "\" subsession\n";</div><div><br></div><div> /*scs.subsession->miscPtr = rtspClient; </div>
<div> scs.subsession->sink->startPlaying(*(scs.subsession->readSource()),</div><div> subsessionAfterPlaying, scs.subsession);*/</div><div><br></div><div> if (scs.subsession->rtcpInstance() != NULL) {</div>
<div> scs.subsession->rtcpInstance()->setByeHandler(subsessionByeHandler, scs.subsession);</div><div> }</div><div><br></div><div><span lang="en"><br><span>What</span> <span>am I doing wrong?</span><br>
</span></div></div></blockquote><div><br></div></div></div><div>First, because you have already called "qtOut<-startPlaying(...);", you must not also call "scs.subsession->sink->startPlaying(...);".</div>
<div><br></div>Also, one important thing to understand about the "QuickTimeFileSink" class is that - to properly write the output file (including data 'trailers') - your application *must* close it properly - by calling "Medium::close(qtOut);" - when you're done. You cannot just '<control>-c' your application.<div>
<span style="white-space:pre-wrap"> </span>See the "Important note" here: <a href="http://www.live555.com/openRTSP/#quicktime" target="_blank">http://www.live555.com/openRTSP/#quicktime</a></div><div><br></div><div>
If the sender sends RTCP "BYE" packets (for each subsession) when the stream ends, then your application's 'bye handler' should do this automatically. Otherwise, you have to set up a signal handler in your application (as "openRTSP" does), or set up a timer, to close "qtOut" after a certain period of time has elapsed.</div>
<div><br></div><div>I suggest that you first figure out how to get the "openRTSP" application to read your stream - so it will write a proper MP4-format file - and then (and only then) start writing your own application that does the same.</div>
<div class="im"><br><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">Ross Finlayson<br>
Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></div></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>