diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-02-04 16:26:02 -0800 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-02-11 10:13:00 -0800 |
commit | 272ab546940054ad7991bef4b3a36f15175721cd (patch) | |
tree | 32635746bbb3c6f4b4297754d0d388fae41c6574 /include | |
parent | 513b8b238caa52f8ddf5c85109dbf362c515185f (diff) | |
download | frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.zip frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.tar.gz frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.tar.bz2 |
Add support for querying if a stream is active remotely
Bug 7485803
Change-Id: I0744374f130fd2dd0714102354cffed2fa915361
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 7 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 126ef12..b11c812 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -67,9 +67,14 @@ public: // set audio mode in audio hardware static status_t setMode(audio_mode_t mode); - // returns true in *state if tracks are active on the specified stream or has been active + // returns true in *state if tracks are active on the specified stream or have been active // in the past inPastMs milliseconds static status_t isStreamActive(audio_stream_type_t stream, bool *state, uint32_t inPastMs = 0); + // returns true in *state if tracks are active for what qualifies as remote playback + // on the specified stream or have been active in the past inPastMs milliseconds. Remote + // playback isn't mutually exclusive with local playback. + static status_t isStreamActiveRemotely(audio_stream_type_t stream, bool *state, + uint32_t inPastMs = 0); // returns true in *state if a recorder is currently recording with the specified source static status_t isSourceActive(audio_source_t source, bool *state); diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index f5b0604..b5ad4ef 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -89,6 +89,8 @@ public: virtual status_t unregisterEffect(int id) = 0; virtual status_t setEffectEnabled(int id, bool enabled) = 0; virtual bool isStreamActive(audio_stream_type_t stream, uint32_t inPastMs = 0) const = 0; + virtual bool isStreamActiveRemotely(audio_stream_type_t stream, uint32_t inPastMs = 0) + const = 0; virtual bool isSourceActive(audio_source_t source) const = 0; virtual status_t queryDefaultPreProcessing(int audioSession, effect_descriptor_t *descriptors, |