<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><base href="x-msg://805/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; 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-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Can you please provide some insight as to the frames generated by MPEG4GenericRTPSource so that we can have an idea of how to restream the AAC audio.</div></div></div></blockquote><div><br></div></div>The frames are simply AAC audio frames, delivered one at a time.<div><br></div><div>However, to decode (or restream) these frames, you also need extra 'configuration' information. This is carried 'out of band' in the stream's SDP description (that the client received in response to its initial RTSP "DESCRIBE" command). You can get this information by calling the following functions on the stream's "MediaSubsession" object:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MediaSubsession::fmtp_mode()</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>This will return a string like "AAC-hbr" - describing which particular AAC 'mode' this audio stream is</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MediaSubsession::fmtp_config()</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>This returns a string that contains 'configuration' information. Depending upon your decoder, you can pass this string to your decoder 'as is', or you can translate it into binary form by calling our function "parseGeneralConfigStr()". However, for restreaming the frames, the configuration information stays in string form (see below).</div><div><br></div><div>To restream these frames, you need to create a "MPEG4GenericRTPSink" object, as follows:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>RTPSink* audioRTPSink = MPEG4GenericRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadType, mediaSubsession->rtpTimestampFrequency(),</div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"audio", mediaSubsession->fmtp_mode(),</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>mediaSubsession->fmtp_config(), mediaSubsession->numChannels());</div></div><div>and, as always, an associated "RTCPInstance" object (to implement RTCP).</div><div><br></div><div>You can then do the restreaming by calling "startPlaying()" on this "MPEG4GenericRTPSink", taking its input from "mediaSubsession->readSource()" - i.e.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>audioRTPSink->startPlaying(*(mediaSubsession->readSource()), <etc>);</div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 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; 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>