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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.h

Issue 1576223003: [rtp_rtcp] Added structure to use as item in TMMBN/TMMBR (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.h
new file mode 100644
index 0000000000000000000000000000000000000000..0204a887d966314e11a21c954eff8cf70b10171f
--- /dev/null
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016 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.
+ */
+
+#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
+#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
+
+#include "webrtc/base/basictypes.h"
+
+namespace webrtc {
+namespace rtcp {
+// RFC5104, Section 3.5.4
+// Timber is human-friendly name for TMMBR:
åsapersson 2016/02/04 13:39:31 I think i would prefer this to be called TmmbrItem
danilchap 2016/02/04 14:08:37 It can be used both as request and notification, i
+// Temporary Maximum Media Stream Bit Rate Request.
+// Used both by TMMBR and TMMBN rtcp packets.
+class Timber {
+ public:
+ static const size_t kLength = 8;
+
+ Timber() : ssrc_(0), bitrate_bps_(0), packet_overhead_(0) {}
+ Timber(uint32_t ssrc, uint32_t bitrate_bps, uint16_t overhead);
+
+ void Parse(const uint8_t* buffer);
+ void Create(uint8_t* buffer) const;
+
+ void set_ssrc(uint32_t ssrc) { ssrc_ = ssrc; }
+ void set_bitrate_bps(uint32_t bitrate_bps) { bitrate_bps_ = bitrate_bps; }
+ void set_packet_overhead(uint16_t overhead);
+
+ uint32_t ssrc() const { return ssrc_; }
+ uint32_t bitrate_bps() const { return bitrate_bps_; }
+ uint16_t packet_overhead() const { return packet_overhead_; }
+
+ private:
+ // Media stream id.
+ uint32_t ssrc_;
+ // Maximum total media bit rate that the media receiver is
+ // currently prepared to accept for this media stream.
+ uint32_t bitrate_bps_;
+ // Per-packet overhead that the media receiver has observed
+ // for this media stream at its chosen reference protocol layer.
+ uint16_t packet_overhead_;
+};
+} // namespace rtcp
+} // namespace webrtc
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/timber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698