OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 const VideoFrame& video_frame) { | 311 const VideoFrame& video_frame) { |
312 // TODO(pbos): Wire up config_.render->IsTextureSupported() and convert if not | 312 // TODO(pbos): Wire up config_.render->IsTextureSupported() and convert if not |
313 // supported. Or provide methods for converting a texture frame in | 313 // supported. Or provide methods for converting a texture frame in |
314 // VideoFrame. | 314 // VideoFrame. |
315 | 315 |
316 if (config_.renderer != nullptr) | 316 if (config_.renderer != nullptr) |
317 config_.renderer->RenderFrame( | 317 config_.renderer->RenderFrame( |
318 video_frame, | 318 video_frame, |
319 video_frame.render_time_ms() - clock_->TimeInMilliseconds()); | 319 video_frame.render_time_ms() - clock_->TimeInMilliseconds()); |
320 | 320 |
321 stats_proxy_->OnRenderedFrame(); | 321 stats_proxy_->OnRenderedFrame(video_frame.width(), video_frame.height()); |
322 | 322 |
323 return 0; | 323 return 0; |
324 } | 324 } |
325 | 325 |
326 void VideoReceiveStream::SignalNetworkState(NetworkState state) { | 326 void VideoReceiveStream::SignalNetworkState(NetworkState state) { |
327 if (state == kNetworkUp) | 327 if (state == kNetworkUp) |
328 SetRtcpMode(config_.rtp.rtcp_mode); | 328 SetRtcpMode(config_.rtp.rtcp_mode); |
329 if (state == kNetworkDown) | 329 if (state == kNetworkDown) |
330 vie_channel_->SetRTCPMode(kRtcpOff); | 330 vie_channel_->SetRTCPMode(kRtcpOff); |
331 } | 331 } |
332 | 332 |
333 void VideoReceiveStream::SetRtcpMode(newapi::RtcpMode mode) { | 333 void VideoReceiveStream::SetRtcpMode(newapi::RtcpMode mode) { |
334 switch (mode) { | 334 switch (mode) { |
335 case newapi::kRtcpCompound: | 335 case newapi::kRtcpCompound: |
336 vie_channel_->SetRTCPMode(kRtcpCompound); | 336 vie_channel_->SetRTCPMode(kRtcpCompound); |
337 break; | 337 break; |
338 case newapi::kRtcpReducedSize: | 338 case newapi::kRtcpReducedSize: |
339 vie_channel_->SetRTCPMode(kRtcpNonCompound); | 339 vie_channel_->SetRTCPMode(kRtcpNonCompound); |
340 break; | 340 break; |
341 } | 341 } |
342 } | 342 } |
343 } // namespace internal | 343 } // namespace internal |
344 } // namespace webrtc | 344 } // namespace webrtc |
OLD | NEW |