blob: 35704fe5a754d345b51c910bd27b654ba51e0d62 [file] [log] [blame]
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
#include "typedefs.h"
#include "critical_section_wrapper.h"
#ifndef NULL
#define NULL 0
namespace webrtc {
class TMMBRSet
void VerifyAndAllocateSet(WebRtc_UWord32 minimumSize);
WebRtc_UWord32* ptrTmmbrSet;
WebRtc_UWord32* ptrPacketOHSet;
WebRtc_UWord32* ptrSsrcSet;
WebRtc_UWord32 sizeOfSet;
WebRtc_UWord32 lengthOfSet;
class TMMBRHelp
TMMBRHelp(const bool audio);
virtual ~TMMBRHelp();
TMMBRSet* BoundingSet(); // used for debuging
TMMBRSet* CandidateSet();
TMMBRSet* BoundingSetToSend();
TMMBRSet* VerifyAndAllocateCandidateSet(const WebRtc_UWord32 minimumSize);
WebRtc_Word32 FindTMMBRBoundingSet(TMMBRSet*& boundingSet);
WebRtc_Word32 SetTMMBRBoundingSetToSend(const TMMBRSet* boundingSetToSend,
const WebRtc_UWord32 maxBitrateKbit);
bool IsOwner(const WebRtc_UWord32 ssrc,
const WebRtc_UWord32 length) const;
WebRtc_Word32 CalcMinMaxBitRate(const WebRtc_UWord32 totalPacketRate,
const WebRtc_UWord32 lengthOfBoundingSet,
WebRtc_UWord32& minBitrateKbit,
WebRtc_UWord32& maxBitrateKbit) const;
TMMBRSet* VerifyAndAllocateBoundingSet(WebRtc_UWord32 minimumSize);
WebRtc_Word32 VerifyAndAllocateBoundingSetToSend(WebRtc_UWord32 minimumSize);
WebRtc_Word32 FindTMMBRBoundingSet(WebRtc_Word32 numCandidates, TMMBRSet& candidateSet);
CriticalSectionWrapper* _criticalSection;
const bool _audio;
TMMBRSet _candidateSet;
TMMBRSet _boundingSet;
TMMBRSet _boundingSetToSend;
float* _ptrIntersectionBoundingSet;
float* _ptrMaxPRBoundingSet;
} // namespace webrtc