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

Commit 4dda6e7a authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge changes I00f0192b,I1db9269f into sc-dev

* changes:
  AudioTrack: Enable playerIId tracking for OpenSLES
  AudioTrack: Enable logSessionId for original proto
parents 92f5b797 4d416da5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -218,6 +218,7 @@ void AudioTrack::MediaMetrics::gather(const AudioTrack *track)
    mMetricsItem->setCString(MM_PREFIX "encoding", toString(track->mFormat).c_str());
    mMetricsItem->setInt32(MM_PREFIX "frameCount", (int32_t)track->mFrameCount);
    mMetricsItem->setCString(MM_PREFIX "attributes", toString(track->mAttributes).c_str());
    mMetricsItem->setCString(MM_PREFIX "logSessionId", track->mLogSessionId.c_str());
}

// hand the user a snapshot of the metrics.
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ void TrackPlayerBase::init(AudioTrack* pat, player_type_t playerType, audio_usag
    if (mAudioTrack != 0) {
        mSelfAudioDeviceCallback = new SelfAudioDeviceCallback(*this);
        mAudioTrack->addAudioDeviceCallback(mSelfAudioDeviceCallback);
        mAudioTrack->setPlayerIId(mPIId); // set in PlayerBase::init().
    }
}

+4 −3
Original line number Diff line number Diff line
@@ -71,6 +71,10 @@ protected:
    float mPanMultiplierL, mPanMultiplierR;
    float mVolumeMultiplierL, mVolumeMultiplierR;

    // player interface ID, uniquely identifies the player in the system
    // effectively const after PlayerBase::init().
    audio_unique_id_t mPIId;

private:
            // report events to AudioService
            void servicePlayerEvent(player_state_t event, audio_port_handle_t deviceId);
@@ -79,9 +83,6 @@ private:
    // native interface to AudioService
    android::sp<android::IAudioManager> mAudioManager;

    // player interface ID, uniquely identifies the player in the system
    audio_unique_id_t mPIId;

    // Mutex for state reporting
    Mutex mPlayerStateLock;
    player_state_t mLastReportedEvent;