• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  public:
22   // RTCP
23   int SetRTCPStatus(int channel, bool enable) override;
24 
25   int GetRTCPStatus(int channel, bool& enabled) override;
26 
27   int SetRTCP_CNAME(int channel, const char cName[256]) override;
28 
29   int GetRemoteRTCP_CNAME(int channel, char cName[256]) override;
30 
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;
38 
39   // SSRC
40   int SetLocalSSRC(int channel, unsigned int ssrc) override;
41 
42   int GetLocalSSRC(int channel, unsigned int& ssrc) override;
43 
44   int GetRemoteSSRC(int channel, unsigned int& ssrc) override;
45 
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;
53 
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;
61 
62   // Statistics
63   int GetRTPStatistics(int channel,
64                        unsigned int& averageJitterMs,
65                        unsigned int& maxJitterMs,
66                        unsigned int& discardedPackets) override;
67 
68   int GetRTCPStatistics(int channel, CallStatistics& stats) override;
69 
70   int GetRemoteRTCPReportBlocks(
71       int channel,
72       std::vector<ReportBlock>* report_blocks) override;
73 
74   // RED
75   int SetREDStatus(int channel, bool enable, int redPayloadtype = -1) override;
76 
77   int GetREDStatus(int channel, bool& enabled, int& redPayloadtype) override;
78 
79   // NACK
80   int SetNACKStatus(int channel, bool enable, int maxNoPackets) override;
81 
82  protected:
83   VoERTP_RTCPImpl(voe::SharedData* shared);
84   ~VoERTP_RTCPImpl() override;
85 
86  private:
87   voe::SharedData* _shared;
88 };
89 
90 }  // namespace webrtc
91 
92 #endif  // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
93