OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 rtc::VideoSinkInterface<cricket::VideoFrame>* sink, | 43 rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
44 const rtc::VideoSinkWants& wants) { | 44 const rtc::VideoSinkWants& wants) { |
45 renderers_.AddOrUpdateSink(sink, wants); | 45 renderers_.AddOrUpdateSink(sink, wants); |
46 } | 46 } |
47 | 47 |
48 void VideoTrack::RemoveSink( | 48 void VideoTrack::RemoveSink( |
49 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { | 49 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { |
50 renderers_.RemoveSink(sink); | 50 renderers_.RemoveSink(sink); |
51 } | 51 } |
52 | 52 |
53 rtc::VideoSinkInterface<cricket::VideoFrame>* VideoTrack::GetSink() { | |
54 return &renderers_; | |
55 } | |
56 | |
57 bool VideoTrack::set_enabled(bool enable) { | 53 bool VideoTrack::set_enabled(bool enable) { |
58 renderers_.SetEnabled(enable); | 54 renderers_.SetEnabled(enable); |
59 return MediaStreamTrack<VideoTrackInterface>::set_enabled(enable); | 55 return MediaStreamTrack<VideoTrackInterface>::set_enabled(enable); |
60 } | 56 } |
61 | 57 |
62 rtc::scoped_refptr<VideoTrack> VideoTrack::Create( | 58 rtc::scoped_refptr<VideoTrack> VideoTrack::Create( |
63 const std::string& id, | 59 const std::string& id, |
64 VideoTrackSourceInterface* source) { | 60 VideoTrackSourceInterface* source) { |
65 rtc::RefCountedObject<VideoTrack>* track = | 61 rtc::RefCountedObject<VideoTrack>* track = |
66 new rtc::RefCountedObject<VideoTrack>(id, source); | 62 new rtc::RefCountedObject<VideoTrack>(id, source); |
67 return track; | 63 return track; |
68 } | 64 } |
69 | 65 |
70 } // namespace webrtc | 66 } // namespace webrtc |
OLD | NEW |