Home | History | Annotate | Download | only in rtcp
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef MEDIA_CAST_TRANSPORT_RTCP_RTCP_BUILDER_H_
      6 #define MEDIA_CAST_TRANSPORT_RTCP_RTCP_BUILDER_H_
      7 
      8 #include <list>
      9 #include <string>
     10 #include <vector>
     11 
     12 #include "media/cast/transport/cast_transport_defines.h"
     13 #include "media/cast/transport/pacing/paced_sender.h"
     14 
     15 namespace media {
     16 namespace cast {
     17 namespace transport {
     18 
     19 class RtcpBuilder {
     20  public:
     21   explicit RtcpBuilder(PacedSender* const paced_packet_sender);
     22 
     23   virtual ~RtcpBuilder();
     24 
     25   void SendRtcpFromRtpSender(uint32 packet_type_flags,
     26                              const RtcpSenderInfo& sender_info,
     27                              const RtcpDlrrReportBlock& dlrr,
     28                              uint32 ssrc,
     29                              const std::string& c_name);
     30 
     31  private:
     32   bool BuildSR(const RtcpSenderInfo& sender_info, Packet* packet) const;
     33   bool BuildSdec(Packet* packet) const;
     34   bool BuildBye(Packet* packet) const;
     35   bool BuildDlrrRb(const RtcpDlrrReportBlock& dlrr,
     36                    Packet* packet) const;
     37 
     38   PacedSender* const transport_;  // Not owned by this class.
     39   uint32 ssrc_;
     40   std::string c_name_;
     41 
     42   DISALLOW_COPY_AND_ASSIGN(RtcpBuilder);
     43 };
     44 
     45 }  // namespace transport
     46 }  // namespace cast
     47 }  // namespace media
     48 
     49 #endif  // MEDIA_CAST_TRANSPORT_RTCP_RTCP_BUILDER_H_
     50