<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=koi8-r">
<META content="MSHTML 6.00.2800.1561" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello, </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I found that RTP padding is required in some
scenarios, so I added such feature into MultiFramedRTPSink. </FONT></DIV>
<DIV><FONT face=Arial size=2>There are two new functions: </FONT></DIV>
<DIV><FONT face=Arial size=2>void setPaddingBit(); - to set corresponding bit
only (just in case), and </FONT></DIV>
<DIV><FONT face=Arial size=2>void setFramePadding(unsigned numPaddingBytes); -
to set padding bit and advance required number of bytes.</FONT></DIV>
<DIV><FONT face=Arial size=2>I expect the last function to be called from
the doSpecialFrameHandling(...), so t</FONT><FONT face=Arial size=2>o make it
working I slightly changed MultiFramedRTPSink::afterGettingFrame(...).
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the sample code:</FONT></DIV>
<DIV><FONT face=Arial size=2>void SomeRTPSink::doSpecialFrameHandling(unsigned
fragmentationOffset,<BR> unsigned char* frameStart,<BR> unsigned
numBytesInFrame,<BR> struct timeval frameTimestamp,<BR> unsigned
numRemainingBytes) </FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV><FONT face=Arial size=2> //align to some
boundary<BR> unsigned neededPaddingBytes = X; //according to your
need<BR> if (neededPaddingBytes && //requires
alignment<BR> numRemainingBytes == 0 ) //can modify
frame<BR> {<BR> setFramePadding(neededPaddingBytes);<BR> numBytesInFrame
+= neededPaddingBytes; //for future use within this function</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial> //...</FONT><BR></FONT><FONT
face=Arial size=2> }<BR>}<BR></DIV>
<DIV></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I also did a few more changes:</FONT></DIV>
<DIV><FONT face=Arial size=2>- made SimpleRTPSource constuctor protected to
be able to inherit it</FONT></DIV>
<DIV><FONT face=Arial size=2>- made WAVAudioFileServerMediaSubsession methods
and data members protected to be able to inherit it</FONT></DIV>
<DIV><FONT face=Arial size=2>- slightly improved
WAVAudioFileServerMediaSubsession code to make it more robust</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV>If you are interested in such changes, you may find all of them attached. I
hope you find this usefull and correct.</DIV>
<DIV> </DIV>
<DIV>Regards, </DIV>
<DIV>Victor Kozhuhov</DIV></DIV></FONT></BODY></HTML>