niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 0975d21 | 2012-03-06 20:59:13 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | 956aa7e | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 14 | #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 15 | |
pbos@webrtc.org | 956aa7e | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 16 | #include "webrtc/voice_engine/shared_data.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
tommi@webrtc.org | a990e12 | 2012-04-26 15:28:22 +0000 | [diff] [blame] | 20 | class VoERTP_RTCPImpl : public VoERTP_RTCP |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 21 | { |
| 22 | public: |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +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 | |
| 30 | virtual int GetRTCP_CNAME(int channel, char cName[256]); |
| 31 | |
| 32 | virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]); |
| 33 | |
| 34 | virtual int GetRemoteRTCPData(int channel, |
| 35 | unsigned int& NTPHigh, |
| 36 | unsigned int& NTPLow, |
| 37 | unsigned int& timestamp, |
| 38 | unsigned int& playoutTimestamp, |
| 39 | unsigned int* jitter = NULL, |
| 40 | unsigned short* fractionLost = NULL); |
| 41 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 |
wu@webrtc.org | ebdb0e3 | 2014-03-06 23:49:08 +0000 | [diff] [blame] | 50 | virtual int SetSendAudioLevelIndicationStatus(int channel, |
| 51 | bool enable, |
| 52 | unsigned char id); |
wu@webrtc.org | 93fd25c | 2014-04-24 20:33:08 +0000 | [diff] [blame] | 53 | virtual int SetReceiveAudioLevelIndicationStatus(int channel, |
| 54 | bool enable, |
| 55 | unsigned char id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 56 | |
wu@webrtc.org | ebdb0e3 | 2014-03-06 23:49:08 +0000 | [diff] [blame] | 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); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 64 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 65 | // Statistics |
| 66 | virtual int GetRTPStatistics(int channel, |
| 67 | unsigned int& averageJitterMs, |
| 68 | unsigned int& maxJitterMs, |
| 69 | unsigned int& discardedPackets); |
| 70 | |
| 71 | virtual int GetRTCPStatistics(int channel, CallStatistics& stats); |
| 72 | |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 73 | virtual int GetRemoteRTCPReportBlocks( |
| 74 | int channel, std::vector<ReportBlock>* report_blocks); |
| 75 | |
minyue@webrtc.org | c1a40a7 | 2014-05-28 09:52:06 +0000 | [diff] [blame] | 76 | // RED |
| 77 | virtual int SetREDStatus(int channel, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 78 | bool enable, |
| 79 | int redPayloadtype = -1); |
| 80 | |
minyue@webrtc.org | c1a40a7 | 2014-05-28 09:52:06 +0000 | [diff] [blame] | 81 | virtual int GetREDStatus(int channel, bool& enabled, int& redPayloadtype); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 82 | |
niklas.enbom@webrtc.org | b35d2e3 | 2013-05-31 21:13:52 +0000 | [diff] [blame] | 83 | //NACK |
| 84 | virtual int SetNACKStatus(int channel, |
| 85 | bool enable, |
| 86 | int maxNoPackets); |
| 87 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 88 | // Store RTP and RTCP packets and dump to file (compatible with rtpplay) |
| 89 | virtual int StartRTPDump(int channel, |
| 90 | const char fileNameUTF8[1024], |
| 91 | RTPDirections direction = kRtpIncoming); |
| 92 | |
| 93 | virtual int StopRTPDump(int channel, |
| 94 | RTPDirections direction = kRtpIncoming); |
| 95 | |
| 96 | virtual int RTPDumpIsActive(int channel, |
| 97 | RTPDirections direction = kRtpIncoming); |
| 98 | |
solenberg@webrtc.org | b1f5010 | 2014-03-24 10:38:25 +0000 | [diff] [blame] | 99 | virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network, |
| 100 | int video_channel); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 101 | protected: |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 102 | VoERTP_RTCPImpl(voe::SharedData* shared); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 103 | virtual ~VoERTP_RTCPImpl(); |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 +0000 | [diff] [blame] | 104 | |
| 105 | private: |
| 106 | voe::SharedData* _shared; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | } // namespace webrtc |
| 110 | |
| 111 | #endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H |