OSDN Git Service

RIO-7523: Modifying clip durations computation in MP3 parser
authorPacketVideo CM <engbuild@pv.com>
Thu, 29 Oct 2009 19:05:36 +0000 (12:05 -0700)
committerPacketVideo CM <engbuild@pv.com>
Thu, 29 Oct 2009 19:05:36 +0000 (12:05 -0700)
engines/2way/src/pv_2way_sdkinfo.h
engines/author/src/pv_author_sdkinfo.h
engines/player/src/pv_player_sdkinfo.h
fileformats/mp3/parser/src/mp3parser.cpp

index 7333ec2..403c06f 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PV2WAY_ENGINE_SDKINFO_LABEL "1038824"
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1039074"
 #define PV2WAY_ENGINE_SDKINFO_DATE 0x20091023
 
 #endif //PV_2WAY_SDKINFO_H_INCLUDED
index 332bae5..54b85cf 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1038824"
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1039074"
 #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20091023
 
 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED
index 86e661a..6e9748a 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1038824"
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1039074"
 #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20091023
 
 #endif //PV_PLAYER_SDKINFO_H_INCLUDED
index 72dd723..6da0c21 100644 (file)
@@ -2954,13 +2954,15 @@ void MP3Parser::GetDurationFromCompleteScan(uint32 &aClipDuration)
         aClipDuration = iClipDurationComputed;
         return;
     }
+    uint32 samplesPerFrame = spfIndexTable[iMP3HeaderInfo.frameVer][iMP3HeaderInfo.layerID];
+    uint32 samplingRate = srIndexTable[((iMP3HeaderInfo.frameVer)*4) + iMP3HeaderInfo.srIndex];
+    OsclFloat samplingRateinKHz = (OsclFloat)samplingRate / 1000;
 
-    // Just assign the iScanTimestamp to the ClipDuration. iScanTimestamp is made up after adding all
-    // frameDurations of the frames which are scanned as a part of DurationCalculator AO.
-    iClipDurationComputed = iScanTimestamp;
+    iClipDurationComputed = (uint32)(iScannedFrameCount * (OsclFloat)(samplesPerFrame / samplingRateinKHz));
     aClipDuration = iClipDurationComputed;
 }
 
+
 void MP3Parser::FillTOCTable(uint32 aFilePos, uint32 aTimeStampToFrame)
 {
     if (iDurationScanComplete)