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 WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H 12 #define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H 13 14 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" 15 16 #include "webrtc/voice_engine/shared_data.h" 17 18 namespace webrtc { 19 20 class VoERTP_RTCPImpl : public VoERTP_RTCP 21 { 22 public: 23 // RTCP 24 virtual int SetRTCPStatus(int channel, bool enable); 25 26 virtual int GetRTCPStatus(int channel, bool& enabled); 27 28 virtual int SetRTCP_CNAME(int channel, const char cName[256]); 29 30 virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]); 31 32 virtual int GetRemoteRTCPReceiverInfo(int channel, 33 uint32_t& NTPHigh, 34 uint32_t& NTPLow, 35 uint32_t& receivedPacketCount, 36 uint64_t& receivedOctetCount, 37 uint32_t& jitter, 38 uint16_t& fractionLost, 39 uint32_t& cumulativeLost, 40 int32_t& rttMs); 41 42 // SSRC 43 virtual int SetLocalSSRC(int channel, unsigned int ssrc); 44 45 virtual int GetLocalSSRC(int channel, unsigned int& ssrc); 46 47 virtual int GetRemoteSSRC(int channel, unsigned int& ssrc); 48 49 // RTP Header Extension for Client-to-Mixer Audio Level Indication 50 virtual int SetSendAudioLevelIndicationStatus(int channel, 51 bool enable, 52 unsigned char id); 53 virtual int SetReceiveAudioLevelIndicationStatus(int channel, 54 bool enable, 55 unsigned char id); 56 57 // RTP Header Extension for Absolute Sender Time 58 virtual int SetSendAbsoluteSenderTimeStatus(int channel, 59 bool enable, 60 unsigned char id); 61 virtual int SetReceiveAbsoluteSenderTimeStatus(int channel, 62 bool enable, 63 unsigned char id); 64 65 // Statistics 66 virtual int GetRTPStatistics(int channel, 67 unsigned int& averageJitterMs, 68 unsigned int& maxJitterMs, 69 unsigned int& discardedPackets, 70 unsigned int& cumulativeLost); 71 72 virtual int GetRTCPStatistics(int channel, CallStatistics& stats); 73 74 virtual int GetRemoteRTCPReportBlocks( 75 int channel, std::vector<ReportBlock>* report_blocks); 76 77 // RED 78 virtual int SetREDStatus(int channel, 79 bool enable, 80 int redPayloadtype = -1); 81 82 virtual int GetREDStatus(int channel, bool& enabled, int& redPayloadtype); 83 84 //NACK 85 virtual int SetNACKStatus(int channel, 86 bool enable, 87 int maxNoPackets); 88 89 // Store RTP and RTCP packets and dump to file (compatible with rtpplay) 90 virtual int StartRTPDump(int channel, 91 const char fileNameUTF8[1024], 92 RTPDirections direction = kRtpIncoming); 93 94 virtual int StopRTPDump(int channel, 95 RTPDirections direction = kRtpIncoming); 96 97 virtual int RTPDumpIsActive(int channel, 98 RTPDirections direction = kRtpIncoming); 99 100 virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network, 101 int video_channel); 102 protected: 103 VoERTP_RTCPImpl(voe::SharedData* shared); 104 virtual ~VoERTP_RTCPImpl(); 105 106 private: 107 voe::SharedData* _shared; 108 }; 109 110 } // namespace webrtc 111 112 #endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H 113