| Index: content/renderer/pepper/pepper_media_stream_audio_track_host.h
|
| diff --git a/content/renderer/pepper/pepper_media_stream_audio_track_host.h b/content/renderer/pepper/pepper_media_stream_audio_track_host.h
|
| index 4ed3e215ddffb6a4359020ceff26041c382baeaa..2c93bd2d9aa0e898251c5b36293335ca07647b6e 100644
|
| --- a/content/renderer/pepper/pepper_media_stream_audio_track_host.h
|
| +++ b/content/renderer/pepper/pepper_media_stream_audio_track_host.h
|
| @@ -52,6 +52,16 @@ class PepperMediaStreamAudioTrackHost : public PepperMediaStreamTrackHostBase {
|
| // Send a reply to the currently pending |Configure()| request.
|
| void SendConfigureReply(int32_t result);
|
|
|
| + // MediaStreamAudioSink overrides:
|
| + // These two functions should be called on the audio thread.
|
| + // NOTE: For this specific instance, |OnSetFormat()| is also called on the
|
| + // main thread. However, the call to |OnSetFormat()| happens before this
|
| + // sink is added to an audio track, also on the main thread, which should
|
| + // avoid any potential races.
|
| + void OnData(const media::AudioBus& audio_bus,
|
| + base::TimeTicks estimated_capture_time) override;
|
| + void OnSetFormat(const media::AudioParameters& params) override;
|
| +
|
| private:
|
| // Initializes buffers on the main thread.
|
| void SetFormatOnMainThread(int bytes_per_second, int bytes_per_frame);
|
| @@ -62,12 +72,6 @@ class PepperMediaStreamAudioTrackHost : public PepperMediaStreamTrackHostBase {
|
| void SendEnqueueBufferMessageOnMainThread(int32_t index,
|
| int32_t buffers_generation);
|
|
|
| - // MediaStreamAudioSink overrides:
|
| - // These two functions should be called on the audio thread.
|
| - void OnData(const media::AudioBus& audio_bus,
|
| - base::TimeTicks estimated_capture_time) override;
|
| - void OnSetFormat(const media::AudioParameters& params) override;
|
| -
|
| // Unowned host which is available during the AudioSink's lifespan.
|
| // It is mainly used in the main thread. But the audio thread will use
|
| // host_->buffer_manager() to read some buffer properties. It is safe
|
|
|