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

Unified Diff: content/renderer/pepper/pepper_platform_audio_output.cc

Issue 1856673002: Mojofication of the Chrome Audio Rendering Prototype Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/renderer/pepper/pepper_platform_audio_output.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_platform_audio_output.cc
diff --git a/content/renderer/pepper/pepper_platform_audio_output.cc b/content/renderer/pepper/pepper_platform_audio_output.cc
index 14a5642d14fbd219f6419c58f622905ec90e4a14..c27ca4c7af27118fd58609645a20521573e23ba3 100644
--- a/content/renderer/pepper/pepper_platform_audio_output.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output.cc
@@ -10,6 +10,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "build/build_config.h"
+#include "content/browser/media/audio_output_impl.h"
#include "content/child/child_process.h"
#include "content/common/media/audio_messages.h"
#include "content/renderer/media/audio_message_filter.h"
@@ -40,6 +41,10 @@ PepperPlatformAudioOutput* PepperPlatformAudioOutput::Create(
return NULL;
}
+media::AudioOutputIPC* PepperPlatformAudioOutput::getIPC() {
+ return ipc_.get();
+}
+
bool PepperPlatformAudioOutput::StartPlayback() {
if (ipc_) {
io_task_runner_->PostTask(
@@ -79,6 +84,7 @@ void PepperPlatformAudioOutput::OnDeviceAuthorized(
}
void PepperPlatformAudioOutput::OnStreamCreated(
+ mojom::AudioOutputStreamPtr* stream,
base::SharedMemoryHandle handle,
base::SyncSocket::Handle socket_handle,
int length) {
@@ -91,6 +97,7 @@ void PepperPlatformAudioOutput::OnStreamCreated(
#endif
DCHECK(length);
+ stream_ = stream;
if (base::ThreadTaskRunnerHandle::Get().get() == main_task_runner_.get()) {
// Must dereference the client only on the main thread. Shutdown may have
// occurred while the request was in-flight, so we need to NULL check.
@@ -99,7 +106,7 @@ void PepperPlatformAudioOutput::OnStreamCreated(
} else {
main_task_runner_->PostTask(
FROM_HERE, base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, this,
- handle, socket_handle, length));
+ stream_, handle, socket_handle, length));
}
}
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698