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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ |
13 | 13 |
14 #include <vector> | 14 #include <vector> |
15 #include "webrtc/base/criticalsection.h" | |
16 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" | 15 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" |
17 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
18 | 17 |
19 namespace webrtc { | 18 namespace webrtc { |
20 class TMMBRSet : public std::vector<rtcp::TmmbItem> | 19 class TMMBRSet : public std::vector<rtcp::TmmbItem> |
21 { | 20 { |
22 public: | 21 public: |
23 void VerifyAndAllocateSet(uint32_t minimumSize); | 22 void VerifyAndAllocateSet(uint32_t minimumSize); |
24 void VerifyAndAllocateSetKeepingData(uint32_t minimumSize); | 23 void VerifyAndAllocateSetKeepingData(uint32_t minimumSize); |
25 // Number of valid data items in set. | 24 // Number of valid data items in set. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 68 |
70 bool IsOwner(const uint32_t ssrc, const uint32_t length) const; | 69 bool IsOwner(const uint32_t ssrc, const uint32_t length) const; |
71 | 70 |
72 bool CalcMinBitRate(uint32_t* minBitrateKbit) const; | 71 bool CalcMinBitRate(uint32_t* minBitrateKbit) const; |
73 | 72 |
74 protected: | 73 protected: |
75 TMMBRSet* VerifyAndAllocateBoundingSet(uint32_t minimumSize); | 74 TMMBRSet* VerifyAndAllocateBoundingSet(uint32_t minimumSize); |
76 int32_t FindTMMBRBoundingSet(int32_t numCandidates, TMMBRSet& candidateSet); | 75 int32_t FindTMMBRBoundingSet(int32_t numCandidates, TMMBRSet& candidateSet); |
77 | 76 |
78 private: | 77 private: |
79 rtc::CriticalSection _criticalSection; | |
80 TMMBRSet _candidateSet; | 78 TMMBRSet _candidateSet; |
81 TMMBRSet _boundingSet; | 79 TMMBRSet _boundingSet; |
82 | 80 |
83 float* _ptrIntersectionBoundingSet; | 81 float* _ptrIntersectionBoundingSet; |
84 float* _ptrMaxPRBoundingSet; | 82 float* _ptrMaxPRBoundingSet; |
85 }; | 83 }; |
86 } // namespace webrtc | 84 } // namespace webrtc |
87 | 85 |
88 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ | 86 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ |
OLD | NEW |