blob: c73fcdd2ed0ec2fdecee251147eccde9f1e2fe8c [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
tommi@webrtc.orga990e122012-04-26 15:28:22 +000020class VoERTP_RTCPImpl : public VoERTP_RTCP
niklase@google.com470e71d2011-07-07 08:21:25 +000021{
22public:
niklase@google.com470e71d2011-07-07 08:21:25 +000023 // 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.com470e71d2011-07-07 08:21:25 +000042 // 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.orgebdb0e32014-03-06 23:49:08 +000050 virtual int SetSendAudioLevelIndicationStatus(int channel,
51 bool enable,
52 unsigned char id);
wu@webrtc.org93fd25c2014-04-24 20:33:08 +000053 virtual int SetReceiveAudioLevelIndicationStatus(int channel,
54 bool enable,
55 unsigned char id);
niklase@google.com470e71d2011-07-07 08:21:25 +000056
wu@webrtc.orgebdb0e32014-03-06 23:49:08 +000057 // 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.com470e71d2011-07-07 08:21:25 +000064
niklase@google.com470e71d2011-07-07 08:21:25 +000065 // 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.org8a2fc882012-08-22 08:53:55 +000073 virtual int GetRemoteRTCPReportBlocks(
74 int channel, std::vector<ReportBlock>* report_blocks);
75
minyue@webrtc.orgc1a40a72014-05-28 09:52:06 +000076 // RED
77 virtual int SetREDStatus(int channel,
niklase@google.com470e71d2011-07-07 08:21:25 +000078 bool enable,
79 int redPayloadtype = -1);
80
minyue@webrtc.orgc1a40a72014-05-28 09:52:06 +000081 virtual int GetREDStatus(int channel, bool& enabled, int& redPayloadtype);
niklase@google.com470e71d2011-07-07 08:21:25 +000082
niklas.enbom@webrtc.orgb35d2e32013-05-31 21:13:52 +000083 //NACK
84 virtual int SetNACKStatus(int channel,
85 bool enable,
86 int maxNoPackets);
87
niklase@google.com470e71d2011-07-07 08:21:25 +000088 // 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.orgb1f50102014-03-24 10:38:25 +000099 virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network,
100 int video_channel);
niklase@google.com470e71d2011-07-07 08:21:25 +0000101protected:
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000102 VoERTP_RTCPImpl(voe::SharedData* shared);
niklase@google.com470e71d2011-07-07 08:21:25 +0000103 virtual ~VoERTP_RTCPImpl();
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000104
105private:
106 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +0000107};
108
109} // namespace webrtc
110
111#endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H