2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #include "pc/video_track_source.h"
13 #include "rtc_base/checks.h"
17 VideoTrackSource::VideoTrackSource(bool remote
)
18 : state_(kInitializing
), remote_(remote
) {}
20 void VideoTrackSource::SetState(SourceState new_state
) {
21 RTC_DCHECK_RUN_ON(&signaling_thread_checker_
);
22 if (state_
!= new_state
) {
28 void VideoTrackSource::AddOrUpdateSink(
29 rtc::VideoSinkInterface
<VideoFrame
>* sink
,
30 const rtc::VideoSinkWants
& wants
) {
31 RTC_DCHECK(worker_thread_checker_
.IsCurrent());
32 source()->AddOrUpdateSink(sink
, wants
);
35 void VideoTrackSource::RemoveSink(rtc::VideoSinkInterface
<VideoFrame
>* sink
) {
36 RTC_DCHECK(worker_thread_checker_
.IsCurrent());
37 source()->RemoveSink(sink
);