Files
platform-external-webrtc/webrtc/voice_engine/voe_rtp_rtcp_impl.h
henrika@webrtc.org b7a91fa95a Removes VoERTP_RTCP::InsertExtraRTPPacket.
Reasons for removing:

- Feels like a complete hack IMHO.
- Not used by any client.
- Unclear functionality regarding time stamp, marker bit etc.
- Causes several issues in tests due to a bad design which mainly depends on the fact that this API "breaks" an ongoing data/packet flow and it complicates the threading model and creates risks for deadlock and memory corruption. Not worth trying to fix given the very unclear benefit of maintaining the API. Better to remove the API instead.
- We also see lots of TSan races and memcheck errors related to this API.

BUG=2296,2240
R=mflodman@webrtc.org, niklas.enbom@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/8819004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5574 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-19 08:58:08 +00:00

126 lines
4.3 KiB
C++

/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* 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
#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
#include "webrtc/voice_engine/shared_data.h"
namespace webrtc {
class VoERTP_RTCPImpl : public VoERTP_RTCP
{
public:
// Registration of observers for RTP and RTCP callbacks
virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer);
virtual int DeRegisterRTPObserver(int channel);
virtual int RegisterRTCPObserver(int channel, VoERTCPObserver& observer);
virtual int DeRegisterRTCPObserver(int channel);
// 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);
virtual int SendApplicationDefinedRTCPPacket(
int channel,
unsigned char subType,
unsigned int name,
const char* data,
unsigned short dataLengthInBytes);
// 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
virtual int SetRTPAudioLevelIndicationStatus(int channel,
bool enable,
unsigned char ID);
virtual int GetRTPAudioLevelIndicationStatus(int channel,
bool& enabled,
unsigned char& ID);
// CSRC
virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]);
// Statistics
virtual int GetRTPStatistics(int channel,
unsigned int& averageJitterMs,
unsigned int& maxJitterMs,
unsigned int& discardedPackets);
virtual int GetRTCPStatistics(int channel, CallStatistics& stats);
virtual int GetRemoteRTCPSenderInfo(int channel, SenderInfo* sender_info);
virtual int GetRemoteRTCPReportBlocks(
int channel, std::vector<ReportBlock>* report_blocks);
// FEC
virtual int SetFECStatus(int channel,
bool enable,
int redPayloadtype = -1);
virtual int GetFECStatus(int channel, bool& enabled, int& redPayloadtype);
//NACK
virtual int SetNACKStatus(int channel,
bool enable,
int maxNoPackets);
// 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);
virtual int GetLastRemoteTimeStamp(int channel,
uint32_t* lastRemoteTimeStamp);
protected:
VoERTP_RTCPImpl(voe::SharedData* shared);
virtual ~VoERTP_RTCPImpl();
private:
voe::SharedData* _shared;
};
} // namespace webrtc
#endif // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H