Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: webrtc/api/videotrack.cc

Issue 1765423005: Change VideoRtpReceiver to create remote VideoTrack and VideoTrackSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed up the comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/videotrack.h ('k') | webrtc/api/videotrack_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « webrtc/api/videotrack.h ('k') | webrtc/api/videotrack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698