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

Side by Side Diff: webrtc/modules/video_coding/main/source/media_optimization.cc

Issue 1415693002: Remove VideoFrameType aliases for FrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // size_bytes. 365 // size_bytes.
366 encoded_frame_samples_.back().size_bytes += encoded_length; 366 encoded_frame_samples_.back().size_bytes += encoded_length;
367 encoded_frame_samples_.back().time_complete_ms = now_ms; 367 encoded_frame_samples_.back().time_complete_ms = now_ms;
368 } else { 368 } else {
369 encoded_frame_samples_.push_back( 369 encoded_frame_samples_.push_back(
370 EncodedFrameSample(encoded_length, timestamp, now_ms)); 370 EncodedFrameSample(encoded_length, timestamp, now_ms));
371 } 371 }
372 UpdateSentBitrate(now_ms); 372 UpdateSentBitrate(now_ms);
373 UpdateSentFramerate(); 373 UpdateSentFramerate();
374 if (encoded_length > 0) { 374 if (encoded_length > 0) {
375 const bool delta_frame = encoded_image._frameType != kKeyFrame; 375 const bool delta_frame = encoded_image._frameType != kVideoFrameKey;
376 376
377 frame_dropper_->Fill(encoded_length, delta_frame); 377 frame_dropper_->Fill(encoded_length, delta_frame);
378 if (max_payload_size_ > 0 && encoded_length > 0) { 378 if (max_payload_size_ > 0 && encoded_length > 0) {
379 const float min_packets_per_frame = 379 const float min_packets_per_frame =
380 encoded_length / static_cast<float>(max_payload_size_); 380 encoded_length / static_cast<float>(max_payload_size_);
381 if (delta_frame) { 381 if (delta_frame) {
382 loss_prot_logic_->UpdatePacketsPerFrame(min_packets_per_frame, 382 loss_prot_logic_->UpdatePacketsPerFrame(min_packets_per_frame,
383 clock_->TimeInMilliseconds()); 383 clock_->TimeInMilliseconds());
384 } else { 384 } else {
385 loss_prot_logic_->UpdatePacketsPerFrameKey( 385 loss_prot_logic_->UpdatePacketsPerFrameKey(
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 if (target_bit_rate_ > 641 if (target_bit_rate_ >
642 suspension_threshold_bps_ + suspension_window_bps_) { 642 suspension_threshold_bps_ + suspension_window_bps_) {
643 video_suspended_ = false; 643 video_suspended_ = false;
644 } 644 }
645 } 645 }
646 } 646 }
647 } 647 }
648 648
649 } // namespace media_optimization 649 } // namespace media_optimization
650 } // namespace webrtc 650 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698