| OLD | NEW |
| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 int64_t nowMs) { | 592 int64_t nowMs) { |
| 593 _packetsPerFrameKey.Apply( | 593 _packetsPerFrameKey.Apply( |
| 594 static_cast<float>(nowMs - _lastPacketPerFrameUpdateTKey), nPackets); | 594 static_cast<float>(nowMs - _lastPacketPerFrameUpdateTKey), nPackets); |
| 595 _lastPacketPerFrameUpdateTKey = nowMs; | 595 _lastPacketPerFrameUpdateTKey = nowMs; |
| 596 } | 596 } |
| 597 | 597 |
| 598 void VCMLossProtectionLogic::UpdateKeyFrameSize(float keyFrameSize) { | 598 void VCMLossProtectionLogic::UpdateKeyFrameSize(float keyFrameSize) { |
| 599 _keyFrameSize = keyFrameSize; | 599 _keyFrameSize = keyFrameSize; |
| 600 } | 600 } |
| 601 | 601 |
| 602 void VCMLossProtectionLogic::UpdateFrameSize(uint16_t width, uint16_t height) { | 602 void VCMLossProtectionLogic::UpdateFrameSize(size_t width, size_t height) { |
| 603 _codecWidth = width; | 603 _codecWidth = width; |
| 604 _codecHeight = height; | 604 _codecHeight = height; |
| 605 } | 605 } |
| 606 | 606 |
| 607 void VCMLossProtectionLogic::UpdateNumLayers(int numLayers) { | 607 void VCMLossProtectionLogic::UpdateNumLayers(int numLayers) { |
| 608 _numLayers = (numLayers == 0) ? 1 : numLayers; | 608 _numLayers = (numLayers == 0) ? 1 : numLayers; |
| 609 } | 609 } |
| 610 | 610 |
| 611 bool VCMLossProtectionLogic::UpdateMethod() { | 611 bool VCMLossProtectionLogic::UpdateMethod() { |
| 612 if (!_selectedMethod) | 612 if (!_selectedMethod) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 _shortMaxLossPr255 = 0; | 648 _shortMaxLossPr255 = 0; |
| 649 Release(); | 649 Release(); |
| 650 } | 650 } |
| 651 | 651 |
| 652 void VCMLossProtectionLogic::Release() { | 652 void VCMLossProtectionLogic::Release() { |
| 653 _selectedMethod.reset(); | 653 _selectedMethod.reset(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace media_optimization | 656 } // namespace media_optimization |
| 657 } // namespace webrtc | 657 } // namespace webrtc |
| OLD | NEW |