LCOV - code coverage report
Current view: top level - media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_packet - tmmbr.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 5 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_TMMBR_H_
      12             : #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBR_H_
      13             : 
      14             : #include <vector>
      15             : 
      16             : #include "webrtc/base/basictypes.h"
      17             : #include "webrtc/base/constructormagic.h"
      18             : #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h"
      19             : #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
      20             : 
      21             : namespace webrtc {
      22             : namespace rtcp {
      23             : class CommonHeader;
      24             : 
      25             : // Temporary Maximum Media Stream Bit Rate Request (TMMBR).
      26             : // RFC 5104, Section 4.2.1.
      27             : class Tmmbr : public Rtpfb {
      28             :  public:
      29             :   static constexpr uint8_t kFeedbackMessageType = 3;
      30             : 
      31           0 :   Tmmbr() {}
      32           0 :   ~Tmmbr() override {}
      33             : 
      34             :   // Parse assumes header is already parsed and validated.
      35             :   bool Parse(const CommonHeader& packet);
      36             : 
      37             :   void AddTmmbr(const TmmbItem& item);
      38             : 
      39           0 :   const std::vector<TmmbItem>& requests() const { return items_; }
      40             : 
      41             :  protected:
      42             :   bool Create(uint8_t* packet,
      43             :               size_t* index,
      44             :               size_t max_length,
      45             :               RtcpPacket::PacketReadyCallback* callback) const override;
      46             : 
      47             :  private:
      48           0 :   size_t BlockLength() const override {
      49             :     return kHeaderLength + kCommonFeedbackLength +
      50           0 :            TmmbItem::kLength * items_.size();
      51             :   }
      52             : 
      53             :   // Media ssrc is unused, shadow base class setter.
      54             :   void SetMediaSsrc(uint32_t ssrc);
      55             : 
      56             :   std::vector<TmmbItem> items_;
      57             : 
      58             :   RTC_DISALLOW_COPY_AND_ASSIGN(Tmmbr);
      59             : };
      60             : }  // namespace rtcp
      61             : }  // namespace webrtc
      62             : #endif  // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TMMBR_H_

Generated by: LCOV version 1.13