Chromium Code Reviews| 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); |