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

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

Issue 12379071: Use multiple shared memory buffers cyclically for audio capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: address a missed comment Created 7 years, 9 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
Index: content/renderer/pepper/pepper_platform_audio_input_impl.cc
===================================================================
--- content/renderer/pepper/pepper_platform_audio_input_impl.cc (revision 186364)
+++ content/renderer/pepper/pepper_platform_audio_input_impl.cc (working copy)
@@ -66,7 +66,8 @@
void PepperPlatformAudioInputImpl::OnStreamCreated(
base::SharedMemoryHandle handle,
base::SyncSocket::Handle socket_handle,
- int length) {
+ int length,
+ int total_segments) {
#if defined(OS_WIN)
DCHECK(handle);
DCHECK(socket_handle);
@@ -75,6 +76,7 @@
DCHECK_NE(-1, socket_handle);
#endif
DCHECK(length);
+ DCHECK_EQ(1, total_segments);
DaleCurtis 2013/03/07 02:04:37 Please add a TODO() and file a bug that PepperInpu
wjia(left Chromium) 2013/03/10 18:19:49 Done.
if (base::MessageLoopProxy::current() != main_message_loop_proxy_) {
// No need to check |shutdown_called_| here. If shutdown has occurred,
@@ -83,7 +85,7 @@
main_message_loop_proxy_->PostTask(
FROM_HERE,
base::Bind(&PepperPlatformAudioInputImpl::OnStreamCreated, this,
- handle, socket_handle, length));
+ handle, socket_handle, length, total_segments));
} else {
// 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.
@@ -117,7 +119,7 @@
this));
} else {
// We will be notified by OnStreamCreated().
- ipc_->CreateStream(stream_id_, params_, device_id, false);
+ ipc_->CreateStream(stream_id_, params_, device_id, false, 1);
}
}
@@ -196,7 +198,7 @@
if (!session_id) {
// We will be notified by OnStreamCreated().
ipc_->CreateStream(stream_id_, params_,
- media::AudioManagerBase::kDefaultDeviceId, false);
+ media::AudioManagerBase::kDefaultDeviceId, false, 1);
} else {
// We will be notified by OnDeviceReady().
ipc_->StartDevice(stream_id_, session_id);

Powered by Google App Engine
This is Rietveld 408576698