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

Side by Side Diff: webrtc/modules/video_coding/main/source/media_opt_util.h

Issue 1226143013: Merge methods for configuring NACK/FEC/hybrid. (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
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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_
13 13
14 #include <math.h> 14 #include <math.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 16
17 #include "webrtc/base/exp_filter.h" 17 #include "webrtc/base/exp_filter.h"
18 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/modules/video_coding/main/source/internal_defines.h" 19 #include "webrtc/modules/video_coding/main/source/internal_defines.h"
19 #include "webrtc/modules/video_coding/main/source/qm_select.h" 20 #include "webrtc/modules/video_coding/main/source/qm_select.h"
20 #include "webrtc/system_wrappers/interface/trace.h" 21 #include "webrtc/system_wrappers/interface/trace.h"
21 #include "webrtc/typedefs.h" 22 #include "webrtc/typedefs.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 namespace media_optimization { 25 namespace media_optimization {
25 26
26 // Number of time periods used for (max) window filter for packet loss 27 // Number of time periods used for (max) window filter for packet loss
27 // TODO (marpan): set reasonable window size for filtered packet loss, 28 // TODO (marpan): set reasonable window size for filtered packet loss,
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 uint8_t lossPr255); 329 uint8_t lossPr255);
329 330
330 void Reset(int64_t nowMs); 331 void Reset(int64_t nowMs);
331 332
332 void Release(); 333 void Release();
333 334
334 private: 335 private:
335 // Sets the available loss protection methods. 336 // Sets the available loss protection methods.
336 void UpdateMaxLossHistory(uint8_t lossPr255, int64_t now); 337 void UpdateMaxLossHistory(uint8_t lossPr255, int64_t now);
337 uint8_t MaxFilteredLossPr(int64_t nowMs) const; 338 uint8_t MaxFilteredLossPr(int64_t nowMs) const;
338 VCMProtectionMethod* _selectedMethod; 339 rtc::scoped_ptr<VCMProtectionMethod> _selectedMethod;
339 VCMProtectionParameters _currentParameters; 340 VCMProtectionParameters _currentParameters;
340 int64_t _rtt; 341 int64_t _rtt;
341 float _lossPr; 342 float _lossPr;
342 float _bitRate; 343 float _bitRate;
343 float _frameRate; 344 float _frameRate;
344 float _keyFrameSize; 345 float _keyFrameSize;
345 uint8_t _fecRateKey; 346 uint8_t _fecRateKey;
346 uint8_t _fecRateDelta; 347 uint8_t _fecRateDelta;
347 int64_t _lastPrUpdateT; 348 int64_t _lastPrUpdateT;
348 int64_t _lastPacketPerFrameUpdateT; 349 int64_t _lastPacketPerFrameUpdateT;
349 int64_t _lastPacketPerFrameUpdateTKey; 350 int64_t _lastPacketPerFrameUpdateTKey;
350 rtc::ExpFilter _lossPr255; 351 rtc::ExpFilter _lossPr255;
351 VCMLossProbabilitySample _lossPrHistory[kLossPrHistorySize]; 352 VCMLossProbabilitySample _lossPrHistory[kLossPrHistorySize];
352 uint8_t _shortMaxLossPr255; 353 uint8_t _shortMaxLossPr255;
353 rtc::ExpFilter _packetsPerFrame; 354 rtc::ExpFilter _packetsPerFrame;
354 rtc::ExpFilter _packetsPerFrameKey; 355 rtc::ExpFilter _packetsPerFrameKey;
355 uint16_t _codecWidth; 356 uint16_t _codecWidth;
356 uint16_t _codecHeight; 357 uint16_t _codecHeight;
357 int _numLayers; 358 int _numLayers;
358 }; 359 };
359 360
360 } // namespace media_optimization 361 } // namespace media_optimization
361 } // namespace webrtc 362 } // namespace webrtc
362 363
363 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_ 364 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698