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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Stops the local audio track. Called on the main render thread and | 55 // Stops the local audio track. Called on the main render thread and |
56 // should be called only once when audio track going away. | 56 // should be called only once when audio track going away. |
57 void Stop(); | 57 void Stop(); |
58 | 58 |
59 // Method called by the capturer to deliever the capture data. | 59 // Method called by the capturer to deliever the capture data. |
60 void CaptureData(const int16* audio_data, | 60 void CaptureData(const int16* audio_data, |
61 int number_of_channels, | 61 int number_of_channels, |
62 int number_of_frames, | 62 int number_of_frames, |
63 int audio_delay_milliseconds, | 63 int audio_delay_milliseconds, |
64 int volume); | 64 int volume, |
| 65 bool key_pressed); |
65 | 66 |
66 // Method called by the capturer to set the audio parameters used by source | 67 // Method called by the capturer to set the audio parameters used by source |
67 // of the capture data.. | 68 // of the capture data.. |
68 // Can be called on different user threads. | 69 // Can be called on different user threads. |
69 void SetCaptureFormat(const media::AudioParameters& params); | 70 void SetCaptureFormat(const media::AudioParameters& params); |
70 | 71 |
71 protected: | 72 protected: |
72 WebRtcLocalAudioTrack(const std::string& label, | 73 WebRtcLocalAudioTrack(const std::string& label, |
73 const scoped_refptr<WebRtcAudioCapturer>& capturer, | 74 const scoped_refptr<WebRtcAudioCapturer>& capturer, |
74 webrtc::AudioSourceInterface* track_source); | 75 webrtc::AudioSourceInterface* track_source); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 std::vector<int> voe_channels_; | 113 std::vector<int> voe_channels_; |
113 | 114 |
114 bool need_audio_processing_; | 115 bool need_audio_processing_; |
115 | 116 |
116 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); | 117 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); |
117 }; | 118 }; |
118 | 119 |
119 } // namespace content | 120 } // namespace content |
120 | 121 |
121 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ | 122 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
OLD | NEW |