<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">We need to broadcast the PCM (S16LE/16000) audio as a separate channel<br class="">with our RTSP-server.<br class=""></div></blockquote>[…]<br class=""><blockquote type="cite" class=""><div class="">What is a preferred RTPSink class that I should use for this audio<br class="">format in our OnDemandServerMediaSubsession?<br class=""></div></blockquote><div><br class=""></div>You should use a “SimpleRTPSink” - specifically:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> SimpleRTPSink::createNew(envir(), rtpGroupsock,<br class=""> rtpPayloadTypeIfDynamic, 16000,<br class=""> "audio", “L16", numChannels);</div><div>where “numChannels” is 1 for mono, and 2 for stereo.</div><div><br class=""></div><div>Note, however, that because your input source is in ‘little-endian’ form (I presume that’s what the “LE” stands for), you will need to byte-swap it before you feed it into your “SimpleRTPSink” (because the IETF standard RTP payload format for the “audio/L16” type specifies that the data be packed into RTP packets in big-endian form.</div><div><br class=""></div><div>Therefore, your implementation of the “createNewStreamSource()” virtual function should feed the input source into a new “EndianSwap16” filter object (and return a pointer to that filter object).</div><br class=""><br class=""><div apple-content-edited="true" class="">
<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; "><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; ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span></span>
</div>
<br class=""></body></html>