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

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

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Also revert VideoTrack test changes. 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
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
11 #include "webrtc/api/videotrack.h" 11 #include "webrtc/api/videotrack.h"
12 12
13 #include <string> 13 #include <string>
14 14
15 namespace webrtc { 15 namespace webrtc {
16 16
17 const char MediaStreamTrackInterface::kVideoKind[] = "video"; 17 const char MediaStreamTrackInterface::kVideoKind[] = "video";
18 18
19 VideoTrack::VideoTrack(const std::string& label, 19 VideoTrack::VideoTrack(const std::string& label,
20 VideoTrackSourceInterface* video_source) 20 VideoTrackSourceInterface* video_source)
21 : MediaStreamTrack<VideoTrackInterface>(label), 21 : MediaStreamTrack<VideoTrackInterface>(label),
22 video_source_(video_source) { 22 video_source_(video_source) {
23 RTC_CHECK(video_source);
23 } 24 }
24 25
25 VideoTrack::~VideoTrack() { 26 VideoTrack::~VideoTrack() {
26 } 27 }
27 28
28 std::string VideoTrack::kind() const { 29 std::string VideoTrack::kind() const {
29 return kVideoKind; 30 return kVideoKind;
30 } 31 }
31 32
32 void VideoTrack::AddOrUpdateSink( 33 void VideoTrack::AddOrUpdateSink(
(...skipping 25 matching lines...) Expand all
58 59
59 rtc::scoped_refptr<VideoTrack> VideoTrack::Create( 60 rtc::scoped_refptr<VideoTrack> VideoTrack::Create(
60 const std::string& id, 61 const std::string& id,
61 VideoTrackSourceInterface* source) { 62 VideoTrackSourceInterface* source) {
62 rtc::RefCountedObject<VideoTrack>* track = 63 rtc::RefCountedObject<VideoTrack>* track =
63 new rtc::RefCountedObject<VideoTrack>(id, source); 64 new rtc::RefCountedObject<VideoTrack>(id, source);
64 return track; 65 return track;
65 } 66 }
66 67
67 } // namespace webrtc 68 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698