[Live-devel] Streaming live AMR

Ross Finlayson finlayson at live555.com
Sat Mar 28 13:05:42 PDT 2009


>I need to stream live amr data using live-555.
>
>For this i have written a buffer(subclass of FramedSource).

This should be a subclass of "AMRAudioSource", not just "FramedSource".


>I am converting the live raw audio to amr(sample: 8000Hz, bit-rate: 
>12200) using ffmpeg and writing to the buffer.

Also, your class (a subclass of "AMRAudioSource") should properly set 
the fields
	 Boolean fIsWideband;
	unsigned fNumChannels;
	u_int8_t fLastFrameHeader;
which you inherit from "AMRAudioSource".


>I have modified AMRAudioFileServerMediaSubsession to take my buffer 
>as source instead of AMRAudioFileSource.

No, you shouldn't modify the existing code; it works just fine for 
its purpose.  Instead, you should write a *new* class - a subclass of 
"ServerMediaSubsession" - that does what you want.  (It will likely 
copy much of the code from the existing 
"AMRAudioFileServerMediaSubsession" class, which you should not 
change.


>I also modified AMRAudioRTPSink to take my buffer as source instead 
>of AMRAudioSource.

No, you definitely should not modify "AMRAudioRTPSink"; there is 
nothing wrong with it.  Just use this class as is.  (Because your new 
input class is a subclass of "AMRAudioSource", the existing code will 
continue to work.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090328/4b9fb033/attachment.html>


More information about the live-devel mailing list