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

Commit 355b2bb6 authored by Wei Jia's avatar Wei Jia
Browse files

NuPlayer: add more logging to debug offload teardown.

Test: CTS tests
Bug: 73561958
Change-Id: I3a10b7ff98853119e105f89ec624d2732630c409
parent 4354cf89
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1289,7 +1289,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                ALOGV("Tear down audio with reason %d.", reason);
                ALOGV("Tear down audio with reason %d.", reason);
                if (reason == Renderer::kDueToTimeout && !(mPaused && mOffloadAudio)) {
                if (reason == Renderer::kDueToTimeout && !(mPaused && mOffloadAudio)) {
                    // TimeoutWhenPaused is only for offload mode.
                    // TimeoutWhenPaused is only for offload mode.
                    ALOGW("Receive a stale message for teardown.");
                    ALOGW("Received a stale message for teardown, mPaused(%d), mOffloadAudio(%d)",
                          mPaused, mOffloadAudio);
                    break;
                    break;
                }
                }
                int64_t positionUs;
                int64_t positionUs;
@@ -1789,6 +1790,8 @@ void NuPlayer::closeAudioSink() {


void NuPlayer::restartAudio(
void NuPlayer::restartAudio(
        int64_t currentPositionUs, bool forceNonOffload, bool needsToCreateAudioDecoder) {
        int64_t currentPositionUs, bool forceNonOffload, bool needsToCreateAudioDecoder) {
    ALOGD("restartAudio timeUs(%lld), dontOffload(%d), createDecoder(%d)",
          (long long)currentPositionUs, forceNonOffload, needsToCreateAudioDecoder);
    if (mAudioDecoder != NULL) {
    if (mAudioDecoder != NULL) {
        mAudioDecoder->pause();
        mAudioDecoder->pause();
        mAudioDecoder.clear();
        mAudioDecoder.clear();