<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Streaming live
AMR</title></head><body>
<blockquote type="cite" cite>I need to stream live amr data using
live-555.<br>
<br>
For this i have written a buffer(subclass of
FramedSource).</blockquote>
<div><br></div>
<div>This should be a subclass of "AMRAudioSource", not just
"FramedSource".</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite>I am converting the live raw audio to
amr(sample: 8000Hz, bit-rate: 12200) using ffmpeg and writing to the
buffer.</blockquote>
<div><br></div>
<div>Also, your class (a subclass of "AMRAudioSource")
should properly set the fields</div>
<div><x-tab> </x-tab>
Boolean fIsWideband;</div>
<div><x-tab>
</x-tab>unsigned fNumChannels;</div>
<div><x-tab>
</x-tab>u_int8_t fLastFrameHeader;</div>
<div>which you inherit from "AMRAudioSource".</div>
<div> </div>
<div><br></div>
<blockquote type="cite" cite>I have modified<b>
AMRAudioFileServerMediaSubsession</b> to take my buffer as source
instead of AMRAudioFileSource.</blockquote>
<div><br></div>
<div>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.</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite>I also modified<b> AMRAudioRTPSink</b> to
take my buffer as source instead of AMRAudioSource.</blockquote>
<div><br></div>
<div>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.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>