aboutsummaryrefslogtreecommitdiff
path: root/talk/app/webrtc/mediastreaminterface.h
diff options
context:
space:
mode:
authormallinath@webrtc.org <mallinath@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-03 16:57:16 +0000
committermallinath@webrtc.org <mallinath@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-03 16:57:16 +0000
commit67ee6b9a6260fa80b83326c4b4fec8857c0e578c (patch)
treed3fa9d2520edad8f96494a9e0f9e247c9ab8a54f /talk/app/webrtc/mediastreaminterface.h
parent422fdbf5028ac2540599170675dcf1af38545c22 (diff)
downloadwebrtc-67ee6b9a6260fa80b83326c4b4fec8857c0e578c.tar.gz
Update talk to 60923971
Review URL: https://webrtc-codereview.appspot.com/7909004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5475 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'talk/app/webrtc/mediastreaminterface.h')
-rw-r--r--talk/app/webrtc/mediastreaminterface.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/talk/app/webrtc/mediastreaminterface.h b/talk/app/webrtc/mediastreaminterface.h
index b2c4468fb9..96d09428ab 100644
--- a/talk/app/webrtc/mediastreaminterface.h
+++ b/talk/app/webrtc/mediastreaminterface.h
@@ -147,15 +147,33 @@ class VideoTrackInterface : public MediaStreamTrackInterface {
class AudioSourceInterface : public MediaSourceInterface {
};
+// Interface for receiving audio data from a AudioTrack.
+class AudioTrackSinkInterface {
+ public:
+ virtual void OnData(const void* audio_data,
+ int bits_per_sample,
+ int sample_rate,
+ int number_of_channels,
+ int number_of_frames) = 0;
+ protected:
+ virtual ~AudioTrackSinkInterface() {}
+};
+
class AudioTrackInterface : public MediaStreamTrackInterface {
public:
// TODO(xians): Figure out if the following interface should be const or not.
virtual AudioSourceInterface* GetSource() const = 0;
+ // Adds/Removes a sink that will receive the audio data from the track.
+ // TODO(xians): Make them pure virtual after Chrome implements these
+ // interfaces.
+ virtual void AddSink(AudioTrackSinkInterface* sink) {}
+ virtual void RemoveSink(AudioTrackSinkInterface* sink) {}
+
// Gets a pointer to the audio renderer of this AudioTrack.
// The pointer is valid for the lifetime of this AudioTrack.
- // TODO(xians): Make the following interface pure virtual once Chrome has its
- // implementation.
+ // TODO(xians): Remove the following interface after Chrome switches to
+ // AddSink() and RemoveSink() interfaces.
virtual cricket::AudioRenderer* GetRenderer() { return NULL; }
protected: