Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41fbca0b authored by vivek mehta's avatar vivek mehta Committed by Steve Kondik
Browse files

libstagefright: adjust AV sync late margin based on property

- Current AV late margin is 40 ms
- Read system property media.sf.set.late.margin and if
  new AV sync late margin is set then use the same
- Max AV sync late margin allowed is 250 ms
- Min AV sync late margin is default 40 ms

Change-Id: I65cd3dce9b31b87f1488c37af9618669b29c362c
parent 32661d0a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -255,6 +255,8 @@ AwesomePlayer::AwesomePlayer()
#ifdef QCOM_DIRECTTRACK
    mIsTunnelAudio = false;
#endif

    mLateAVSyncMargin = ExtendedUtils::ShellProp::getMaxAVSyncLateMargin();
}

AwesomePlayer::~AwesomePlayer() {
@@ -2312,7 +2314,7 @@ void AwesomePlayer::onVideoEvent() {
            }
        }

        if (latenessUs > 40000) {
        if (latenessUs > mLateAVSyncMargin) {
            // We're more than 40ms late.
            ALOGV("we're late by %lld us (%.2f secs)",
                 latenessUs, latenessUs / 1E6);
+1 −0
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ private:
    void printStats();
    int64_t getTimeOfDayUs();
    bool mStatistics;
    int64_t mLateAVSyncMargin;

    struct TrackStat {
        String8 mMIME;