diff options
Diffstat (limited to 'content/renderer/media')
8 files changed, 21 insertions, 11 deletions
diff --git a/content/renderer/media/audio_track_recorder_unittest.cc b/content/renderer/media/audio_track_recorder_unittest.cc index 1966464..f000ea1 100644 --- a/content/renderer/media/audio_track_recorder_unittest.cc +++ b/content/renderer/media/audio_track_recorder_unittest.cc @@ -128,7 +128,7 @@ class AudioTrackRecorderTest : public TestWithParam<ATRTestParams> { audio_track_recorder_->GetOpusBufferDuration( first_params_.sample_rate()) / 1000)); - first_source_.OnMoreData(bus.get(), 0); + first_source_.OnMoreData(bus.get(), 0, 0); return bus.Pass(); } scoped_ptr<media::AudioBus> GetSecondSourceAudioBus() { @@ -138,7 +138,7 @@ class AudioTrackRecorderTest : public TestWithParam<ATRTestParams> { audio_track_recorder_->GetOpusBufferDuration( second_params_.sample_rate()) / 1000)); - second_source_.OnMoreData(bus.get(), 0); + second_source_.OnMoreData(bus.get(), 0, 0); return bus.Pass(); } diff --git a/content/renderer/media/media_recorder_handler_unittest.cc b/content/renderer/media/media_recorder_handler_unittest.cc index b2a10b9..57fb60d 100644 --- a/content/renderer/media/media_recorder_handler_unittest.cc +++ b/content/renderer/media/media_recorder_handler_unittest.cc @@ -110,7 +110,7 @@ class MediaRecorderHandlerTest : public TestWithParam<MediaRecorderTestParams>, scoped_ptr<media::AudioBus> bus(media::AudioBus::Create( kTestAudioChannels, kTestAudioSampleRate * kTestAudioBufferDurationMS / 1000)); - audio_source_.OnMoreData(bus.get(), 0); + audio_source_.OnMoreData(bus.get(), 0, 0); return bus.Pass(); } diff --git a/content/renderer/media/renderer_webaudiodevice_impl.cc b/content/renderer/media/renderer_webaudiodevice_impl.cc index d816db3..a0dbd3e 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl.cc +++ b/content/renderer/media/renderer_webaudiodevice_impl.cc @@ -94,7 +94,8 @@ double RendererWebAudioDeviceImpl::sampleRate() { } int RendererWebAudioDeviceImpl::Render(media::AudioBus* dest, - int audio_delay_milliseconds) { + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) { #if defined(OS_ANDROID) if (is_first_buffer_after_silence_) { DCHECK(!is_using_null_audio_sink_); diff --git a/content/renderer/media/renderer_webaudiodevice_impl.h b/content/renderer/media/renderer_webaudiodevice_impl.h index 02c8677..9dd2954 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl.h +++ b/content/renderer/media/renderer_webaudiodevice_impl.h @@ -39,7 +39,9 @@ class RendererWebAudioDeviceImpl double sampleRate() override; // AudioRendererSink::RenderCallback implementation. - int Render(media::AudioBus* dest, int audio_delay_milliseconds) override; + int Render(media::AudioBus* dest, + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) override; void OnRenderError() override; diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc index a36914a..9714b23 100644 --- a/content/renderer/media/webrtc_audio_renderer.cc +++ b/content/renderer/media/webrtc_audio_renderer.cc @@ -418,7 +418,8 @@ media::OutputDeviceStatus WebRtcAudioRenderer::GetDeviceStatus() { } int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus, - int audio_delay_milliseconds) { + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) { DCHECK(audio_renderer_thread_checker_.CalledOnValidThread()); base::AutoLock auto_lock(lock_); if (!source_) @@ -427,7 +428,8 @@ int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus, DVLOG(2) << "WebRtcAudioRenderer::Render()"; DVLOG(2) << "audio_delay_milliseconds: " << audio_delay_milliseconds; - audio_delay_milliseconds_ = audio_delay_milliseconds; + DCHECK_LE(audio_delay_milliseconds, static_cast<uint32_t>(INT_MAX)); + audio_delay_milliseconds_ = static_cast<int>(audio_delay_milliseconds); if (audio_fifo_) audio_fifo_->Consume(audio_bus, audio_bus->frames()); diff --git a/content/renderer/media/webrtc_audio_renderer.h b/content/renderer/media/webrtc_audio_renderer.h index 0f016eb..1502fb9 100644 --- a/content/renderer/media/webrtc_audio_renderer.h +++ b/content/renderer/media/webrtc_audio_renderer.h @@ -168,7 +168,9 @@ class CONTENT_EXPORT WebRtcAudioRenderer // media::AudioRendererSink::RenderCallback implementation. // These two methods are called on the AudioOutputDevice worker thread. - int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds) override; + int Render(media::AudioBus* audio_bus, + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) override; void OnRenderError() override; // Called by AudioPullFifo when more data is necessary. diff --git a/content/renderer/media/webrtc_local_audio_renderer.cc b/content/renderer/media/webrtc_local_audio_renderer.cc index 9746e0e..8f0f2ed 100644 --- a/content/renderer/media/webrtc_local_audio_renderer.cc +++ b/content/renderer/media/webrtc_local_audio_renderer.cc @@ -32,8 +32,9 @@ enum LocalRendererSinkStates { } // namespace // media::AudioRendererSink::RenderCallback implementation -int WebRtcLocalAudioRenderer::Render( - media::AudioBus* audio_bus, int audio_delay_milliseconds) { +int WebRtcLocalAudioRenderer::Render(media::AudioBus* audio_bus, + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) { TRACE_EVENT0("audio", "WebRtcLocalAudioRenderer::Render"); base::AutoLock auto_lock(thread_lock_); diff --git a/content/renderer/media/webrtc_local_audio_renderer.h b/content/renderer/media/webrtc_local_audio_renderer.h index 89734c3..6a06984 100644 --- a/content/renderer/media/webrtc_local_audio_renderer.h +++ b/content/renderer/media/webrtc_local_audio_renderer.h @@ -97,7 +97,9 @@ class CONTENT_EXPORT WebRtcLocalAudioRenderer // media::AudioRendererSink::RenderCallback implementation. // Render() is called on the AudioOutputDevice thread and OnRenderError() // on the IO thread. - int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds) override; + int Render(media::AudioBus* audio_bus, + uint32_t audio_delay_milliseconds, + uint32_t frames_skipped) override; void OnRenderError() override; // Initializes and starts the |sink_| if |
