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

Commit 8a8d85b6 authored by Kim Sungyeon's avatar Kim Sungyeon Committed by Lajos Molnar
Browse files

VT: Enlarge jitter buffer range from 200ms to 300ms



Some China site shows very bad N/W.
Its low bandwidth(100 ~ 150Kbps) and long average latency require this patch.

Merged-in: I32a8c55055e249e3ba3a2fce8b808a2b0b3a4f51
Change-Id: I32a8c55055e249e3ba3a2fce8b808a2b0b3a4f51
Signed-off-by: default avatarKim Sungyeon <sy85.kim@samsung.com>
parent a5062c42
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit(
    const int32_t jitterTime = source->mClockRate / 5;  // 200ms
    int32_t expiredTimeInJb = rtpTime + jitterTime;
    bool isExpired = expiredTimeInJb <= (playedTimeRtp);
    bool isTooLate = expiredTimeInJb < (playedTimeRtp - jitterTime);
    bool isTooLate200 = expiredTimeInJb < (playedTimeRtp - jitterTime);
    bool isTooLate300 = expiredTimeInJb < (playedTimeRtp - (jitterTime * 3 / 2));
    ALOGV("start=%lld, now=%lld, played=%lld", (long long)startTime,
            (long long)nowTime, (long long)playedTime);
    ALOGV("rtp-time(JB)=%d, played-rtp-time(JB)=%d, expired-rtp-time(JB)=%d isExpired=%d",
@@ -73,8 +74,11 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit(
        return NOT_ENOUGH_DATA;
    }

    if (isTooLate) {
        ALOGV("buffer arrived too lately..");
    if (isTooLate200)
        ALOGW("=== WARNING === buffer arrived 200ms late. === WARNING === ");

    if (isTooLate300) {
        ALOGW("buffer arrived too late. 300ms..");
        ALOGW("start=%lld, now=%lld, played=%lld", (long long)startTime,
                (long long)nowTime, (long long)playedTime);
        ALOGW("rtp-time(JB)=%d, plyed-rtp-time(JB)=%d, exp-rtp-time(JB)=%d diff=%lld isExpired=%d",