| OLD | NEW |
| 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_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void EnsureSourceIsStopped() final; | 88 void EnsureSourceIsStopped() final; |
| 89 | 89 |
| 90 // AudioCapturerSource::CaptureCallback implementation. | 90 // AudioCapturerSource::CaptureCallback implementation. |
| 91 // Called on the AudioCapturerSource audio thread. | 91 // Called on the AudioCapturerSource audio thread. |
| 92 void OnCaptureStarted() override; | 92 void OnCaptureStarted() override; |
| 93 void Capture(const media::AudioBus* audio_source, | 93 void Capture(const media::AudioBus* audio_source, |
| 94 int audio_delay_milliseconds, | 94 int audio_delay_milliseconds, |
| 95 double volume, | 95 double volume, |
| 96 bool key_pressed) override; | 96 bool key_pressed) override; |
| 97 void OnCaptureError(const std::string& message) override; | 97 void OnCaptureError(const std::string& message) override; |
| 98 void OnCaptureMuted(bool is_muted) override; |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 // Helper function to get the source buffer size based on whether audio | 101 // Helper function to get the source buffer size based on whether audio |
| 101 // processing will take place. | 102 // processing will take place. |
| 102 int GetBufferSize(int sample_rate) const; | 103 int GetBufferSize(int sample_rate) const; |
| 103 | 104 |
| 104 // The RenderFrame that will consume the audio data. Used when creating | 105 // The RenderFrame that will consume the audio data. Used when creating |
| 105 // AudioCapturerSources. | 106 // AudioCapturerSources. |
| 106 const int consumer_render_frame_id_; | 107 const int consumer_render_frame_id_; |
| 107 | 108 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 135 MediaStreamAudioLevelCalculator level_calculator_; | 136 MediaStreamAudioLevelCalculator level_calculator_; |
| 136 | 137 |
| 137 bool allow_invalid_render_frame_id_for_testing_; | 138 bool allow_invalid_render_frame_id_for_testing_; |
| 138 | 139 |
| 139 DISALLOW_COPY_AND_ASSIGN(ProcessedLocalAudioSource); | 140 DISALLOW_COPY_AND_ASSIGN(ProcessedLocalAudioSource); |
| 140 }; | 141 }; |
| 141 | 142 |
| 142 } // namespace content | 143 } // namespace content |
| 143 | 144 |
| 144 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ | 145 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_SOURCE_H_ |
| OLD | NEW |