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

Unified Diff: webrtc/modules/rtp_rtcp/source/tmmbr_help.h

Issue 1669323002: TMMBRSet become vector<rtcp::TmmbItem> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/tmmbr_help.h
diff --git a/webrtc/modules/rtp_rtcp/source/tmmbr_help.h b/webrtc/modules/rtp_rtcp/source/tmmbr_help.h
index b046e28a7308e602c6e6b024a4641574c928b8e2..cd948c370dc8855717c3d9cc3404a4d8f230d9be 100644
--- a/webrtc/modules/rtp_rtcp/source/tmmbr_help.h
+++ b/webrtc/modules/rtp_rtcp/source/tmmbr_help.h
@@ -12,12 +12,12 @@
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_
#include <vector>
-
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/typedefs.h"
namespace webrtc {
-class TMMBRSet
+class TMMBRSet : public std::vector<rtcp::TmmbItem>
{
public:
TMMBRSet();
@@ -28,18 +28,18 @@ public:
// Number of valid data items in set.
uint32_t lengthOfSet() const { return _lengthOfSet; }
// Presently allocated max size of set.
- uint32_t sizeOfSet() const { return _sizeOfSet; }
+ uint32_t sizeOfSet() const { return size(); }
philipel 2016/02/23 13:46:39 Maybe remove this function since you inherit the p
danilchap 2016/02/23 14:39:47 Would rather do it in other CL: removing this func
void clearSet() {
_lengthOfSet = 0;
}
uint32_t Tmmbr(int i) const {
- return _data.at(i).tmmbr;
+ return at(i).bitrate_bps() / 1000;
philipel 2016/02/23 13:46:39 Replace at() with operator[] since at() does bound
danilchap 2016/02/23 14:39:47 Done.
}
uint32_t PacketOH(int i) const {
- return _data.at(i).packet_oh;
+ return at(i).packet_overhead();
}
uint32_t Ssrc(int i) const {
- return _data.at(i).ssrc;
+ return at(i).ssrc();
}
void SetEntry(unsigned int i,
uint32_t tmmbrSet,
@@ -60,17 +60,6 @@ public:
void ClearEntry(uint32_t idx);
private:
- class SetElement {
- public:
- SetElement() : tmmbr(0), packet_oh(0), ssrc(0) {}
- uint32_t tmmbr;
- uint32_t packet_oh;
- uint32_t ssrc;
- };
-
- std::vector<SetElement> _data;
- // Number of places allocated.
- uint32_t _sizeOfSet;
// NUmber of places currently in use.
uint32_t _lengthOfSet;
};
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/tmmbr_help.cc » ('j') | webrtc/modules/rtp_rtcp/source/tmmbr_help.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698