summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorrtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 01:58:12 +0000
committerrtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 01:58:12 +0000
commit8e08b1423631dd2bb761adecf6e67ca41e70c5c0 (patch)
treea477654e60460eb0968c93dd435c11b392c05084 /content/common
parentac8a8299a1123f7d2c9b9cd54b8f88fd26d946cb (diff)
downloadchromium_src-8e08b1423631dd2bb761adecf6e67ca41e70c5c0.zip
chromium_src-8e08b1423631dd2bb761adecf6e67ca41e70c5c0.tar.gz
chromium_src-8e08b1423631dd2bb761adecf6e67ca41e70c5c0.tar.bz2
Handle decoding of vorbis files better on Android
BUG=227144 Send the data size to MediaCodec so we can get the duration length for ogg/vorbis files correctly instead of returning a huge number. With this information, we no longer need the is_vorbis flag since the duration is now correct, so we remove that code as well. Review URL: https://chromiumcodereview.appspot.com/14522002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/view_messages.h5
-rw-r--r--content/common/webkitplatformsupport_impl.cc6
2 files changed, 7 insertions, 4 deletions
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 4e5ebc5..bb08048 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -2226,9 +2226,10 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_ImeBatchStateChanged_ACK,
bool /* is_begin */)
// This message runs the MediaCodec for decoding audio for webaudio.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_RunWebAudioMediaCodec,
+IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
base::SharedMemoryHandle /* encoded_data_handle */,
- base::FileDescriptor /* pcm_output */)
+ base::FileDescriptor /* pcm_output */,
+ size_t /* data_size*/)
// Sent by renderer to request a ViewMsg_VSync message for upcoming display
// vsync events. If |enabled| is true, the vsync message will continue to be be
diff --git a/content/common/webkitplatformsupport_impl.cc b/content/common/webkitplatformsupport_impl.cc
index 1328bd5d..b6c0728 100644
--- a/content/common/webkitplatformsupport_impl.cc
+++ b/content/common/webkitplatformsupport_impl.cc
@@ -17,10 +17,12 @@
namespace {
void RunWebAudioMediaCodec(
base::SharedMemoryHandle encoded_data_handle,
- base::FileDescriptor pcm_output) {
+ base::FileDescriptor pcm_output,
+ size_t data_size) {
content::ChildThread::current()->Send(
new ViewHostMsg_RunWebAudioMediaCodec(encoded_data_handle,
- pcm_output));
+ pcm_output,
+ data_size));
}
} // anonymous namespace