OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 channel_(channel), | 148 channel_(channel), |
149 source_(new RefCountedObject<VideoTrackSource>(&broadcaster_, | 149 source_(new RefCountedObject<VideoTrackSource>(&broadcaster_, |
150 true /* remote */)), | 150 true /* remote */)), |
151 track_(VideoTrackProxy::Create( | 151 track_(VideoTrackProxy::Create( |
152 rtc::Thread::Current(), | 152 rtc::Thread::Current(), |
153 worker_thread, | 153 worker_thread, |
154 VideoTrack::Create( | 154 VideoTrack::Create( |
155 track_id, | 155 track_id, |
156 VideoTrackSourceProxy::Create(rtc::Thread::Current(), | 156 VideoTrackSourceProxy::Create(rtc::Thread::Current(), |
157 worker_thread, | 157 worker_thread, |
158 source_)))) { | 158 source_), |
| 159 worker_thread))) { |
159 source_->SetState(MediaSourceInterface::kLive); | 160 source_->SetState(MediaSourceInterface::kLive); |
160 if (!channel_) { | 161 if (!channel_) { |
161 LOG(LS_ERROR) | 162 LOG(LS_ERROR) |
162 << "VideoRtpReceiver::VideoRtpReceiver: No video channel exists."; | 163 << "VideoRtpReceiver::VideoRtpReceiver: No video channel exists."; |
163 } else { | 164 } else { |
164 if (!channel_->SetSink(ssrc_, &broadcaster_)) { | 165 if (!channel_->SetSink(ssrc_, &broadcaster_)) { |
165 RTC_NOTREACHED(); | 166 RTC_NOTREACHED(); |
166 } | 167 } |
167 } | 168 } |
168 if (channel_) { | 169 if (channel_) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 234 } |
234 | 235 |
235 void VideoRtpReceiver::OnFirstPacketReceived(cricket::BaseChannel* channel) { | 236 void VideoRtpReceiver::OnFirstPacketReceived(cricket::BaseChannel* channel) { |
236 if (observer_) { | 237 if (observer_) { |
237 observer_->OnFirstPacketReceived(media_type()); | 238 observer_->OnFirstPacketReceived(media_type()); |
238 } | 239 } |
239 received_first_packet_ = true; | 240 received_first_packet_ = true; |
240 } | 241 } |
241 | 242 |
242 } // namespace webrtc | 243 } // namespace webrtc |
OLD | NEW |