| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 170 } |
| 171 | 171 |
| 172 // Register a video sink for this track. | 172 // Register a video sink for this track. |
| 173 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink, | 173 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
| 174 const rtc::VideoSinkWants& wants) override{}; | 174 const rtc::VideoSinkWants& wants) override{}; |
| 175 void RemoveSink( | 175 void RemoveSink( |
| 176 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) override{}; | 176 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) override{}; |
| 177 | 177 |
| 178 virtual VideoTrackSourceInterface* GetSource() const = 0; | 178 virtual VideoTrackSourceInterface* GetSource() const = 0; |
| 179 | 179 |
| 180 // Return the track input sink. I.e., frames sent to this sink are | |
| 181 // propagated to all renderers registered with the track. The | |
| 182 // returned sink must not change between calls. Currently, this | |
| 183 // method is used for remote tracks (VideoRtpReceiver); further | |
| 184 // refactoring is planned for this path, it's unclear if this method | |
| 185 // belongs here long term. | |
| 186 | |
| 187 // We do this instead of simply implementing the | |
| 188 // VideoSourceInterface directly, because if we did the latter, we'd | |
| 189 // need an OnFrame method in VideoTrackProxy, with a thread jump on | |
| 190 // each call. | |
| 191 | |
| 192 // TODO(nisse): It has a default implementation so that mock | |
| 193 // objects, in particular, chrome's MockWebRtcVideoTrack, doesn't | |
| 194 // need to know about it. Consider removing the implementation (or | |
| 195 // this comment) after refactoring dust settles. | |
| 196 virtual rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink() { | |
| 197 return nullptr; | |
| 198 }; | |
| 199 | |
| 200 protected: | 180 protected: |
| 201 virtual ~VideoTrackInterface() {} | 181 virtual ~VideoTrackInterface() {} |
| 202 }; | 182 }; |
| 203 | 183 |
| 204 // Interface for receiving audio data from a AudioTrack. | 184 // Interface for receiving audio data from a AudioTrack. |
| 205 class AudioTrackSinkInterface { | 185 class AudioTrackSinkInterface { |
| 206 public: | 186 public: |
| 207 virtual void OnData(const void* audio_data, | 187 virtual void OnData(const void* audio_data, |
| 208 int bits_per_sample, | 188 int bits_per_sample, |
| 209 int sample_rate, | 189 int sample_rate, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 297 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
| 318 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 298 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
| 319 | 299 |
| 320 protected: | 300 protected: |
| 321 virtual ~MediaStreamInterface() {} | 301 virtual ~MediaStreamInterface() {} |
| 322 }; | 302 }; |
| 323 | 303 |
| 324 } // namespace webrtc | 304 } // namespace webrtc |
| 325 | 305 |
| 326 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 306 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
| OLD | NEW |