[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] aac/fileformat aacff.cpp,1.36.8.15,1.36.8.16
From: xzhao () helixcommunity ! org
Date: 2012-02-22 7:22:21
[Download RAW message or body]
Update of /cvsroot/datatype/aac/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv7237
Modified Files:
Tag: hxclient_3_1_0_atlas
aacff.cpp
Log Message:
Overview:
In this mode, after seek, the packet time stamp will not jump to some position after \
seek point, instead it will continue growing from current position. For example, \
current packet ts is 3s, after seek to 10s, next packet ts will be 3.021s, not \
10.021s. This mode is useful when seek table is not available, while some proxy FF \
know exactly the packet ts detail. So leave this decision to the upper proxy FF.
Files Modified:
datatype/mp3/fileformat/mp3ff.cpp
datatype/mp3/fileformat/pub/mp3ff.h
datatype/aac/fileformat/aacff.cpp
datatype/aac/fileformat/pub/aacff.h
Index: aacff.cpp
===================================================================
RCS file: /cvsroot/datatype/aac/fileformat/aacff.cpp,v
retrieving revision 1.36.8.15
retrieving revision 1.36.8.16
diff -u -d -r1.36.8.15 -r1.36.8.16
--- aacff.cpp 1 Jul 2011 12:18:33 -0000 1.36.8.15
+++ aacff.cpp 22 Feb 2012 07:22:18 -0000 1.36.8.16
@@ -144,6 +144,7 @@
m_bUpdateDuration(TRUE),
m_bViewSourceRequest(FALSE),
m_bForceAACPayloadFormat(FALSE),
+ m_bUseContinuousDTSAfterSeek(FALSE),
m_bFileDone(FALSE),
m_pCallback(NULL),
m_pScheduler(NULL),
@@ -307,6 +308,18 @@
m_bViewSourceRequest = ((ulVal == 0) ? FALSE : TRUE);
}
+ ulVal = 0;
+ if (SUCCEEDED(pRequestHeaders->GetPropertyULONG32("UseContinuousDTSAfterSeek", \
ulVal))) + {
+ m_bUseContinuousDTSAfterSeek = ((ulVal == 0) ? FALSE : TRUE);
+ }
+
+ if (m_bUseContinuousDTSAfterSeek && m_pSeekTable)
+ {
+ // In continuous timestamp mode, don't need seektable
+ HX_DELETE(m_pSeekTable);
+ }
+
IHXBuffer* pBuffer = 0;
if (SUCCEEDED(pRequestHeaders->GetPropertyCString("PreferredAudioPayload", \
pBuffer)) && pBuffer) {
@@ -935,9 +948,12 @@
m_uState = m_uLastState;
m_bFileDone = FALSE;
m_pFileObject->Seek(m_ulCurrentFileOffset, FALSE);
- IHXBuffer* pBuf = m_pFirstAACFrame->GetBuffer();
- CreateStreamHeader(pBuf);
- HX_RELEASE(pBuf);
+ if (m_pFirstAACFrame)
+ {
+ IHXBuffer* pBuf = m_pFirstAACFrame->GetBuffer();
+ CreateStreamHeader(pBuf);
+ HX_RELEASE(pBuf);
+ }
}
break;
@@ -1111,7 +1127,7 @@
m_ulAvgBitRate = (UINT32)((double)((ulNumBytesIn - m_ulID3TagSize) << 1) \
* 1000.0 / ((double)(ulTimeStamp >> 2)));
}
- }
+ }
ulDuration = (UINT32)((double)(m_ulFileSize << 1)*4000.0 / \
(double)(m_ulAvgBitRate));
@@ -1718,8 +1734,11 @@
m_uState = STATE_SEEK_FORWARD;
if (ulOffset < m_ulNextTimeStamp)
{ // Go to beginning of file
- m_ulNextTimeStamp = 0;
- m_ulNumSamples = 0;
+ if (!m_bUseContinuousDTSAfterSeek)
+ {
+ m_ulNextTimeStamp = 0;
+ m_ulNumSamples = 0;
+ }
m_ulCurrentFileOffset = 0;
retVal = m_pFileObject->Seek(0, FALSE);
}
@@ -1813,7 +1832,7 @@
case STATE_SEEK_FORWARD:
if (SUCCEEDED(status))
{
- if (m_ulTimeSeekOffset > m_ulNextTimeStamp)
+ if (m_ulTimeSeekOffset > m_ulNextTimeStamp && \
!m_bUseContinuousDTSAfterSeek) {
unHeaderSize = m_pFileType->GetHeaderSize();
if (unHeaderSize)
_______________________________________________
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