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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
13
14 #include "webrtc/base/basictypes.h"
15
16 namespace webrtc {
17 namespace rtcp {
18 // RFC5104, Section 3.5.4
19 // 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
20 // Temporary Maximum Media Stream Bit Rate Request.
21 // Used both by TMMBR and TMMBN rtcp packets.
22 class Timber {
23 public:
24 static const size_t kLength = 8;
25
26 Timber() : ssrc_(0), bitrate_bps_(0), packet_overhead_(0) {}
27 Timber(uint32_t ssrc, uint32_t bitrate_bps, uint16_t overhead);
28
29 void Parse(const uint8_t* buffer);
30 void Create(uint8_t* buffer) const;
31
32 void set_ssrc(uint32_t ssrc) { ssrc_ = ssrc; }
33 void set_bitrate_bps(uint32_t bitrate_bps) { bitrate_bps_ = bitrate_bps; }
34 void set_packet_overhead(uint16_t overhead);
35
36 uint32_t ssrc() const { return ssrc_; }
37 uint32_t bitrate_bps() const { return bitrate_bps_; }
38 uint16_t packet_overhead() const { return packet_overhead_; }
39
40 private:
41 // Media stream id.
42 uint32_t ssrc_;
43 // Maximum total media bit rate that the media receiver is
44 // currently prepared to accept for this media stream.
45 uint32_t bitrate_bps_;
46 // Per-packet overhead that the media receiver has observed
47 // for this media stream at its chosen reference protocol layer.
48 uint16_t packet_overhead_;
49 };
50 } // namespace rtcp
51 } // namespace webrtc
52 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TIMBER_H_
OLDNEW
« 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