OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MEDIA_STREAM_AUDIO_TRACK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/renderer/media/media_stream_track.h" | 9 #include "content/renderer/media/media_stream_track.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Add a sink to the track. This function will trigger a OnSetFormat() | 27 // Add a sink to the track. This function will trigger a OnSetFormat() |
28 // call on the |sink|. | 28 // call on the |sink|. |
29 // Called on the main render thread. | 29 // Called on the main render thread. |
30 virtual void AddSink(MediaStreamAudioSink* sink) = 0; | 30 virtual void AddSink(MediaStreamAudioSink* sink) = 0; |
31 | 31 |
32 // Remove a sink from the track. | 32 // Remove a sink from the track. |
33 // Called on the main render thread. | 33 // Called on the main render thread. |
34 virtual void RemoveSink(MediaStreamAudioSink* sink) = 0; | 34 virtual void RemoveSink(MediaStreamAudioSink* sink) = 0; |
35 | 35 |
36 // TODO(tommi, xians): Remove this method. | 36 // NOTE: This can return null if the WebRTC audio pipeline is not being used. |
| 37 // TODO(tommi, xians): Remove this method. http://crbug.com/577874 |
37 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); | 38 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); |
38 | 39 |
39 // Returns the output format of the capture source. May return an invalid | 40 // Returns the output format of the capture source. May return an invalid |
40 // AudioParameters if the format is not yet available. | 41 // AudioParameters if the format is not yet available. |
41 // Called on the main render thread. | 42 // Called on the main render thread. |
42 // TODO(tommi): This method appears to only be used by Pepper and in fact | 43 // TODO(tommi): This method appears to only be used by Pepper and in fact |
43 // does not appear to be necessary there. We should remove it since it adds | 44 // does not appear to be necessary there. We should remove it since it adds |
44 // to the complexity of all types of audio tracks+source implementations. | 45 // to the complexity of all types of audio tracks+source implementations. |
| 46 // http://crbug.com/577874 |
45 virtual media::AudioParameters GetOutputFormat() const = 0; | 47 virtual media::AudioParameters GetOutputFormat() const = 0; |
46 | 48 |
47 private: | 49 private: |
48 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrack); | 50 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrack); |
49 }; | 51 }; |
50 | 52 |
51 } // namespace content | 53 } // namespace content |
52 | 54 |
53 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ | 55 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_H_ |
OLD | NEW |