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

Commit 0c27e4c0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "stagefright: Fix startup latency profiling"

parents f5b5614a fbd89226
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -353,6 +353,10 @@ status_t AwesomePlayer::setDataSource_l(
        const KeyedVector<String8, String8> *headers) {
        const KeyedVector<String8, String8> *headers) {
    reset_l();
    reset_l();


    ExtendedStats::AutoProfile autoProfile(STATS_PROFILE_SET_DATA_SOURCE,
                                            mPlayerExtendedStats->getProfileTimes());
    PLAYER_STATS(profileStart, STATS_PROFILE_START_LATENCY);

    mHTTPService = httpService;
    mHTTPService = httpService;
    mUri = uri;
    mUri = uri;


@@ -392,11 +396,13 @@ status_t AwesomePlayer::setDataSource_l(
status_t AwesomePlayer::setDataSource(
status_t AwesomePlayer::setDataSource(
        int fd, int64_t offset, int64_t length) {
        int fd, int64_t offset, int64_t length) {
    Mutex::Autolock autoLock(mLock);
    Mutex::Autolock autoLock(mLock);

    reset_l();

    ExtendedStats::AutoProfile autoProfile(STATS_PROFILE_SET_DATA_SOURCE,
    ExtendedStats::AutoProfile autoProfile(STATS_PROFILE_SET_DATA_SOURCE,
                                            mPlayerExtendedStats->getProfileTimes());
                                            mPlayerExtendedStats->getProfileTimes());
    PLAYER_STATS(profileStart, STATS_PROFILE_START_LATENCY);
    PLAYER_STATS(profileStart, STATS_PROFILE_START_LATENCY);


    reset_l();
    if (fd) {
    if (fd) {
       printFileName(fd);
       printFileName(fd);
    }
    }
@@ -2013,7 +2019,6 @@ void AwesomePlayer::onVideoEvent() {
                    seekmode);
                    seekmode);
        }
        }
        for (;;) {
        for (;;) {
            PLAYER_STATS(profileStartOnce, STATS_PROFILE_FIRST_BUFFER(true) /* video */);
            status_t err = mVideoSource->read(&mVideoBuffer, &options);
            status_t err = mVideoSource->read(&mVideoBuffer, &options);
            options.clearSeekTo();
            options.clearSeekTo();


+1 −0
Original line number Original line Diff line number Diff line
@@ -3539,6 +3539,7 @@ bool OMXCodec::drainInputBuffer(BufferInfo *info) {
        info = findEmptyInputBuffer();
        info = findEmptyInputBuffer();
    }
    }


    PLAYER_STATS(profileStartOnce, STATS_PROFILE_FIRST_BUFFER(mIsVideo));
    CODEC_LOGV("Calling emptyBuffer on buffer %p (length %d), "
    CODEC_LOGV("Calling emptyBuffer on buffer %p (length %d), "
               "timestamp %lld us (%.2f secs)",
               "timestamp %lld us (%.2f secs)",
               info->mBuffer, offset,
               info->mBuffer, offset,