<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16443"></HEAD>
<BODY>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>Hello
Ross,</FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>could you suggest
anything in the following problem:</FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>I'm using slightly
modified live555MediaServer to deliver h264 stream to the client. It looks like
4 bytes constantly missed and I-frames is mostly not
delivered:</FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>On the server side
(frame size, <FONT size=2>fMaxSize, not-fit bytes)</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>Delivered 7226
(150000) bytes. Left 0 bytes<BR>Delivered 7244 (142774) bytes.
Left 0 bytes<BR>Delivered 7001 (135530) bytes.
Left 0 bytes<BR>Delivered 7079 (128529) bytes.
Left 0 bytes<BR>Delivered 7033 (121450) bytes.
Left 0 bytes<BR>Delivered 7097 (114417) bytes.
Left 0 bytes<BR>Delivered 61350 (107320) bytes.
Left 0 byte << I-frame<BR>Delivered 9784 (45970)
bytes. Left 0 bytes<BR>Delivered 8937 (36186) bytes.
Left 0 bytes<BR>Delivered 8258 (27249) bytes.
Left 0 bytes<BR>Delivered 7798 (18991) bytes.
Left 0 bytes<BR>Delivered 7664 (11193) bytes.
Left 0 bytes<BR>Delivered 3529 (3529) bytes. Left 3819
bytes</FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>On the client
(testRTSPClient with increased <FONT size=2>DUMMY_SINK_RECEIVE_BUFFER_SIZE and
<FONT size=2>OutPacketBuffer::maxSize to 1MB):</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=338401411-25052012><FONT size=2 face=Arial>Received 7222
bytes. Presentation time: 1337944307.315058!<BR>Received 7240
bytes. Presentation time: 1337944307.355058!<BR>Received 6997
bytes. Presentation time: 1337944307.395058!<BR>Received 7075
bytes. Presentation time: 1337944307.435058!<BR>Received 7029
bytes. Presentation time: 1337944307.475058!<BR>Received 7093
bytes. Presentation time: 1337944307.515058!<BR>Received 20
bytes. Presentation time:
1337944307.555058! << Oops, where is my key frame?<BR>Received
4 bytes. Presentation time:
1337944307.555058!<BR>Received 9780 bytes. Presentation time:
1337944307.595058!<BR>Received 8933 bytes. Presentation time:
1337944307.635058!<BR>Received 8254 bytes. Presentation time:
1337944307.675058!<BR>Received 7794 bytes. Presentation time:
1337944307.715058!<BR>Received 7660 bytes. Presentation time:
1337944307.755058!<BR>Received 7344 bytes. Presentation time:
1337944307.795058!<BR></FONT></SPAN><SPAN class=338401411-25052012><FONT size=2
face=Arial></FONT></SPAN></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=338401411-25052012>As I see, the
received size is always less by 4 bytes than the sent one and the I-frame
cames as 20 and 4 bytes... Is there any obvious thing that I missed? Like packet
fragmentation or whatever?</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=338401411-25052012></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=338401411-25052012>My
</SPAN></FONT><FONT size=2 face=Arial><SPAN class=338401411-25052012>void
CQxByteStreamSource::doGetNextFrame() do the following (I already posted this
code here couple of days ago):</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=338401411-25052012><BR> if
(m_nFilled > 0) // Have some (m_nFilled is the
amount of data in the "buffer" we need to transmit to the
client)<BR> {<BR> size_t nToWrite = m_nFilled; // How much
do we need to write?<BR> if (nToWrite > fMaxSize) //
Not too much<BR> nToWrite = fMaxSize;</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=338401411-25052012> memcpy(fTo, m_pBuf, nToWrite); //
Data<BR> fFrameSize = nToWrite; // Update
properties<BR> fNumTruncatedBytes = 0;<BR> if (m_nFilled
> nToWrite) // Move buffer content if
necessary<BR> memmove(m_pBuf, m_pBuf + nToWrite, m_nFilled -
nToWrite);<BR> m_nFilled -= nToWrite; // Decrease
amount of rest bytes</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=338401411-25052012> DiagLog((dbg::LOG_TRACE, 20, __FUNCTION__"
Delivered %4d (%4d) bytes. Left %4d bytes", nToWrite, fMaxSize,
m_nFilled));</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=338401411-25052012> // Go go
go!<BR> nextTask() = envir().taskScheduler().scheduleDelayedTask(0,
(TaskFunc*)FramedSource::afterGetting, this);<BR> return
true;<BR> }<BR> else<BR> return
false;<BR></SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=338401411-25052012>Thanks in
advance,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=338401411-25052012>Nikolai</DIV></SPAN></FONT>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV align=left><FONT face="Courier New"><FONT
size=2>_________________________________________________________<FONT
face="Times New Roman"><BR></FONT></FONT></FONT><FONT face="Courier New"><FONT
size=2>Nikolai Vorontsov</FONT><BR><FONT size=2>Quadrox nv</FONT></FONT><FONT
face="Times New Roman"><BR></FONT><FONT size=2
face="Courier New">Duigemhofstraat 101</FONT><FONT
face="Times New Roman"><BR></FONT><FONT size=2 face="Courier New">3020
HERENT</FONT><FONT face="Times New Roman"><BR></FONT><FONT size=2
face="Courier New">Belgium</FONT><FONT face="Times New Roman"><BR></FONT><FONT
size=2 face="Courier New">Tel: +32</FONT><FONT face="Times New Roman"></FONT>
<FONT size=2 face="Courier New">16582585 </FONT><U><FONT color=#0000ff size=2
face="Courier New"><<A title=mailto:nikolai.vorontsov@quadrox.be
href="mailto:nikolai.vorontsov@quadrox.be">mailto:nikolai.vorontsov@quadrox.be</A>></FONT></U><FONT
face="Times New Roman"><BR></FONT><FONT size=2 face="Courier New">Fax:
+32</FONT><FONT face="Times New Roman"></FONT> <FONT size=2
face="Courier New">16582586 </FONT><U><FONT color=#0000ff size=2
face="Courier New"><<A title=http://www.quadrox.be/
href="http://www.quadrox.be/"
target=_blank>http://www.quadrox.be</A>></FONT></U><FONT
face="Times New Roman"> </FONT></DIV>
<DIV> </DIV></BODY></HTML>