mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-19 16:47:50 +01:00

In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC from src/webrtc to src/ (in order to preserve an healthy git history). This CL takes care of fixing header guards, #include paths, etc... NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true TBR=tommi@webrtc.org Bug: chromium:611808 Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578 Reviewed-on: https://webrtc-review.googlesource.com/1561 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Henrik Kjellander <kjellander@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19846}
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
/*
|
|
* 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 MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMB_ITEM_H_
|
|
#define MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMB_ITEM_H_
|
|
|
|
#include "rtc_base/basictypes.h"
|
|
|
|
namespace webrtc {
|
|
namespace rtcp {
|
|
// RFC5104, Section 3.5.4
|
|
// Temporary Maximum Media Stream Bitrate Request/Notification.
|
|
// Used both by TMMBR and TMMBN rtcp packets.
|
|
class TmmbItem {
|
|
public:
|
|
static const size_t kLength = 8;
|
|
|
|
TmmbItem() : ssrc_(0), bitrate_bps_(0), packet_overhead_(0) {}
|
|
TmmbItem(uint32_t ssrc, uint64_t bitrate_bps, uint16_t overhead);
|
|
|
|
bool Parse(const uint8_t* buffer);
|
|
void Create(uint8_t* buffer) const;
|
|
|
|
void set_ssrc(uint32_t ssrc) { ssrc_ = ssrc; }
|
|
void set_bitrate_bps(uint64_t bitrate_bps) { bitrate_bps_ = bitrate_bps; }
|
|
void set_packet_overhead(uint16_t overhead);
|
|
|
|
uint32_t ssrc() const { return ssrc_; }
|
|
uint64_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.
|
|
uint64_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 // MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMB_ITEM_H_
|