2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
12 #define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
14 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
16 #include "webrtc/voice_engine/shared_data.h"
20 class VoERTP_RTCPImpl : public VoERTP_RTCP
23 // Registration of observers for RTP and RTCP callbacks
24 virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer);
26 virtual int DeRegisterRTPObserver(int channel);
28 virtual int RegisterRTCPObserver(int channel, VoERTCPObserver& observer);
30 virtual int DeRegisterRTCPObserver(int channel);
33 virtual int SetRTCPStatus(int channel, bool enable);
35 virtual int GetRTCPStatus(int channel, bool& enabled);
37 virtual int SetRTCP_CNAME(int channel, const char cName[256]);
39 virtual int GetRTCP_CNAME(int channel, char cName[256]);
41 virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]);
43 virtual int GetRemoteRTCPData(int channel,
44 unsigned int& NTPHigh,
46 unsigned int& timestamp,
47 unsigned int& playoutTimestamp,
48 unsigned int* jitter = NULL,
49 unsigned short* fractionLost = NULL);
51 virtual int SendApplicationDefinedRTCPPacket(
53 unsigned char subType,
56 unsigned short dataLengthInBytes);
59 virtual int SetLocalSSRC(int channel, unsigned int ssrc);
61 virtual int GetLocalSSRC(int channel, unsigned int& ssrc);
63 virtual int GetRemoteSSRC(int channel, unsigned int& ssrc);
65 // RTP Header Extension for Client-to-Mixer Audio Level Indication
66 virtual int SetSendAudioLevelIndicationStatus(int channel,
69 virtual int SetReceiveAudioLevelIndicationStatus(int channel,
73 // RTP Header Extension for Absolute Sender Time
74 virtual int SetSendAbsoluteSenderTimeStatus(int channel,
77 virtual int SetReceiveAbsoluteSenderTimeStatus(int channel,
82 virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]);
85 virtual int GetRTPStatistics(int channel,
86 unsigned int& averageJitterMs,
87 unsigned int& maxJitterMs,
88 unsigned int& discardedPackets);
90 virtual int GetRTCPStatistics(int channel, CallStatistics& stats);
92 virtual int GetRemoteRTCPSenderInfo(int channel, SenderInfo* sender_info);
94 virtual int GetRemoteRTCPReportBlocks(
95 int channel, std::vector<ReportBlock>* report_blocks);
98 virtual int SetFECStatus(int channel,
100 int redPayloadtype = -1);
102 virtual int GetFECStatus(int channel, bool& enabled, int& redPayloadtype);
105 virtual int SetNACKStatus(int channel,
109 // Store RTP and RTCP packets and dump to file (compatible with rtpplay)
110 virtual int StartRTPDump(int channel,
111 const char fileNameUTF8[1024],
112 RTPDirections direction = kRtpIncoming);
114 virtual int StopRTPDump(int channel,
115 RTPDirections direction = kRtpIncoming);
117 virtual int RTPDumpIsActive(int channel,
118 RTPDirections direction = kRtpIncoming);
120 virtual int GetLastRemoteTimeStamp(int channel,
121 uint32_t* lastRemoteTimeStamp);
122 virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network,
125 VoERTP_RTCPImpl(voe::SharedData* shared);
126 virtual ~VoERTP_RTCPImpl();
129 voe::SharedData* _shared;
132 } // namespace webrtc
134 #endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H