Index: webrtc/media/base/audiosource.h |
diff --git a/webrtc/media/base/audiorenderer.h b/webrtc/media/base/audiosource.h |
similarity index 58% |
copy from webrtc/media/base/audiorenderer.h |
copy to webrtc/media/base/audiosource.h |
index 4544c7fc634aeb96cb56b922df5929199e8b3664..97743bc2660254099e718ffbe8ba0e665110ad1d 100644 |
--- a/webrtc/media/base/audiorenderer.h |
+++ b/webrtc/media/base/audiosource.h |
@@ -8,40 +8,42 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#ifndef WEBRTC_MEDIA_BASE_AUDIORENDERER_H_ |
-#define WEBRTC_MEDIA_BASE_AUDIORENDERER_H_ |
+#ifndef WEBRTC_MEDIA_BASE_AUDIOSOURCE_H_ |
+#define WEBRTC_MEDIA_BASE_AUDIOSOURCE_H_ |
#include <cstddef> |
namespace cricket { |
-// Abstract interface for rendering the audio data. |
-class AudioRenderer { |
+// Abstract interface for providing the audio data. |
+// TODO(deadbeef): Rename this to AudioSourceInterface, and rename |
+// webrtc::AudioSourceInterface to AudioTrackSourceInterface. |
+class AudioSource { |
public: |
class Sink { |
public: |
- // Callback to receive data from the AudioRenderer. |
+ // Callback to receive data from the AudioSource. |
virtual void OnData(const void* audio_data, |
int bits_per_sample, |
int sample_rate, |
size_t number_of_channels, |
size_t number_of_frames) = 0; |
- // Called when the AudioRenderer is going away. |
+ // Called when the AudioSource is going away. |
virtual void OnClose() = 0; |
protected: |
virtual ~Sink() {} |
}; |
- // Sets a sink to the AudioRenderer. There can be only one sink connected |
- // to the renderer at a time. |
- virtual void SetSink(Sink* sink) {} |
+ // Sets a sink to the AudioSource. There can be only one sink connected |
+ // to the source at a time. |
+ virtual void SetSink(Sink* sink) = 0; |
protected: |
- virtual ~AudioRenderer() {} |
+ virtual ~AudioSource() {} |
}; |
} // namespace cricket |
-#endif // WEBRTC_MEDIA_BASE_AUDIORENDERER_H_ |
+#endif // WEBRTC_MEDIA_BASE_AUDIOSOURCE_H_ |