<div>It's true that MultiFramedRTPSink class already provide this feature of adding delay. But what we wanted was the optimization over that.</div><div> </div><div>With MultiFramedRTPSink::sendPacketIfNecessary function delay was added before sending packet over the network.</div>
<div>As we are working on live(real time) transmission so what we want is: </div><div>- send the data (media frames) over network as soon as they are available. However scheduleDelayedTask in MultiFramedRTPSink::sendPacketIfNecessary prevents this unless fDurationInMicroseconds = 0</div>
<div>- After sending frame we want RTP to check for new frame (in shared buffer) only when it is expected (else wait in delay queue) i.e. after fDurationInMicroseconds. So we want to shift that scheduleDelayedTask from "sendPacketIfNecessary" to "packFrame"<br>
</div><div>Hence optimization suggested is:</div><div>Shift the scheduleDelayedTask from "sendPacketIfNecessary" to "packFrame" with taskFunction set to GetNextFrame().</div><div> </div><div>With this optimization packets will reach earlier at peer by fDurationInMicroseconds.</div>
<div> </div><div>Regards,</div><div>Ashwani Kathuria<br></div><div class="gmail_quote">On Thu, Jul 7, 2011 at 10:19 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>></span> wrote:<br>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"><u></u>
<div><div><div></div><div class="h5">
<blockquote type="cite">I did some modification in code for live
streaming. Now I want the getNextFrame to be scheduled with a delay
(of frame duration).</blockquote>
<blockquote type="cite">So in function,<b>
MultiFramedRTPSink::packFrame()</b></blockquote>
<blockquote type="cite">What modifications I should do in code in
order to call</blockquote>
<blockquote type="cite"><b>fSource->getNextFrame
function()</b></blockquote>
<blockquote type="cite">using</blockquote>
<blockquote type="cite"><b>envir().taskScheduler().scheduleDelayedTask()</b></blockquote>
<div><br></div>
</div></div><div>Why do you think that you need to modify the supplied library
code? You don't modify the code of other source code libraries
that you use (e.g., "libc"), do you?</div>
<div><br></div>
<div>(This is explained in the FAQ, which also explains why serious
professionals do not use "@<a href="http://gmail.com" target="_blank">gmail.com</a>" email addresses
:-)</div>
<div><br></div>
<div>The duration between each outgoing frame is determined by the
value of "fDurationInMicroseconds" that you set in whatever
upstream object gets fed to your "MultiFramedRTPSink"
subclass. (The "MultiFramedRTPSink" class (as is!)
then works out the appropriate delay between each outgoing
frame.)</div>
<u></u><pre>--
</pre><font color="#888888"><u></u>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></div>
</font></div>
<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" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br>