[Live-devel] AMR RTCP Synchronization

Ralf Globisch rglobisch at csir.co.za
Thu Apr 8 07:28:38 PDT 2010


Hi Ross,
We recently added AMR support to our streaming system.
In the system I rely on the RTPSource::hasBeenSynchronizedUsingRTCP
flag to set offsets to the beginning of the stream
and I noticed that this flag never gets set for AMR media unlike when
streaming PCM and mp3, due to the RawAMRRTPSource
overriding hasBeenSynchronizedUsingRTCP, returning fIsSynchronized
which in turn never seems to get set.
I can't see a reason why the RawAMRRTPSource overrides
hasBeenSynchronizedUsingRTCP:

Overridden hasBeenSynchronizedUsingRTCP method:
    Boolean RawAMRRTPSource::hasBeenSynchronizedUsingRTCP() {
      return fIsSynchronized;
    }

   Boolean& RawAMRRTPSource::isSynchronized() { return fIsSynchronized; }

- In AMRDeinterleaver::doGetNextFrame,
AMRDeinterleavingBuffer::retrieveFrame is called passing a reference
to fInputSource->isSynchronized().
    if (fDeinterleavingBuffer->retrieveFrame(fTo, fMaxSize,
                       fFrameSize, fNumTruncatedBytes,
                       fLastFrameHeader, fPresentationTime,
                       fInputSource->isSynchronized()))

- In AMRDeinterleavingBuffer::retrieveFrame, this ref gets set to the
outBin.fIsSynchronized.
    resultIsSynchronized = outBin.fIsSynchronized;

- And in AMRDeinterleavingBuffer::deliverIncomingFrame
    inBin.fIsSynchronized =
((RTPSource*)source)->hasBeenSynchronizedUsingRTCP();
which in turn calls the overridden hasBeenSynchronizedUsingRTCP method.

I removed the overridden method and obtained the desired flag which
seems like a satisfactory solution in our system.
Is this a bug or am I overlooking something?

Regards,
Ralf

FYI, the SDP for the AMR file looks as follows:

v=0
o=- 1270728056462831 1 IN IP4 192.168.56.1
s=AMR Audio, streamed by the LIVE555 Media Server
i=SleepWalk.amr
t=0 0
a=tool:LIVE555 Streaming Media v2010.03.16
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:AMR Audio, streamed by the LIVE555 Media Server
a=x-qt-text-inf:SleepWalk.amr
m=audio 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:10
a=rtpmap:96 AMR/8000
a=fmtp:96 octet-align=1
a=control:track1


More information about the live-devel mailing list