[Live-devel] audio streaming

Ross Finlayson finlayson at live555.com
Tue Mar 3 17:04:20 PST 2009


>I only see the AAC file server, do we have to write our own code for 
>streaming live AAC? using MPEG4Generic?

To stream live AAC (unicast, on-demand) you would need to write your 
own subclass of "OnDemand ServerMediaSubsession", similar to the 
existing "ADTSAudioFileServerMediaSubsession" class.

In particular, you would need to implement the two virtual functions:
	- "createNewStreamSource()" to create an instance of an 
object that encapsulates your input device.  (This object will 
implement "doGetNextFrame()" by delivering a discrete AAC audio frame 
each time.  If your input device is an open file, and your audio 
frames are fixed-size, then you can just use an instance of 
"ByteStreamFileSource for this.)
	- "createNewRTPSink()".  This will work similar to the 
existing "ADTSAudioFileServerMediaSubsession::createNewRTPSink()", by 
creating a new instance of the "MPEG4GenericRTPSink" class (with 
appropriate parameters to designate AAC audio).

Also, because you are streaming from a live input source, don't 
forget to set "reuseFirstSource" to True.
-- 

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


More information about the live-devel mailing list