Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(680)

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 1565623002: Replace WebAudio MediaCodec usage with FFmpeg. A ~4x improvement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete expectations. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index d422083d81cb974fc3a103cb7f77e7ff1c466f99..44114fd7e9e221e1c10995b3e4b254e3631313c1 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -79,7 +79,6 @@
#if defined(OS_ANDROID)
#include "content/browser/media/android/media_throttler.h"
-#include "media/base/android/webaudio_media_codec_bridge.h"
#endif
#if defined(OS_MACOSX)
@@ -101,13 +100,6 @@ base::LazyInstance<gfx::ColorProfile>::Leaky g_color_profile =
LAZY_INSTANCE_INITIALIZER;
#endif
-#if defined(OS_ANDROID)
-void CloseWebAudioFileDescriptor(int fd) {
- if (close(fd))
- VLOG(1) << "Couldn't close output webaudio fd: " << strerror(errno);
-}
-#endif
-
} // namespace
RenderMessageFilter::RenderMessageFilter(
@@ -202,9 +194,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnGetMonitorColorProfile)
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvents, OnMediaLogEvents)
-#if defined(OS_ANDROID)
- IPC_MESSAGE_HANDLER(ViewHostMsg_RunWebAudioMediaCodec, OnWebAudioMediaCodec)
-#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -610,32 +599,6 @@ void RenderMessageFilter::OnMediaLogEvents(
media_internals_->OnMediaEvents(render_process_id_, events);
}
-#if defined(OS_ANDROID)
-void RenderMessageFilter::OnWebAudioMediaCodec(
- base::SharedMemoryHandle encoded_data_handle,
- base::FileDescriptor pcm_output,
- uint32_t data_size) {
- if (!MediaThrottler::GetInstance()->RequestDecoderResources()) {
- base::WorkerPool::PostTask(
- FROM_HERE,
- base::Bind(&CloseWebAudioFileDescriptor, pcm_output.fd),
- true);
- VLOG(1) << "Cannot decode audio data due to throttling";
- } else {
- // Let a WorkerPool handle this request since the WebAudio
- // MediaCodec bridge is slow and can block while sending the data to
- // the renderer.
- base::WorkerPool::PostTask(
- FROM_HERE,
- base::Bind(&media::WebAudioMediaCodecBridge::RunWebAudioMediaCodec,
- encoded_data_handle, pcm_output, data_size,
- base::Bind(&MediaThrottler::OnDecodeRequestFinished,
- base::Unretained(MediaThrottler::GetInstance()))),
- true);
- }
-}
-#endif
-
void RenderMessageFilter::OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
uint32_t width,
uint32_t height,
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698