diff options
author | Marco Nelissen <marcone@google.com> | 2013-01-14 14:12:05 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-10-25 11:13:17 -0700 |
commit | 462fd2fa9eef642b0574aa7409de0bde3fec8d43 (patch) | |
tree | 65446a138d197f062bf199480b96cca4df560fcf /include | |
parent | f7d89bd79d170be3b299717ac11aff62909314c5 (diff) | |
download | frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.zip frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.tar.gz frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.tar.bz2 |
Assign blame for playback wakelocks.
Set a work source for the playback wakelock, so that playback is
counted against the requesting app instead of the media server.
Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioTrack.h | 10 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index e5cf896..bec77ce 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -187,7 +187,8 @@ public: int notificationFrames = 0, int sessionId = 0, transfer_type transferType = TRANSFER_DEFAULT, - const audio_offload_info_t *offloadInfo = NULL); + const audio_offload_info_t *offloadInfo = NULL, + int uid = -1); /* Creates an audio track and registers it with AudioFlinger. * With this constructor, the track is configured for static buffer mode. @@ -211,7 +212,8 @@ public: int notificationFrames = 0, int sessionId = 0, transfer_type transferType = TRANSFER_DEFAULT, - const audio_offload_info_t *offloadInfo = NULL); + const audio_offload_info_t *offloadInfo = NULL, + int uid = -1); /* Terminates the AudioTrack and unregisters it from AudioFlinger. * Also destroys all resources associated with the AudioTrack. @@ -248,7 +250,8 @@ public: bool threadCanCallJava = false, int sessionId = 0, transfer_type transferType = TRANSFER_DEFAULT, - const audio_offload_info_t *offloadInfo = NULL); + const audio_offload_info_t *offloadInfo = NULL, + int uid = -1); /* Result of constructing the AudioTrack. This must be checked for successful initialization * before using any AudioTrack API (except for set()), because using @@ -751,6 +754,7 @@ private: sp<DeathNotifier> mDeathNotifier; uint32_t mSequence; // incremented for each new IAudioTrack attempt audio_io_handle_t mOutput; // cached output io handle + int mClientUid; }; class TimedAudioTrack : public AudioTrack diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index eaf7780..899d79f 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -74,6 +74,7 @@ public: // output: server's description of IAudioTrack for display in logs. // Don't attempt to parse, as the format could change. String8& name, + int clientUid, status_t *status) = 0; virtual sp<IAudioRecord> openRecord( |