summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/Utils.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-11-14 17:28:47 -0800
committerEric Laurent <elaurent@google.com>2013-11-14 17:36:42 -0800
commit22612345ae97648d5b6db43cc1aa30aad77f7bba (patch)
tree73b47a621118d0fa56d27929a9447e90ca27c97d /include/media/stagefright/Utils.h
parent4215e6166fca9f87a6e9e848b3dfd4ab0d25c954 (diff)
downloadframeworks_av-22612345ae97648d5b6db43cc1aa30aad77f7bba.zip
frameworks_av-22612345ae97648d5b6db43cc1aa30aad77f7bba.tar.gz
frameworks_av-22612345ae97648d5b6db43cc1aa30aad77f7bba.tar.bz2
AwesomePlayer: correct stream type for offload
canOffloadStream() function in stagefright utils forces the stream type to AUDIO_STREAM_MUSIC when querying the audio policy manager if a particular track is offloadable or not. This causes MP3 ringtones to be offloaded which is not a validated use case. The fix consists in using the actual stream type read from the AudioSink. Bug: 11410937. Change-Id: I44b8e033a8e785a79cdc291b142f80b5580bdc4d
Diffstat (limited to 'include/media/stagefright/Utils.h')
-rw-r--r--include/media/stagefright/Utils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/media/stagefright/Utils.h b/include/media/stagefright/Utils.h
index c24f612..bbad271 100644
--- a/include/media/stagefright/Utils.h
+++ b/include/media/stagefright/Utils.h
@@ -57,7 +57,8 @@ status_t mapMimeToAudioFormat(audio_format_t& format, const char* mime);
status_t sendMetaDataToHal(sp<MediaPlayerBase::AudioSink>& sink, const sp<MetaData>& meta);
// Check whether the stream defined by meta can be offloaded to hardware
-bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo, bool isStreaming);
+bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
+ bool isStreaming, audio_stream_type_t streamType);
} // namespace android