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 23 matching lines...) Expand all Loading... |
34 uint32_t ssrcSet); | 34 uint32_t ssrcSet); |
35 | 35 |
36 void AddEntry(uint32_t tmmbrSet, uint32_t packetOHSet, uint32_t ssrcSet); | 36 void AddEntry(uint32_t tmmbrSet, uint32_t packetOHSet, uint32_t ssrcSet); |
37 | 37 |
38 // Remove one entry from table, and move all others down. | 38 // Remove one entry from table, and move all others down. |
39 void RemoveEntry(uint32_t sourceIdx); | 39 void RemoveEntry(uint32_t sourceIdx); |
40 }; | 40 }; |
41 | 41 |
42 class TMMBRHelp { | 42 class TMMBRHelp { |
43 public: | 43 public: |
44 TMMBRSet* CandidateSet(); | 44 static std::vector<rtcp::TmmbItem> FindBoundingSet( |
45 | 45 std::vector<rtcp::TmmbItem> candidates); |
46 TMMBRSet* VerifyAndAllocateCandidateSet(const uint32_t minimumSize); | |
47 std::vector<rtcp::TmmbItem> FindTMMBRBoundingSet(); | |
48 | 46 |
49 static bool IsOwner(const std::vector<rtcp::TmmbItem>& bounding, | 47 static bool IsOwner(const std::vector<rtcp::TmmbItem>& bounding, |
50 uint32_t ssrc); | 48 uint32_t ssrc); |
51 | 49 |
52 bool CalcMinBitRate(uint32_t* minBitrateKbit) const; | 50 static uint64_t CalcMinBitrateBps( |
53 | 51 const std::vector<rtcp::TmmbItem>& candidates); |
54 static void FindBoundingSet(std::vector<rtcp::TmmbItem> candidates, | |
55 std::vector<rtcp::TmmbItem>* bounding_set); | |
56 | |
57 private: | |
58 TMMBRSet _candidateSet; | |
59 }; | 52 }; |
60 } // namespace webrtc | 53 } // namespace webrtc |
61 | 54 |
62 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ | 55 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_ |
OLD | NEW |