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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.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: 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_TMMB_ITEM_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMB_ITEM_H_
13
14 #include "webrtc/base/basictypes.h"
15
16 namespace webrtc {
17 namespace rtcp {
18 // RFC5104, Section 3.5.4
19 // Temporary Maximum Media Stream Bitrate Request/Notification.
20 // Used both by TMMBR and TMMBN rtcp packets.
21 class TmmbItem {
22 public:
23 static const size_t kLength = 8;
24
25 TmmbItem() : ssrc_(0), bitrate_bps_(0), packet_overhead_(0) {}
26 TmmbItem(uint32_t ssrc, uint32_t bitrate_bps, uint16_t overhead);
27
28 void Parse(const uint8_t* buffer);
29 void Create(uint8_t* buffer) const;
30
31 void set_ssrc(uint32_t ssrc) { ssrc_ = ssrc; }
32 void set_bitrate_bps(uint32_t bitrate_bps) { bitrate_bps_ = bitrate_bps; }
33 void set_packet_overhead(uint16_t overhead);
34
35 uint32_t ssrc() const { return ssrc_; }
36 uint32_t bitrate_bps() const { return bitrate_bps_; }
37 uint16_t packet_overhead() const { return packet_overhead_; }
38
39 private:
40 // Media stream id.
41 uint32_t ssrc_;
42 // Maximum total media bit rate that the media receiver is
43 // currently prepared to accept for this media stream.
44 uint32_t bitrate_bps_;
45 // Per-packet overhead that the media receiver has observed
46 // for this media stream at its chosen reference protocol layer.
47 uint16_t packet_overhead_;
48 };
49 } // namespace rtcp
50 } // namespace webrtc
51 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMB_ITEM_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698