[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] mp4/common/pub gaConfig.h,1.4,1.4.14.1
From:       jgordon () helixcommunity ! org
Date:       2007-10-30 10:48:02
Message-ID: 200710301048.l9UAme6r006754 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/mp4/common/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv29127/common/pub

Modified Files:
      Tag: SERVER_BORABORA
	gaConfig.h 
Log Message:
Synopsis
========
Fixes PRs 206360 and 206364 - incorrect rate used in rtpmap and poor
playback on some clients

Branches: SERVER_BORABORA, HEAD (SERVER_CURRENT)
Reviewer: milko


Description
===========
mp4a-latm packetization spec requires that the RTP time stamp scale must
either match the audio sampling rate or else must be 90khz. When SBR
data is present, the time scale needs to match the base sampling rate
only.

In the mp4a-latm packetizer, we were simply using the sample rate
supplied by the file format as the time scale. This sample rate however
is not the audio sampling rate, but is the mp4 sample rate (the time
scale used within the mp4 container samples). While most (maybe all)
encoders use the audio sampling rate for this purpose, in case of
SBR data present, they use the full sampling rate *with* SBR data. The
time scale for RTP time stamps however needs to match only the base
sampling rate, without SBR. Some clients cannot handle this properly
and assume that the RTP time scale will be the base audio sampling rate.

We cannot simply convert from the supplied MP4 sampling rate assuming
that it is the AAC + SBR rate, as there is no such guarantee - it could
really be anything.

So the packetizer must parse the AudioSpecificConfig in order to
determine the base audio sampling rate and convert the RTP time stamps
to the new rate.

This change updates the packetizer to use CAudioSpecificConfig (the full
parser) since we now need to parse the full config in order to determine
all these various necessary values and also updates CAudioSpecificConfig
to add one missing necessary method. It determines the core
AudioSamplingRate from this structure, sets that as the RTP time scale
(SamplesPerSecond), and converts input time stamps to the appropriate
rate to determine the output time stamp.

Files Affected
==============
datatype/mp4/common/gaConfig.cpp
datatype/mp4/common/pub/gaConfig.h
datatype/mp4/payload/latmpacketizer.cpp
datatype/mp4/payload/pub/latmpacketizer.h


Testing Performed
=================
Unit Tests:

Integration Tests:
- Verified core sampling rate advertised in the rtpmap as the time scale
- Verified time stamping matches this rate
- Verified proper playback with RealPlayer w/ sdpgen
- Verified proper playback with RealPlayer w/ pure RTSP
- Verified proper playback with QuickTime player w/ sdpgen

Leak Tests:

Performance Tests:

Platforms Tested: win32-i386-vc7
Build verified: sunos-5.10-sparc-server, win32-i386-vc7


QA Hints
===============
I do not currently have access to the clients that have playback issues,
so cannot verify that 206364 is truly fixed with this change.



Index: gaConfig.h
===================================================================
RCS file: /cvsroot/datatype/mp4/common/pub/gaConfig.h,v
retrieving revision 1.4
retrieving revision 1.4.14.1
diff -u -d -r1.4 -r1.4.14.1
--- gaConfig.h	14 Mar 2005 19:17:43 -0000	1.4
+++ gaConfig.h	30 Oct 2007 10:48:00 -0000	1.4.14.1
@@ -129,6 +129,7 @@
 	~CAudioSpecificConfig() ;
 	HX_RESULT Read(struct BITSTREAM &bs) ;
 
+        UINT32 GetCoreConfigSize() const;
 	UINT32 GetNChannels() const {return GASpecificConfig.GetNChannels();}
 	UINT32 GetSampleRate() const ;
 	UINT32 GetCoreSampleRate() const ;
@@ -147,6 +148,8 @@
 	CGASpecificConfig GASpecificConfig ;
 	static const UINT32 aSampleRate[13] ;
 	HXBOOL m_bSBR ;
+        UINT32 m_ulCoreConfigSize;
+        UINT32 m_ulExtendedSize;
 
 	enum AudioObjectType
 	{


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic