<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:"Gill Sans MT";
        panose-1:2 11 5 2 2 1 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {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:72.0pt 72.0pt 72.0pt 72.0pt;}
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=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m fairly new to using Live 555, so apologies if my question is a stupid one, I’ve read through the FAQ and looked for an answer to this through the live-devel mailing list but I’ve so far come up with nothing.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve subclassed Mediasink for use with an Iphone app I’m developing, I’ve based my class on the testRTSPClient.cpp, and have created an Objective-C wrapper class around it.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve added lines to send as much debugging information to the debug console as I can, and I can see that my application sends all of the correct describe, setup and play requests, I can see that the correct replies are returned by my RTSP server device,and  I can also see that my application is receiving frames from the RTSP server, as I’ve inserted the code from the original testRTSPClient.cpp in the afterGettingFrame method that displays information about the size of the received frame size and presentation time, however my video decoding routine had been failing, stating that no frame has been found, I’ve walked my way back through my code and I’ve found that NULL data is being passed into by decoder, tracing it back further I’ve found that when I inspect the contents of my receive buffer(invoked from within continuePlaying() by fSource->getNextFrame(fReceiveBuffer, bufferSize, afterGettingFrame,this, onSourceCloseure, this)) I find that the contents are always listed as “0\000”, even though the debugging info indicates that a valid frame was received.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The main code within my subclass is as follows, I’ve removed all the code that calls my decoder for the moment until I figure out why fReceiveBuffer is always empty: <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>            if (fStreamId != NULL) envir() << "Stream \"" << fStreamId << "\"; ";<o:p></o:p></p><p class=MsoNormal>            envir() << fSubsession.mediumName() << "/" << fSubsession.codecName() << ":\tReceived " << frameSize << " bytes";<o:p></o:p></p><p class=MsoNormal>            if (numTruncatedBytes > 0) envir() << " (with " << numTruncatedBytes << " bytes truncated)";<o:p></o:p></p><p class=MsoNormal>            envir() << "Packet Data:" << fReceiveBuffer;<o:p></o:p></p><p class=MsoNormal>            char uSecsStr[6+1];<o:p></o:p></p><p class=MsoNormal>            sprintf(uSecsStr, "%06u", (unsigned)presentationTime.tv_usec);<o:p></o:p></p><p class=MsoNormal>            envir() << ".\tPresentation time: " << (unsigned)presentationTime.tv_sec << "." << uSecsStr;<o:p></o:p></p><p class=MsoNormal>            if (fSubsession.rtpSource() != NULL && !fSubsession.rtpSource()->hasBeenSynchronizedUsingRTCP()) <o:p></o:p></p><p class=MsoNormal>            {<o:p></o:p></p><p class=MsoNormal>                envir() << "!"; // mark the debugging output to indicate that this presentation time is not RTCP-synchronized<o:p></o:p></p><p class=MsoNormal>            }<o:p></o:p></p><p class=MsoNormal>            envir() << "\n";<o:p></o:p></p><p class=MsoNormal>            continuePlaying();<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>static void afterGettingFrame(void* clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>        RTSPSubsessionMediaSink* sink = (RTSPSubsessionMediaSink*)clientData;<o:p></o:p></p><p class=MsoNormal>        sink->afterGettingFrame(frameSize, numTruncatedBytes, presentationTime, durationInMicroseconds);<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>virtual Boolean continuePlaying()<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal style='text-indent:36.0pt'>if (fSource == NULL) return False <o:p></o:p></p><p class=MsoNormal>                 fSource->getNextFrame(fReceiveBuffer, VMSiOS_MEDIA_SINK_RECEIVE_BUFFER_SIZE, afterGettingFrame, this, onSourceClosure, this);<o:p></o:p></p><p class=MsoNormal>            return True;<o:p></o:p></p><p class=MsoNormal>};<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Have I missed something obvious?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>George Campbell<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>Product Development Manager<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>Visual Management Systems Limited (VMS)</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:gray;mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>0141 763 2690<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>07971 992 459</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'><a href="http://www.vmsuk.com/">www.vmsuk.com</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'><img border=0 width=132 height=26 id="Picture_x0020_1" src="cid:image001.png@01CCE293.F0F9BBB0" alt="Description: titan"><img border=0 width=96 height=29 id="Picture_x0020_2" src="cid:image002.png@01CCE293.F0F9BBB0" alt="Description: vms"></span><span style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:navy;mso-fareast-language:EN-GB'><img border=0 width=132 height=26 id="Picture_x0020_3" src="cid:image003.gif@01CCE293.F0F9BBB0" alt="Description: cid:image003.png@01C923E4.499BC230"></span><span style='font-size:10.0pt;font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:navy;mso-fareast-language:EN-GB'><o:p> </o:p></span></p><p class=MsoNormal><i><span lang=EN-US style='font-family:"Gill Sans MT","sans-serif";color:gray;mso-fareast-language:EN-GB'>Disclaimer:  Nothing in this email shall bind Visual Management Systems Ltd in any contract or obligation unless expressly stated otherwise. This e-mail is for the intended addressee only. If you believe you have received it in error then please delete it and notify the sender by return e-mail. In case of doubt about the correctness or completeness of this e-mail please contact the sender. Visual Management Systems Ltd make every effort to virus check any files available for downloading on their website or sent as attachments via email. Visual Management Systems Ltd accept no responsibility whatsoever for any loss or damage that may arise from the receipt of such material. We therefore recommend that all recipients check all received material with their own virus check software.</span></i><span style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:navy;mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>