OSDN Git Service

RIO-8511: PVMFMediaClock takes care of device latency. Remove the device latency...
authorPacketVideo CM <engbuild@pv.com>
Tue, 2 Feb 2010 05:51:05 +0000 (21:51 -0800)
committerPacketVideo CM <engbuild@pv.com>
Tue, 2 Feb 2010 05:51:05 +0000 (21:51 -0800)
android/android_audio_mio.cpp
engines/2way/src/pv_2way_sdkinfo.h
engines/author/src/pv_author_sdkinfo.h
engines/player/src/pv_player_sdkinfo.h

index 83d3636..b51dcd1 100755 (executable)
@@ -788,20 +788,8 @@ void AndroidAudioMIOActiveTimingSupport::UpdateClock()
         updateClock32 = iFrameCount * iMsecsPerFrame;
         LOGV("sample clock = %u frameCount(%u) msecsPerFrame(%f)", updateClock32, iFrameCount, iMsecsPerFrame);
 
-        // startup - force clock backwards to compensate for latency
-        if (updateClock32 < iDriverLatency)
-        {
-            LOGV("iStartTime = %u , iDriverLatency = %u", iStartTime, iDriverLatency);
-            correction = iStartTime - clockTime32;
-            LOGV("latency stall - forcing clock (correction = %d)", correction);
-        }
-
-        // normal play mode - check delta between PV engine clock and sample clock
-        else
-        {
-            correction = (updateClock32 - iDriverLatency) - (clockTime32 - iStartTime);
-            LOGV("clock drift (correction = (updateClock32(%d)-iDriverLatency(%d))-(clockTime32(%d)-iStartTime(%d))= %d)", updateClock32, iDriverLatency, clockTime32, iStartTime, correction);
-        }
+        correction = updateClock32 - (clockTime32 - iStartTime);
+        LOGV("ADJ_CLK iDriverLatency %d old clock %d delta %d", iDriverLatency, clockTime32, correction);
 
         // do clock correction if drift exceeds threshold
         if (OSCL_ABS(correction) > iMinCorrection)
@@ -815,7 +803,7 @@ void AndroidAudioMIOActiveTimingSupport::UpdateClock()
                 correction = -iMaxCorrection;
             }
             updateClock32 = clockTime32 + correction;
-            LOGV("drift correction = %d, new clock = %u", correction, updateClock32);
+            LOGV("ADJ_CLK old clock %d correction %d new clock %d", clockTime32, correction, updateClock32);
             PVMFMediaClockAdjustTimeStatus adjustmentstatus =
                 iClock->AdjustClockTime32(clockTime32, timeBaseTime32, updateClock32, PVMF_MEDIA_CLOCK_MSEC, overflowFlag);
 
index e2e28c2..054bee7 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 "1234838"
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1235428"
 #define PV2WAY_ENGINE_SDKINFO_DATE 0x20100129
 
 #endif //PV_2WAY_SDKINFO_H_INCLUDED
index 1a3f6a7..d81bd72 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 "1234838"
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1235428"
 #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100129
 
 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED
index e30eb0d..933ea3a 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 "1234838"
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1235428"
 #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100129
 
 #endif //PV_PLAYER_SDKINFO_H_INCLUDED