<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Menlo;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-tab-span
{mso-style-name:apple-tab-span;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Some additional information:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I invoke open rtsp with "-i" and "-t" options and uncomment the code where you create and use AviFileSink. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> live-devel-bounces@ns.live555.com [mailto:live-devel-bounces@ns.live555.com] <b>Im Auftrag von </b>Dmitrij Velkin<br><b>Gesendet:</b> Mittwoch, 29. Juni 2011 16:24<br><b>An:</b> LIVE555 Streaming Media - development & use<br><b>Betreff:</b> Re: [Live-devel] RTP over TCP with iPhone<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi Ross,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>class</span><span style='font-size:8.5pt;font-family:"Menlo","serif"'> MyMediaSink:<span style='color:#BA2DA2'>public</span> <span style='color:#703DAA'>MediaSink</span><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>{<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>public</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>:</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'> 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>();}<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'> <span style='color:#BA2DA2'>virtual</span> ~MyMediaSink(){}<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>protected</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>:</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'> <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>;}<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>private</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>:</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'> <span style='color:#703DAA'>uint8_t</span> *buffer;<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>};<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>After that I invoke my Class in setupStreams()-funktion:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>void</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> setupStreams()<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>{<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>static</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#703DAA'>MediaSubsessionIterator</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>* setupIter = </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>NULL</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>;</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#703DAA'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>if</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> (setupIter == </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>NULL</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>) setupIter = </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>new</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#703DAA'>MediaSubsessionIterator</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>(*</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>session</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>);<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>while</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> ((</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>subsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> = setupIter-></span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#3D1E81'>next</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>()) != </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>NULL</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>)<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> {<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#008400'>// We have another subsession left to set up:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>if</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> (</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>subsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>-></span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#3D1E81'>clientPortNum</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>() == </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#252BD8'>0</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>) </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>continue</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>; </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#008400'>// port # was not set</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#31595E'>setupSubsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>(</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>subsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>, </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>streamUsingTCP</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>, </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#31595E'>continueAfterSETUP</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>);</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#31595E'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>//---------------------</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#31595E'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>MyMediaSink</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> *ms = </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>new</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>MyMediaSink</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>(*</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>env</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>);</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> ms-></span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#3D1E81'>startPlaying</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>(*(</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>subsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>-></span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#3D1E81'>readSource</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>()), </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#31595E'>subsessionAfterPlaying</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>, </span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#4F8187'>subsession</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>);<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>//--------------------- <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'> </span></span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:#BA2DA2'>return</span><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'>;<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif";color:black'> }<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>}<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>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.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>Thank you in advance!<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'>Dmitrij<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Menlo","serif"'><o:p> </o:p></span></p></div><div><div><p class=MsoNormal>Am 16.06.2011 um 16:27 schrieb Ross Finlayson:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>> You already know that "openRTSP -t" - built from the supplied, unmodified source code - works OK on your system. <o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>I have to correct my statement. Sorry!<o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><o:p> </o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>I get only first image with:<o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><o:p> </o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>./openRTSP -t -F ______Video <a href="rtsp://193.158.57.66:8555/mjpeg">rtsp://193.158.57.66:8555/mjpeg</a><o:p></o:p></p></blockquote><p class=MsoNormal><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><br><o:p></o:p></p><p class=MsoNormal>If I wont to write .avi, I find nothing in testProgs directory<o:p></o:p></p><p class=MsoNormal><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> </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><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">http://lists.live555.com/mailman/listinfo/live-devel</a><o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>