andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 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 | |
pbos@webrtc.org | 471ae72 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 14 | #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 15 | |
pbos@webrtc.org | 471ae72 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 16 | #include "webrtc/voice_engine/shared_data.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | class VoERTP_RTCPImpl : public VoERTP_RTCP |
| 21 | { |
| 22 | public: |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 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 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 30 | virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]); |
| 31 | |
| 32 | virtual int GetRemoteRTCPData(int channel, |
| 33 | unsigned int& NTPHigh, |
| 34 | unsigned int& NTPLow, |
| 35 | unsigned int& timestamp, |
| 36 | unsigned int& playoutTimestamp, |
| 37 | unsigned int* jitter = NULL, |
| 38 | unsigned short* fractionLost = NULL); |
| 39 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 40 | // SSRC |
| 41 | virtual int SetLocalSSRC(int channel, unsigned int ssrc); |
| 42 | |
| 43 | virtual int GetLocalSSRC(int channel, unsigned int& ssrc); |
| 44 | |
| 45 | virtual int GetRemoteSSRC(int channel, unsigned int& ssrc); |
| 46 | |
| 47 | // RTP Header Extension for Client-to-Mixer Audio Level Indication |
wu@webrtc.org | 9a82322 | 2014-03-06 23:49:08 +0000 | [diff] [blame] | 48 | virtual int SetSendAudioLevelIndicationStatus(int channel, |
| 49 | bool enable, |
| 50 | unsigned char id); |
wu@webrtc.org | 47e54ba | 2014-04-24 20:33:08 +0000 | [diff] [blame] | 51 | virtual int SetReceiveAudioLevelIndicationStatus(int channel, |
| 52 | bool enable, |
| 53 | unsigned char id); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 54 | |
wu@webrtc.org | 9a82322 | 2014-03-06 23:49:08 +0000 | [diff] [blame] | 55 | // RTP Header Extension for Absolute Sender Time |
| 56 | virtual int SetSendAbsoluteSenderTimeStatus(int channel, |
| 57 | bool enable, |
| 58 | unsigned char id); |
| 59 | virtual int SetReceiveAbsoluteSenderTimeStatus(int channel, |
| 60 | bool enable, |
| 61 | unsigned char id); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 62 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 63 | // Statistics |
| 64 | virtual int GetRTPStatistics(int channel, |
| 65 | unsigned int& averageJitterMs, |
| 66 | unsigned int& maxJitterMs, |
| 67 | unsigned int& discardedPackets); |
| 68 | |
| 69 | virtual int GetRTCPStatistics(int channel, CallStatistics& stats); |
| 70 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 71 | virtual int GetRemoteRTCPReportBlocks( |
| 72 | int channel, std::vector<ReportBlock>* report_blocks); |
| 73 | |
minyue@webrtc.org | dd671de | 2014-05-28 09:52:06 +0000 | [diff] [blame] | 74 | // RED |
| 75 | virtual int SetREDStatus(int channel, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 76 | bool enable, |
| 77 | int redPayloadtype = -1); |
| 78 | |
minyue@webrtc.org | dd671de | 2014-05-28 09:52:06 +0000 | [diff] [blame] | 79 | virtual int GetREDStatus(int channel, bool& enabled, int& redPayloadtype); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 80 | |
niklas.enbom@webrtc.org | 2753b76 | 2013-05-31 21:13:52 +0000 | [diff] [blame] | 81 | //NACK |
| 82 | virtual int SetNACKStatus(int channel, |
| 83 | bool enable, |
| 84 | int maxNoPackets); |
| 85 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 86 | // Store RTP and RTCP packets and dump to file (compatible with rtpplay) |
| 87 | virtual int StartRTPDump(int channel, |
| 88 | const char fileNameUTF8[1024], |
| 89 | RTPDirections direction = kRtpIncoming); |
| 90 | |
| 91 | virtual int StopRTPDump(int channel, |
| 92 | RTPDirections direction = kRtpIncoming); |
| 93 | |
| 94 | virtual int RTPDumpIsActive(int channel, |
| 95 | RTPDirections direction = kRtpIncoming); |
| 96 | |
solenberg@webrtc.org | fec6b6e | 2014-03-24 10:38:25 +0000 | [diff] [blame] | 97 | virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network, |
| 98 | int video_channel); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 99 | protected: |
| 100 | VoERTP_RTCPImpl(voe::SharedData* shared); |
| 101 | virtual ~VoERTP_RTCPImpl(); |
| 102 | |
| 103 | private: |
| 104 | voe::SharedData* _shared; |
| 105 | }; |
| 106 | |
| 107 | } // namespace webrtc |
| 108 | |
| 109 | #endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H |