| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 WebRtcLocalAudioTrackAdapter( | 39 WebRtcLocalAudioTrackAdapter( |
| 40 const std::string& label, | 40 const std::string& label, |
| 41 webrtc::AudioSourceInterface* track_source); | 41 webrtc::AudioSourceInterface* track_source); |
| 42 | 42 |
| 43 virtual ~WebRtcLocalAudioTrackAdapter(); | 43 virtual ~WebRtcLocalAudioTrackAdapter(); |
| 44 | 44 |
| 45 void Initialize(WebRtcLocalAudioTrack* owner); | 45 void Initialize(WebRtcLocalAudioTrack* owner); |
| 46 | 46 |
| 47 std::vector<int> VoeChannels() const; | 47 std::vector<int> VoeChannels() const; |
| 48 | 48 |
| 49 // Called on the audio thread by the WebRtcLocalAudioTrack to set the signal |
| 50 // level of the audio data. |
| 51 void SetSignalLevel(int signal_level); |
| 52 |
| 49 private: | 53 private: |
| 50 // webrtc::MediaStreamTrack implementation. | 54 // webrtc::MediaStreamTrack implementation. |
| 51 virtual std::string kind() const OVERRIDE; | 55 virtual std::string kind() const OVERRIDE; |
| 52 | 56 |
| 53 // webrtc::AudioTrackInterface implementation. | 57 // webrtc::AudioTrackInterface implementation. |
| 54 virtual void AddSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE; | 58 virtual void AddSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE; |
| 55 virtual void RemoveSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE; | 59 virtual void RemoveSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE; |
| 56 | 60 |
| 57 // cricket::AudioCapturer implementation. | 61 // cricket::AudioCapturer implementation. |
| 58 virtual void AddChannel(int channel_id) OVERRIDE; | 62 virtual void AddChannel(int channel_id) OVERRIDE; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 // from the audio track. | 80 // from the audio track. |
| 77 ScopedVector<WebRtcAudioSinkAdapter> sink_adapters_; | 81 ScopedVector<WebRtcAudioSinkAdapter> sink_adapters_; |
| 78 | 82 |
| 79 // Protects |voe_channels_|. | 83 // Protects |voe_channels_|. |
| 80 mutable base::Lock lock_; | 84 mutable base::Lock lock_; |
| 81 }; | 85 }; |
| 82 | 86 |
| 83 } // namespace content | 87 } // namespace content |
| 84 | 88 |
| 85 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ | 89 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_LOCAL_AUDIO_TRACK_ADAPTER_H_ |
| OLD | NEW |