summaryrefslogtreecommitdiffstats
path: root/media/capture
diff options
context:
space:
mode:
authormcasas <mcasas@chromium.org>2015-12-01 14:42:11 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-01 22:44:16 +0000
commitf683b07078e7fba476ef33625b0b41fd6161772c (patch)
treefc4f597a9345897c2e1668f68987aab1a00d47e7 /media/capture
parente540e65b1024433c088933f558095a5e849dea25 (diff)
downloadchromium_src-f683b07078e7fba476ef33625b0b41fd6161772c.zip
chromium_src-f683b07078e7fba476ef33625b0b41fd6161772c.tar.gz
chromium_src-f683b07078e7fba476ef33625b0b41fd6161772c.tar.bz2
MediaStreamRecorder: enable in Android (including linking libwebm)
This follows a conversation in the Intent-To-Ship [1]. The added code means: - third_party/libwebm - media::WebmMuxer - content::AudioTrackRecorder - content::VideoTrackRecorder - content::MediaRecorderHandler. third_party/libwebm size: 10154B Increase in ChromePublic-unsigned.apk: 54673026 - 54651438 = 21588B ~= 21KB ----- Note: Modified code in webm_muxer.cc due to complaint from arm-linux-androideabi-4.9: ../../media/capture/webm_muxer.cc:49:76: error: array subscript is above array bounds [-Werror=array-bounds] kOpusVorbisChannelMap[params.channels() - 1], params.channels()); ------ BUG=262211, 561068 TEST=Same as for desktop platform: https://rawgit.com/Miguelao/demos/master/mediarecorder.html Results of running it can be found under [2] and [3] [1] https://groups.google.com/a/chromium.org/d/msg/blink-dev/76HB0BIxk_o/LtZYZWvVBQAJ [2] https://drive.google.com/file/d/0B82Jhdx0kSTVS3E4bFZwZUxSSTQ/view?usp=sharing [3] https://drive.google.com/file/d/0B82Jhdx0kSTVM3lfR2N0RFlwNzg/view?usp=sharing Review URL: https://codereview.chromium.org/1486623004 Cr-Commit-Position: refs/heads/master@{#362536}
Diffstat (limited to 'media/capture')
-rw-r--r--media/capture/webm_muxer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/capture/webm_muxer.cc b/media/capture/webm_muxer.cc
index 5e569bc..939cb39 100644
--- a/media/capture/webm_muxer.cc
+++ b/media/capture/webm_muxer.cc
@@ -45,8 +45,10 @@ void WriteOpusHeader(const media::AudioParameters& params, uint8* header) {
header[OPUS_EXTRADATA_NUM_STREAMS_OFFSET] = params.channels();
header[OPUS_EXTRADATA_NUM_COUPLED_OFFSET] = 0;
// Set the actual stream map.
- memcpy(header + OPUS_EXTRADATA_STREAM_MAP_OFFSET,
- kOpusVorbisChannelMap[params.channels() - 1], params.channels());
+ for (int i = 0; i < params.channels(); ++i) {
+ header[OPUS_EXTRADATA_STREAM_MAP_OFFSET + i] =
+ kOpusVorbisChannelMap[params.channels() - 1][i];
+ }
} else {
header[OPUS_EXTRADATA_CHANNEL_MAPPING_OFFSET] = 0;
}