| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_AUDIO_TRACK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Overrides for MediaStreamTrack. | 60 // Overrides for MediaStreamTrack. |
| 61 | 61 |
| 62 void SetEnabled(bool enabled) override; | 62 void SetEnabled(bool enabled) override; |
| 63 | 63 |
| 64 // Stops the local audio track. Called on the main render thread and | 64 // Stops the local audio track. Called on the main render thread and |
| 65 // should be called only once when audio track going away. | 65 // should be called only once when audio track going away. |
| 66 void Stop() override; | 66 void Stop() override; |
| 67 | 67 |
| 68 webrtc::AudioTrackInterface* GetAudioAdapter() override; | 68 webrtc::AudioTrackInterface* GetAudioAdapter() override; |
| 69 | 69 |
| 70 // Returns the output format of the capture source. May return an invalid |
| 71 // AudioParameters if the format is not yet available. |
| 72 // Called on the main render thread. |
| 73 media::AudioParameters GetOutputFormat() const; |
| 74 |
| 70 // Method called by the capturer to deliver the capture data. | 75 // Method called by the capturer to deliver the capture data. |
| 71 // Called on the capture audio thread. | 76 // Called on the capture audio thread. |
| 72 void Capture(const media::AudioBus& audio_bus, | 77 void Capture(const media::AudioBus& audio_bus, |
| 73 base::TimeTicks estimated_capture_time, | 78 base::TimeTicks estimated_capture_time, |
| 74 bool force_report_nonzero_energy); | 79 bool force_report_nonzero_energy); |
| 75 | 80 |
| 76 // Method called by the capturer to set the audio parameters used by source | 81 // Method called by the capturer to set the audio parameters used by source |
| 77 // of the capture data.. | 82 // of the capture data.. |
| 78 // Called on the capture audio thread. | 83 // Called on the capture audio thread. |
| 79 void OnSetFormat(const media::AudioParameters& params); | 84 void OnSetFormat(const media::AudioParameters& params); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Used to calculate the signal level that shows in the UI. | 126 // Used to calculate the signal level that shows in the UI. |
| 122 // Accessed on only the audio thread. | 127 // Accessed on only the audio thread. |
| 123 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_; | 128 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_; |
| 124 | 129 |
| 125 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); | 130 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); |
| 126 }; | 131 }; |
| 127 | 132 |
| 128 } // namespace content | 133 } // namespace content |
| 129 | 134 |
| 130 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ | 135 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
| OLD | NEW |