Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 1228393008: Add resolution and fps stats to histograms. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/video_capture_input.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « webrtc/video/video_capture_input.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698