<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ross,<div><br></div><div>I followed your advice and start to implement with openRTSP. I need data in buffer and not in file and so i wrote little class to subclass MediaSink:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #ba2da2">class</span> MyMediaSink:<span style="color: #ba2da2">public</span> <span style="color: #703daa">MediaSink</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(186, 45, 162); "><span style="color: #000000"> </span>public<span style="color: #000000">:</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> MyMediaSink(<span style="color: #703daa">UsageEnvironment</span> &env):<span style="color: #703daa">MediaSink</span>(env){<span style="color: #4f8187">buffer</span> = <span style="color: #ba2da2">new</span> <span style="color: #703daa">uint8_t</span>();}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #ba2da2">virtual</span> ~MyMediaSink(){}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(186, 45, 162); "><span style="color: #000000"> </span>protected<span style="color: #000000">:</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #703daa">Boolean</span> continuePlaying(){<span style="color: #008400">/*CODE will come soon*/</span> <span style="color: #ba2da2">return</span> <span style="color: #ba2da2">true</span>;}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(186, 45, 162); "><span style="color: #000000"> </span>private<span style="color: #000000">:</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #703daa">uint8_t</span> *buffer;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">};</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">After that I invoke my Class in setupStreams()-funktion:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(112, 61, 170); "><font class="Apple-style-span" color="#000000"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #ba2da2">void</span> setupStreams()</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(112, 61, 170); "><span style="color: #000000"> </span><span style="color: #ba2da2">static</span><span style="color: #000000"> </span>MediaSubsessionIterator<span style="color: #000000">* setupIter = </span><span style="color: #ba2da2">NULL</span><span style="color: #000000">;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #ba2da2">if</span> (setupIter == <span style="color: #ba2da2">NULL</span>) setupIter = <span style="color: #ba2da2">new</span> <span style="color: #703daa">MediaSubsessionIterator</span>(*<span style="color: #4f8187">session</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #ba2da2">while</span> ((<span style="color: #4f8187">subsession</span> = setupIter-><span style="color: #3d1e81">next</span>()) != <span style="color: #ba2da2">NULL</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 132, 0); "><span style="color: #000000"> </span>// We have another subsession left to set up:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #ba2da2">if</span> (<span style="color: #4f8187">subsession</span>-><span style="color: #3d1e81">clientPortNum</span>() == <span style="color: #252bd8">0</span>) <span style="color: #ba2da2">continue</span>; <span style="color: #008400">// port # was not set</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(49, 89, 94); "><span style="color: #000000"> </span>setupSubsession<span style="color: #000000">(</span><span style="color: #4f8187">subsession</span><span style="color: #000000">, </span><span style="color: #4f8187">streamUsingTCP</span><span style="color: #000000">, </span>continueAfterSETUP<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(49, 89, 94); "><span style="color: #000000">//---------------------</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(79, 129, 135); "><span style="color: #000000"> </span>MyMediaSink<span style="color: #000000"> *ms = </span><span style="color: #ba2da2">new</span><span style="color: #000000"> </span>MyMediaSink<span style="color: #000000">(*</span>env<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> ms-><span style="color: #3d1e81">startPlaying</span>(*(<span style="color: #4f8187">subsession</span>-><span style="color: #3d1e81">readSource</span>()), <span style="color: #31595e">subsessionAfterPlaying</span>, <span style="color: #4f8187">subsession</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">//--------------------- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #ba2da2"><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #ba2da2"><span class="Apple-tab-span" style="white-space:pre"> </span>return</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> }</div></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">I know there are leaks and the implementation of MyMediaSink is not complete, but I can see that I have the same Problem as with my App.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">Thank you in advance!</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">Dmitrij</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div><div>Am 16.06.2011 um 16:27 schrieb Ross Finlayson:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"> > You already know that "openRTSP -t" - built from the supplied, unmodified source code - works OK on your system. <br></blockquote><blockquote type="cite">I have to correct my statement. Sorry!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I get only first image with:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">./openRTSP -t -F ______Video <a href="rtsp://193.158.57.66:8555/mjpeg">rtsp://193.158.57.66:8555/mjpeg</a><br></blockquote><br>You probably got a very large video file, which contains all JPEG frames, in sequence. A viewer application will likely show only the first JPEG frame - but you probably got all of them.<br><br>You should also have gotten a MPEG audio file, which you should be able to play.<br><br><br><blockquote type="cite">If I wont to write .avi, I find nothing in testProgs directory<br></blockquote><br><br>That's because the "-i" option outputs an AVI-format file to stdout. You'll need to redirect it to a file, i.e.<br><span class="Apple-tab-span" style="white-space:pre"> </span>./openRTSP -i -t > test.avi<br>But, I would not have high expectations about being able to play the resulting file. The "-i" option (AVI file writing) is very unreliable.<br><br>In any case, if you get two large files - audio and video - when you run "openRTSP -t", then it's working OK.<br>-- <br><br>Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a><br>_______________________________________________<br>live-devel mailing list<br>live-devel@lists.live555.com<br>http://lists.live555.com/mailman/listinfo/live-devel<br></div></blockquote></div><br></div></body></html>