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

Commit 6b0b5264 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Reduce logspam in nudriver

Currently, there is a lot of logspam in nudriver. Reduce the spam.

Test: flash the device and let it idle. Open 'adb logcat'. Observe.
Before the change: logspam @ about 10 messages / second
After the change: no logspam
Bug: 65494379

Change-Id: Ie952fdcab61aa89bb72d9c6dc63487643febd974
parent db803867
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -678,7 +678,7 @@ bool NuPlayer::Decoder::handleAnInputBuffer(size_t index) {
        msg->setSize("buffer-ix", index);

        sp<ABuffer> buffer = mCSDsToSubmit.itemAt(0);
        ALOGI("[%s] resubmitting CSD", mComponentName.c_str());
        ALOGV("[%s] resubmitting CSD", mComponentName.c_str());
        msg->setBuffer("buffer", buffer);
        mCSDsToSubmit.removeAt(0);
        if (!onInputBufferFetched(msg)) {
@@ -749,7 +749,7 @@ bool NuPlayer::Decoder::handleAnOutputBuffer(
    reply->setSize("size", size);

    if (eos) {
        ALOGI("[%s] saw output EOS", mIsAudio ? "audio" : "video");
        ALOGV("[%s] saw output EOS", mIsAudio ? "audio" : "video");

        buffer->meta()->setInt32("eos", true);
        reply->setInt32("eos", true);
@@ -1029,7 +1029,7 @@ bool NuPlayer::Decoder::onInputBufferFetched(const sp<AMessage> &msg) {
            int64_t resumeAtMediaTimeUs;
            if (extra->findInt64(
                        "resume-at-mediaTimeUs", &resumeAtMediaTimeUs)) {
                ALOGI("[%s] suppressing rendering until %lld us",
                ALOGV("[%s] suppressing rendering until %lld us",
                        mComponentName.c_str(), (long long)resumeAtMediaTimeUs);
                mSkipRenderingUntilMediaTimeUs = resumeAtMediaTimeUs;
            }
+3 −3
Original line number Diff line number Diff line
@@ -329,7 +329,7 @@ status_t NuPlayerDriver::prepareAsync() {
}

status_t NuPlayerDriver::start() {
    ALOGD("start(%p), state is %d, eos is %d", this, mState, mAtEOS);
    ALOGV("start(%p), state is %d, eos is %d", this, mState, mAtEOS);
    Mutex::Autolock autoLock(mLock);
    return start_l();
}
@@ -471,7 +471,7 @@ status_t NuPlayerDriver::getSyncSettings(AVSyncSettings *sync, float *videoFps)
}

status_t NuPlayerDriver::seekTo(int msec, MediaPlayerSeekMode mode) {
    ALOGD("seekTo(%p) (%d ms, %d) at state %d", this, msec, mode, mState);
    ALOGV("seekTo(%p) (%d ms, %d) at state %d", this, msec, mode, mState);
    Mutex::Autolock autoLock(mLock);

    int64_t seekTimeUs = msec * 1000LL;
@@ -965,7 +965,7 @@ void NuPlayerDriver::notifyListener(

void NuPlayerDriver::notifyListener_l(
        int msg, int ext1, int ext2, const Parcel *in) {
    ALOGD("notifyListener_l(%p), (%d, %d, %d, %d), loop setting(%d, %d)",
    ALOGV("notifyListener_l(%p), (%d, %d, %d, %d), loop setting(%d, %d)",
            this, msg, ext1, ext2, (in == NULL ? -1 : (int)in->dataSize()), mAutoLoop, mLooping);
    switch (msg) {
        case MEDIA_PLAYBACK_COMPLETE: