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

Side by Side Diff: content/renderer/media/renderer_webaudiodevice_impl.h

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 21 matching lines...) Expand all
32 blink::WebAudioDevice::RenderCallback* callback, 32 blink::WebAudioDevice::RenderCallback* callback,
33 int session_id); 33 int session_id);
34 ~RendererWebAudioDeviceImpl() override; 34 ~RendererWebAudioDeviceImpl() override;
35 35
36 // blink::WebAudioDevice implementation. 36 // blink::WebAudioDevice implementation.
37 void start() override; 37 void start() override;
38 void stop() override; 38 void stop() override;
39 double sampleRate() override; 39 double sampleRate() override;
40 40
41 // AudioRendererSink::RenderCallback implementation. 41 // AudioRendererSink::RenderCallback implementation.
42 int Render(media::AudioBus* dest, int audio_delay_milliseconds) override; 42 int Render(media::AudioBus* dest,
43 uint32_t audio_delay_milliseconds,
44 uint32_t frames_skipped) override;
43 45
44 void OnRenderError() override; 46 void OnRenderError() override;
45 47
46 private: 48 private:
47 const media::AudioParameters params_; 49 const media::AudioParameters params_;
48 50
49 // Weak reference to the callback into WebKit code. 51 // Weak reference to the callback into WebKit code.
50 blink::WebAudioDevice::RenderCallback* const client_callback_; 52 blink::WebAudioDevice::RenderCallback* const client_callback_;
51 53
52 // To avoid the need for locking, ensure the control methods of the 54 // To avoid the need for locking, ensure the control methods of the
(...skipping 29 matching lines...) Expand all
82 // A cancelable task that is posted to start the |null_audio_sink_| after a 84 // A cancelable task that is posted to start the |null_audio_sink_| after a
83 // period of silence. We do this on android to save battery consumption. 85 // period of silence. We do this on android to save battery consumption.
84 base::CancelableClosure start_null_audio_sink_callback_; 86 base::CancelableClosure start_null_audio_sink_callback_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); 88 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl);
87 }; 89 };
88 90
89 } // namespace content 91 } // namespace content
90 92
91 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 93 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_recorder_handler_unittest.cc ('k') | content/renderer/media/renderer_webaudiodevice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698