> 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.

The frames are simply AAC audio frames, delivered one at a time.

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:
        MediaSubsession::fmtp_mode()
                This will return a string like "AAC-hbr" - describing which 
particular AAC 'mode' this audio stream is
        MediaSubsession::fmtp_config()
                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).

To restream these frames, you need to create a "MPEG4GenericRTPSink" object, as 
follows:

        RTPSink* audioRTPSink = MPEG4GenericRTPSink::createNew(envir(), 
rtpGroupsock, rtpPayloadType, mediaSubsession->rtpTimestampFrequency(),
                                                                "audio", 
mediaSubsession->fmtp_mode(),
                                                                
mediaSubsession->fmtp_config(), mediaSubsession->numChannels());
and, as always, an associated "RTCPInstance" object (to implement RTCP).

You can then do the restreaming by calling "startPlaying()" on this 
"MPEG4GenericRTPSink", taking its input from "mediaSubsession->readSource()" - 
i.e.
        audioRTPSink->startPlaying(*(mediaSubsession->readSource()), <etc>);

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to