Home | History | Annotate | Download | only in include
      1 /*
      2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
      3  *
      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
      6  *  tree. An additional intellectual property rights grant can be found
      7  *  in the file PATENTS.  All contributing project authors may
      8  *  be found in the AUTHORS file in the root of the source tree.
      9  */
     10 
     11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_
     12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_
     13 
     14 #include "webrtc/typedefs.h"
     15 
     16 #define BWE_MAX(a,b) ((a)>(b)?(a):(b))
     17 #define BWE_MIN(a,b) ((a)<(b)?(a):(b))
     18 
     19 namespace webrtc {
     20 enum BandwidthUsage
     21 {
     22     kBwNormal = 0,
     23     kBwUnderusing = 1,
     24     kBwOverusing = 2,
     25 };
     26 
     27 enum RateControlState
     28 {
     29     kRcHold,
     30     kRcIncrease,
     31     kRcDecrease
     32 };
     33 
     34 enum RateControlRegion
     35 {
     36     kRcNearMax,
     37     kRcAboveMax,
     38     kRcMaxUnknown
     39 };
     40 
     41 class RateControlInput
     42 {
     43 public:
     44     RateControlInput(BandwidthUsage bwState,
     45                      uint32_t incomingBitRate,
     46                      double noiseVar)
     47         : _bwState(bwState),
     48           _incomingBitRate(incomingBitRate),
     49           _noiseVar(noiseVar) {}
     50 
     51     BandwidthUsage  _bwState;
     52     uint32_t      _incomingBitRate;
     53     double              _noiseVar;
     54 };
     55 }  // namespace webrtc
     56 
     57 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_
     58