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 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 20 | class VoERTP_RTCPImpl : public VoERTP_RTCP { |
| 21 | public: |
| 22 | // RTCP |
| 23 | int SetRTCPStatus(int channel, bool enable) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 24 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 25 | int GetRTCPStatus(int channel, bool& enabled) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 27 | int SetRTCP_CNAME(int channel, const char cName[256]) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 28 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 29 | int GetRemoteRTCP_CNAME(int channel, char cName[256]) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 30 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 31 | int GetRemoteRTCPData(int channel, |
| 32 | unsigned int& NTPHigh, |
| 33 | unsigned int& NTPLow, |
| 34 | unsigned int& timestamp, |
| 35 | unsigned int& playoutTimestamp, |
| 36 | unsigned int* jitter = NULL, |
| 37 | unsigned short* fractionLost = NULL) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 38 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 39 | // SSRC |
| 40 | int SetLocalSSRC(int channel, unsigned int ssrc) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 42 | int GetLocalSSRC(int channel, unsigned int& ssrc) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 44 | int GetRemoteSSRC(int channel, unsigned int& ssrc) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 45 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 46 | // RTP Header Extension for Client-to-Mixer Audio Level Indication |
| 47 | int SetSendAudioLevelIndicationStatus(int channel, |
| 48 | bool enable, |
| 49 | unsigned char id) override; |
| 50 | int SetReceiveAudioLevelIndicationStatus(int channel, |
| 51 | bool enable, |
| 52 | unsigned char id) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 53 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 54 | // RTP Header Extension for Absolute Sender Time |
| 55 | int SetSendAbsoluteSenderTimeStatus(int channel, |
| 56 | bool enable, |
| 57 | unsigned char id) override; |
| 58 | int SetReceiveAbsoluteSenderTimeStatus(int channel, |
| 59 | bool enable, |
| 60 | unsigned char id) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 61 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 62 | // Statistics |
| 63 | int GetRTPStatistics(int channel, |
| 64 | unsigned int& averageJitterMs, |
| 65 | unsigned int& maxJitterMs, |
| 66 | unsigned int& discardedPackets) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 67 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 68 | int GetRTCPStatistics(int channel, CallStatistics& stats) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 69 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 70 | int GetRemoteRTCPReportBlocks( |
| 71 | int channel, |
| 72 | std::vector<ReportBlock>* report_blocks) override; |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 73 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 74 | // NACK |
| 75 | int SetNACKStatus(int channel, bool enable, int maxNoPackets) override; |
niklas.enbom@webrtc.org | b35d2e3 | 2013-05-31 21:13:52 +0000 | [diff] [blame] | 76 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 77 | protected: |
| 78 | VoERTP_RTCPImpl(voe::SharedData* shared); |
| 79 | ~VoERTP_RTCPImpl() override; |
| 80 | |
| 81 | private: |
| 82 | voe::SharedData* _shared; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 83 | }; |
| 84 | |
| 85 | } // namespace webrtc |
| 86 | |
Jelena Marusic | 0d26605 | 2015-05-04 14:15:32 +0200 | [diff] [blame] | 87 | #endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H |