<html><head><base href="x-msg://3317/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Is there anything in BasicUDPSink (which is created by OnDemandServerMediaSubsession for raw UDP transfer), MPEG2TransportStreamFramer, or ByteStreamFileSource that could somehow be limiting the rate at which the UDP packets are sent under any circumstances?</div></div></div></span></blockquote><div><br></div>Yes. "BasicUDPSink" (and its RTP equivalent) delays after sending each packet, depending upon the "duration" (specifically, "fDurationInMicroseconds") parameter that has been set for the chunk of data that it has just received. If, however, this duration parameter is zero (its default value), then "BasicUDPSink" - after sending out each packet - immediately asks for new data from its upstream object.</div><div><br></div><div>This "duration" parameter is important when you're streaming from a pre-recorded file, because otherwise the file data would be streamed as fast as possible, which is not what you want. (When you're streaming from a file, you want to stream it out at its 'natural rate'.) For Transport Stream data, the "MPEG2TransportStreamFramer" object is used to parse the Tranport Stream data to estimate the "duration" of each chunk of data that gets passed to the "BasicUDPSink" (or an equivalent RTP sink).</div><div><br></div><div>However, because you're streaming from a live input source, you don't need to compute this "duration" parameter. Instead, you can just send out data as soon as it's generated This means that you don't need a "MPEG2TransportStreamFramer"; you can therefore omit this in your implementation of the "createNewStreamSource()" virtual function (in your "OnDemandServerMediaSubsession" subclass).</div><div><br></div><div>Instead, you should set the (normally optional) "preferredFrameSize" parameter to "ByteStreamFileSource::createNew()", to ensure that you read properly-sized chunks of data (a multiple of the 188-byte Transport 'packet' size) each time. (It's likely that your receivers care about this.) I suggest setting this parameter to 7*188 (==1316), to ensure that your outgoing UDP packets (probably) won't get fragmented in the network.</div><div><br></div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>