[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] mp4/fileformat qtatmmgs.cpp, 1.33.2.41.16.2, 1.33.2.41.16.3 qttrack.cpp, 1.30.2.12, 1
From: tianguan () helixcommunity ! org
Date: 2013-07-18 7:16:54
[Download RAW message or body]
Update of /cvsroot/datatype/mp4/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv29222/fileformat
Modified Files:
Tag: jupiter
qtatmmgs.cpp qttrack.cpp
Log Message:
Summary: [RPD-850][RP_jupiter_Playback]: Pop up AutoUpdate then nothing output for \
someone mov (H264_BP+PCM) clip
Bug: NA
Review: Y
Popup AU and cannot play mov files with sowt pcm audio, this mov is generated by some \
dv device
Root cause:
1. Assume the opaque data in file header is 44 bytes long, but it is not true, the \
length is not fixed, we should count it from the “size” field. 2. The sample size \
calculated by parsing 'stsd' or 'sdsz' atom is not accurate or reliable.
Index: qtatmmgs.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/fileformat/qtatmmgs.cpp,v
retrieving revision 1.33.2.41.16.2
retrieving revision 1.33.2.41.16.3
diff -u -d -r1.33.2.41.16.2 -r1.33.2.41.16.3
--- qtatmmgs.cpp 30 May 2013 03:37:14 -0000 1.33.2.41.16.2
+++ qtatmmgs.cpp 18 Jul 2013 07:16:31 -0000 1.33.2.41.16.3
@@ -972,6 +972,17 @@
return bIsEstablished;
}
+HXBOOL CQT_SampleSize_Manager::SetGenericSize( ULONG32 ulGenericSize )
+{
+ HXBOOL bRet = FALSE;
+ if ( IsGenericSize() && ulGenericSize > 0 )
+ {
+ m_ulGenericSize = ulGenericSize;
+ m_ulSampleSize = m_ulGenericSize;
+ bRet = TRUE;
+ }
+ return bRet;
+}
/****************************************************************************
* SearchMediaTimeDTByMediaTimeCT
Index: qttrack.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/fileformat/qttrack.cpp,v
retrieving revision 1.30.2.12
retrieving revision 1.30.2.12.20.1
diff -u -d -r1.30.2.12 -r1.30.2.12.20.1
--- qttrack.cpp 16 Feb 2012 06:23:24 -0000 1.30.2.12
+++ qttrack.cpp 18 Jul 2013 07:16:31 -0000 1.30.2.12.20.1
@@ -306,6 +306,71 @@
ULONG32 nDataFormat = m_SampleDesc.GetDataFormat();
m_uBunchSize = (UINT16)((nDataFormat == QT_alaw || nDataFormat == QT_ulaw || \
nDataFormat == QT_sowt || nDataFormat == QT_twos)? \
m_SampleToChunk.GetChunkSampleCount()/2 : 1); +
+ switch ( nDataFormat )
+ {
+ case QT_sowt:
+ {
+ if ( m_SampleSize.IsGenericSize() )
+ {
+ m_SampleDesc.EstablishByIdx( m_SampleToChunk.GetSampleDescIdx() );
+ CQT_stsd_Atom::ArrayEntry* pSampleDescEntry = \
m_SampleDesc.GetSampleDescEntry(); + ULONG32 ulSampleDescEntrySize = \
CQTAtom::GetUL32( pSampleDescEntry->pSize ); + UINT16 ulVersion = 0;
+ UINT8* pVersion = ( ( CQT_stsd_Atom::AudioArrayEntry* ) \
pSampleDescEntry )->pVersion; + if ( pVersion )
+ {
+ UnpackUINT16BE( pVersion, 2, &ulVersion );
+ ULONG32 ulBitsPerCodedSample = GetBitsPerSample( nDataFormat );
+ ULONG32 ulChannelNum = 0;
+ ULONG32 ulSampleSizeInBytes = 0;
+ switch ( ulVersion )
+ {
+ case CQT_stsd_Atom::SoundSampleDescriptionVersion0:
+ case CQT_stsd_Atom::SoundSampleDescriptionVersion1:
+ {
+ if ( ulSampleDescEntrySize >= sizeof( \
CQT_stsd_Atom::AudioArrayEntry ) ) + {
+ ulChannelNum = CQTAtom::GetUI16( ( UINT8* ) ( ( ( \
CQT_stsd_Atom::AudioQTMP4ArrayEntry* )pSampleDescEntry )->pNumChannels ) ); + \
} + }
+ break;
+
+ case CQT_stsd_Atom::SoundSampleDescriptionVersion2:
+ {
+ }
+ break;
+
+ default:
+ {
+ break;
+ }
+ }
+
+ UINT16 ulSampleRate = 0;
+ ulSampleRate = \
CQTAtom::GetUI16(((CQT_stsd_Atom::AudioArrayEntry*)pSampleDescEntry)->pSampleRate); +
+ if (m_TimeToSample.GetNumEntries() == 1 &&
+ m_TimeToSample.GetSampleDuration() * ulSampleRate == \
m_TrackInfo.GetMediaTimeScale()) + {
+ ulSampleSizeInBytes = ( ulBitsPerCodedSample >> 3 ) * \
ulChannelNum; + if ( ulSampleSizeInBytes > 0 && \
ulSampleSizeInBytes != m_SampleSize.GetGenericSize() ) + {
+ m_SampleSize.SetGenericSize( ulSampleSizeInBytes );
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ {
+ break;
+ }
+ }
+
+
HX_RELEASE(m_pTrackAtom);
return retVal;
@@ -1497,6 +1562,20 @@
return !bStreamDone;
}
+ULONG32 CQTTrack::GetBitsPerSample( ULONG32 ulCodecID )
+{
+ ULONG32 ulBitsPerSample = 0;
+ switch ( ulCodecID )
+ {
+ case QT_sowt:
+ {
+ ulBitsPerSample = 16;
+ }
+ break;
+ }
+ return ulBitsPerSample;
+}
+
/****************************************************************************
* IHXFileResponse methods
*/
_______________________________________________
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