diff options
author | servolk <servolk@chromium.org> | 2016-01-20 20:35:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-21 04:36:27 +0000 |
commit | d2454b20e00263e6af49c6544d8f3d2ca4498eee (patch) | |
tree | 9a5b26f7c288abb0ddc161122009bae9e99e5b4c /chromecast | |
parent | 18b2349fbf7c9b755805e18206d5a1866b759931 (diff) | |
download | chromium_src-d2454b20e00263e6af49c6544d8f3d2ca4498eee.zip chromium_src-d2454b20e00263e6af49c6544d8f3d2ca4498eee.tar.gz chromium_src-d2454b20e00263e6af49c6544d8f3d2ca4498eee.tar.bz2 |
[Chromecast] Increase CMA audio buffer size to 256KB
Currently CMA uses 64KB audio buffer size for IPC. That's typically
enough to hold about 300ms of audio data which is the default threshold
in buffering_controller. But for high-bitrate files that might be not
enough. In particular in b/26111136 we've seen that for FLAC files with
96KHz sampling rate exceed that limit. Raising the value avoids the
deadlock in CMA pipeline IPC.
BUG=internal b/26111136
Review URL: https://codereview.chromium.org/1610683005
Cr-Commit-Position: refs/heads/master@{#370622}
Diffstat (limited to 'chromecast')
-rw-r--r-- | chromecast/media/cma/base/buffering_defs.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chromecast/media/cma/base/buffering_defs.cc b/chromecast/media/cma/base/buffering_defs.cc index 3afd0f8..b799c04 100644 --- a/chromecast/media/cma/base/buffering_defs.cc +++ b/chromecast/media/cma/base/buffering_defs.cc @@ -7,7 +7,16 @@ namespace chromecast { namespace media { -const size_t kAppAudioBufferSize = 64 * 1024; +// TODO(servolk): Find a way to compute those values dynamically, based on +// input stream parameters. These sizes need to allow enough data to be buffered +// to reach high memory threshold of the buffering controller (see +// kHighBufferThresholdMediaSource/kHighBufferThresholdURL being used in media +// pipeline initialization in MediaPipelineImpl::Initialize). Otherwise CMA IPC +// might deadlock (playback is kept paused by buffering_controller since we have +// less than |high_threshold| of data buffered, media DecoderBuffers are kept +// alive holding on to the IPC shared memory and CMA IPC is stuck since it +// reached the buffer limit and can't send more data to the browser process). +const size_t kAppAudioBufferSize = 256 * 1024; const size_t kAppVideoBufferSize = 4 * 1024 * 1024; } // namespace media |