blob: b83ab2d411b801560696489f6b3c472b6e87f802 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
leozwang@webrtc.org0975d212012-03-06 20:59:13 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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.org956aa7e2013-05-21 13:52:32 +000014#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000015
pbos@webrtc.org956aa7e2013-05-21 13:52:32 +000016#include "webrtc/voice_engine/shared_data.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000017
18namespace webrtc {
19
Jelena Marusic0d266052015-05-04 14:15:32 +020020class VoERTP_RTCPImpl : public VoERTP_RTCP {
21 public:
22 // RTCP
23 int SetRTCPStatus(int channel, bool enable) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000024
Jelena Marusic0d266052015-05-04 14:15:32 +020025 int GetRTCPStatus(int channel, bool& enabled) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000026
Jelena Marusic0d266052015-05-04 14:15:32 +020027 int SetRTCP_CNAME(int channel, const char cName[256]) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000028
Jelena Marusic0d266052015-05-04 14:15:32 +020029 int GetRemoteRTCP_CNAME(int channel, char cName[256]) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000030
Jelena Marusic0d266052015-05-04 14:15:32 +020031 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.com470e71d2011-07-07 08:21:25 +000038
Jelena Marusic0d266052015-05-04 14:15:32 +020039 // SSRC
40 int SetLocalSSRC(int channel, unsigned int ssrc) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000041
Jelena Marusic0d266052015-05-04 14:15:32 +020042 int GetLocalSSRC(int channel, unsigned int& ssrc) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
Jelena Marusic0d266052015-05-04 14:15:32 +020044 int GetRemoteSSRC(int channel, unsigned int& ssrc) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000045
Jelena Marusic0d266052015-05-04 14:15:32 +020046 // 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.com470e71d2011-07-07 08:21:25 +000053
Jelena Marusic0d266052015-05-04 14:15:32 +020054 // 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.com470e71d2011-07-07 08:21:25 +000061
Jelena Marusic0d266052015-05-04 14:15:32 +020062 // Statistics
63 int GetRTPStatistics(int channel,
64 unsigned int& averageJitterMs,
65 unsigned int& maxJitterMs,
66 unsigned int& discardedPackets) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000067
Jelena Marusic0d266052015-05-04 14:15:32 +020068 int GetRTCPStatistics(int channel, CallStatistics& stats) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000069
Jelena Marusic0d266052015-05-04 14:15:32 +020070 int GetRemoteRTCPReportBlocks(
71 int channel,
72 std::vector<ReportBlock>* report_blocks) override;
henrika@webrtc.org8a2fc882012-08-22 08:53:55 +000073
Jelena Marusic0d266052015-05-04 14:15:32 +020074 // RED
75 int SetREDStatus(int channel, bool enable, int redPayloadtype = -1) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000076
Jelena Marusic0d266052015-05-04 14:15:32 +020077 int GetREDStatus(int channel, bool& enabled, int& redPayloadtype) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000078
Jelena Marusic0d266052015-05-04 14:15:32 +020079 // NACK
80 int SetNACKStatus(int channel, bool enable, int maxNoPackets) override;
niklas.enbom@webrtc.orgb35d2e32013-05-31 21:13:52 +000081
Jelena Marusic0d266052015-05-04 14:15:32 +020082 // Store RTP and RTCP packets and dump to file (compatible with rtpplay)
83 int StartRTPDump(int channel,
84 const char fileNameUTF8[1024],
85 RTPDirections direction = kRtpIncoming) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000086
Jelena Marusic0d266052015-05-04 14:15:32 +020087 int StopRTPDump(int channel, RTPDirections direction = kRtpIncoming) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000088
Jelena Marusic0d266052015-05-04 14:15:32 +020089 int RTPDumpIsActive(int channel,
90 RTPDirections direction = kRtpIncoming) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000091
Jelena Marusic0d266052015-05-04 14:15:32 +020092 int SetVideoEngineBWETarget(int channel,
93 ViENetwork* vie_network,
94 int video_channel) override;
tommi@webrtc.org851becd2012-04-04 14:57:19 +000095
Jelena Marusic0d266052015-05-04 14:15:32 +020096 protected:
97 VoERTP_RTCPImpl(voe::SharedData* shared);
98 ~VoERTP_RTCPImpl() override;
99
100 private:
101 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +0000102};
103
104} // namespace webrtc
105
Jelena Marusic0d266052015-05-04 14:15:32 +0200106#endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H