Chromium Code Reviews| Index: webrtc/api/videotracksource.cc |
| diff --git a/webrtc/api/videotracksource.cc b/webrtc/api/videotracksource.cc |
| index f8212d7a70cab20cfce2d4dc5349bb172b06cc4f..4c8691fa31fbea075ab0fa8a9fe25583cc5d7df9 100644 |
| --- a/webrtc/api/videotracksource.cc |
| +++ b/webrtc/api/videotracksource.cc |
| @@ -12,8 +12,6 @@ |
| #include <string> |
| -#include "webrtc/base/bind.h" |
| - |
| namespace webrtc { |
| VideoTrackSource::VideoTrackSource( |
| @@ -39,22 +37,20 @@ void VideoTrackSource::OnSourceDestroyed() { |
| void VideoTrackSource::AddOrUpdateSink( |
| rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
| const rtc::VideoSinkWants& wants) { |
| + RTC_CHECK(worker_thread_->IsCurrent()); |
|
nisse-webrtc
2016/04/05 10:13:46
These RTC_CHECKs are now the only use of |worker_t
perkj_webrtc
2016/04/05 11:02:37
yes please and name accordingly.
nisse-webrtc
2016/04/05 11:43:55
I'm deleting the constructor argument as well (the
|
| if (!source_) { |
| return; |
| } |
| - worker_thread_->Invoke<void>(rtc::Bind( |
| - &rtc::VideoSourceInterface<cricket::VideoFrame>::AddOrUpdateSink, source_, |
| - sink, wants)); |
| + source_->AddOrUpdateSink(sink, wants); |
| } |
| void VideoTrackSource::RemoveSink( |
| rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { |
| + RTC_CHECK(worker_thread_->IsCurrent()); |
| if (!source_) { |
| return; |
| } |
| - worker_thread_->Invoke<void>( |
| - rtc::Bind(&rtc::VideoSourceInterface<cricket::VideoFrame>::RemoveSink, |
| - source_, sink)); |
| + source_->RemoveSink(sink); |
| } |
| } // namespace webrtc |