OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 26 matching lines...) Expand all Loading... | |
37 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 37 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
38 RTC_DCHECK(sink != nullptr); | 38 RTC_DCHECK(sink != nullptr); |
39 RTC_DCHECK(FindSinkPair(sink)); | 39 RTC_DCHECK(FindSinkPair(sink)); |
40 sinks_.erase(std::remove_if(sinks_.begin(), sinks_.end(), | 40 sinks_.erase(std::remove_if(sinks_.begin(), sinks_.end(), |
41 [sink](const SinkPair& sink_pair) { | 41 [sink](const SinkPair& sink_pair) { |
42 return sink_pair.sink == sink; | 42 return sink_pair.sink == sink; |
43 }), | 43 }), |
44 sinks_.end()); | 44 sinks_.end()); |
45 } | 45 } |
46 | 46 |
47 void VideoSourceBase::GetInfo(VideoSourceInfo *info) { | |
perkj_webrtc
2016/03/20 15:01:46
Can you leave this as a pure virtual?
nisse-webrtc
2016/03/23 14:07:02
I could, but then it needs to be implemented in Vi
| |
48 *info = VideoSourceInfo(); | |
49 } | |
50 | |
47 VideoSourceBase::SinkPair* VideoSourceBase::FindSinkPair( | 51 VideoSourceBase::SinkPair* VideoSourceBase::FindSinkPair( |
48 const VideoSinkInterface<cricket::VideoFrame>* sink) { | 52 const VideoSinkInterface<cricket::VideoFrame>* sink) { |
49 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 53 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
50 auto sink_pair_it = std::find_if( | 54 auto sink_pair_it = std::find_if( |
51 sinks_.begin(), sinks_.end(), | 55 sinks_.begin(), sinks_.end(), |
52 [sink](const SinkPair& sink_pair) { return sink_pair.sink == sink; }); | 56 [sink](const SinkPair& sink_pair) { return sink_pair.sink == sink; }); |
53 if (sink_pair_it != sinks_.end()) { | 57 if (sink_pair_it != sinks_.end()) { |
54 return &*sink_pair_it; | 58 return &*sink_pair_it; |
55 } | 59 } |
56 return nullptr; | 60 return nullptr; |
57 } | 61 } |
58 | 62 |
59 } // namespace rtc | 63 } // namespace rtc |
OLD | NEW |