<!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 &quot;AMRAudioSource&quot;, not just
&quot;FramedSource&quot;.</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 &quot;AMRAudioSource&quot;)
should properly set the fields</div>
<div><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>
Boolean fIsWideband;</div>
<div><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>unsigned fNumChannels;</div>
<div><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>u_int8_t fLastFrameHeader;</div>
<div>which you inherit from &quot;AMRAudioSource&quot;.</div>
<div>&nbsp;</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.&nbsp; Instead, you should write a *new* class - a
subclass of &quot;ServerMediaSubsession&quot; - that does what you
want.&nbsp; (It will likely copy much of the code from the existing
&quot;AMRAudioFileServerMediaSubsession&quot; 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 &quot;AMRAudioRTPSink&quot;;
there is nothing wrong with it.&nbsp; Just use this class as is.&nbsp;
(Because your new input class is a subclass of
&quot;AMRAudioSource&quot;, 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>