1 /* 2 * Copyright (c) 2012 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 MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 12 #define MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 13 14 #include <memory> 15 #include <string> 16 #include <vector> 17 18 #include "modules/include/module.h" 19 #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h" 20 #include "rtc_base/deprecation.h" 21 22 namespace webrtc { 23 24 // DEPRECATED. Do not use. 25 class RtpRtcp : public Module, public RtpRtcpInterface { 26 public: 27 // Instantiates a deprecated version of the RtpRtcp module. 28 static std::unique_ptr<RtpRtcp> RTC_DEPRECATED Create(const Configuration & configuration)29 Create(const Configuration& configuration) { 30 return DEPRECATED_Create(configuration); 31 } 32 33 static std::unique_ptr<RtpRtcp> DEPRECATED_Create( 34 const Configuration& configuration); 35 36 // (TMMBR) Temporary Max Media Bit Rate 37 RTC_DEPRECATED virtual bool TMMBR() const = 0; 38 39 RTC_DEPRECATED virtual void SetTMMBRStatus(bool enable) = 0; 40 41 // Returns -1 on failure else 0. 42 RTC_DEPRECATED virtual int32_t AddMixedCNAME(uint32_t ssrc, 43 const char* cname) = 0; 44 45 // Returns -1 on failure else 0. 46 RTC_DEPRECATED virtual int32_t RemoveMixedCNAME(uint32_t ssrc) = 0; 47 48 // Returns remote CName. 49 // Returns -1 on failure else 0. 50 RTC_DEPRECATED virtual int32_t RemoteCNAME( 51 uint32_t remote_ssrc, 52 char cname[RTCP_CNAME_SIZE]) const = 0; 53 54 // (De)registers RTP header extension type and id. 55 // Returns -1 on failure else 0. 56 RTC_DEPRECATED virtual int32_t RegisterSendRtpHeaderExtension( 57 RTPExtensionType type, 58 uint8_t id) = 0; 59 60 // (APP) Sets application specific data. 61 // Returns -1 on failure else 0. 62 RTC_DEPRECATED virtual int32_t SetRTCPApplicationSpecificData( 63 uint8_t sub_type, 64 uint32_t name, 65 const uint8_t* data, 66 uint16_t length) = 0; 67 68 // Returns statistics of the amount of data sent. 69 // Returns -1 on failure else 0. 70 RTC_DEPRECATED virtual int32_t DataCountersRTP( 71 size_t* bytes_sent, 72 uint32_t* packets_sent) const = 0; 73 74 // Requests new key frame. 75 // using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1 SendPictureLossIndication()76 void SendPictureLossIndication() { SendRTCP(kRtcpPli); } 77 // using FIR, https://tools.ietf.org/html/rfc5104#section-4.3.1.2 SendFullIntraRequest()78 void SendFullIntraRequest() { SendRTCP(kRtcpFir); } 79 }; 80 81 } // namespace webrtc 82 83 #endif // MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 84