2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-03-06 20:59:13 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
|
|
|
|
|
#define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
|
|
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include "webrtc/voice_engine/shared_data.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2012-04-26 15:28:22 +00:00
|
|
|
class VoERTP_RTCPImpl : public VoERTP_RTCP
|
2011-07-07 08:21:25 +00:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// RTCP
|
|
|
|
|
virtual int SetRTCPStatus(int channel, bool enable);
|
|
|
|
|
|
|
|
|
|
virtual int GetRTCPStatus(int channel, bool& enabled);
|
|
|
|
|
|
|
|
|
|
virtual int SetRTCP_CNAME(int channel, const char cName[256]);
|
|
|
|
|
|
|
|
|
|
virtual int GetRTCP_CNAME(int channel, char cName[256]);
|
|
|
|
|
|
|
|
|
|
virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]);
|
|
|
|
|
|
|
|
|
|
virtual int GetRemoteRTCPData(int channel,
|
|
|
|
|
unsigned int& NTPHigh,
|
|
|
|
|
unsigned int& NTPLow,
|
|
|
|
|
unsigned int& timestamp,
|
|
|
|
|
unsigned int& playoutTimestamp,
|
|
|
|
|
unsigned int* jitter = NULL,
|
|
|
|
|
unsigned short* fractionLost = NULL);
|
|
|
|
|
|
|
|
|
|
// SSRC
|
|
|
|
|
virtual int SetLocalSSRC(int channel, unsigned int ssrc);
|
|
|
|
|
|
|
|
|
|
virtual int GetLocalSSRC(int channel, unsigned int& ssrc);
|
|
|
|
|
|
|
|
|
|
virtual int GetRemoteSSRC(int channel, unsigned int& ssrc);
|
|
|
|
|
|
|
|
|
|
// RTP Header Extension for Client-to-Mixer Audio Level Indication
|
2014-03-06 23:49:08 +00:00
|
|
|
virtual int SetSendAudioLevelIndicationStatus(int channel,
|
|
|
|
|
bool enable,
|
|
|
|
|
unsigned char id);
|
2014-04-24 20:33:08 +00:00
|
|
|
virtual int SetReceiveAudioLevelIndicationStatus(int channel,
|
|
|
|
|
bool enable,
|
|
|
|
|
unsigned char id);
|
2014-03-06 23:49:08 +00:00
|
|
|
|
|
|
|
|
// RTP Header Extension for Absolute Sender Time
|
|
|
|
|
virtual int SetSendAbsoluteSenderTimeStatus(int channel,
|
|
|
|
|
bool enable,
|
|
|
|
|
unsigned char id);
|
|
|
|
|
virtual int SetReceiveAbsoluteSenderTimeStatus(int channel,
|
|
|
|
|
bool enable,
|
|
|
|
|
unsigned char id);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// Statistics
|
|
|
|
|
virtual int GetRTPStatistics(int channel,
|
|
|
|
|
unsigned int& averageJitterMs,
|
|
|
|
|
unsigned int& maxJitterMs,
|
|
|
|
|
unsigned int& discardedPackets);
|
|
|
|
|
|
|
|
|
|
virtual int GetRTCPStatistics(int channel, CallStatistics& stats);
|
|
|
|
|
|
2012-08-22 08:53:55 +00:00
|
|
|
virtual int GetRemoteRTCPReportBlocks(
|
|
|
|
|
int channel, std::vector<ReportBlock>* report_blocks);
|
|
|
|
|
|
2014-05-28 09:52:06 +00:00
|
|
|
// RED
|
|
|
|
|
virtual int SetREDStatus(int channel,
|
2011-07-07 08:21:25 +00:00
|
|
|
bool enable,
|
|
|
|
|
int redPayloadtype = -1);
|
|
|
|
|
|
2014-05-28 09:52:06 +00:00
|
|
|
virtual int GetREDStatus(int channel, bool& enabled, int& redPayloadtype);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-31 21:13:52 +00:00
|
|
|
//NACK
|
|
|
|
|
virtual int SetNACKStatus(int channel,
|
|
|
|
|
bool enable,
|
|
|
|
|
int maxNoPackets);
|
|
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// Store RTP and RTCP packets and dump to file (compatible with rtpplay)
|
|
|
|
|
virtual int StartRTPDump(int channel,
|
|
|
|
|
const char fileNameUTF8[1024],
|
|
|
|
|
RTPDirections direction = kRtpIncoming);
|
|
|
|
|
|
|
|
|
|
virtual int StopRTPDump(int channel,
|
|
|
|
|
RTPDirections direction = kRtpIncoming);
|
|
|
|
|
|
|
|
|
|
virtual int RTPDumpIsActive(int channel,
|
|
|
|
|
RTPDirections direction = kRtpIncoming);
|
|
|
|
|
|
2014-03-24 10:38:25 +00:00
|
|
|
virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network,
|
|
|
|
|
int video_channel);
|
2011-07-07 08:21:25 +00:00
|
|
|
protected:
|
2012-04-04 14:57:19 +00:00
|
|
|
VoERTP_RTCPImpl(voe::SharedData* shared);
|
2011-07-07 08:21:25 +00:00
|
|
|
virtual ~VoERTP_RTCPImpl();
|
2012-04-04 14:57:19 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
voe::SharedData* _shared;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
|