Mark all virtual overrides in the hierarchy of RtpData and RtpReceiver as such.
This will make further changes to these classes safer by ensuring that the compile breaks if the base class changes and not all overrides are fixed. This also highlighted a number of unused functions which I've removed. -- This is was reviewed in https://webrtc-codereview.appspot.com/19309004/, but -- a new cl was needed to resolve a small conflict before committing. BUG=none TEST=none TBR=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/22359004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7162 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
cc774a69cb
commit
6071b0636d
@ -355,7 +355,7 @@ class NullRtpData : public RtpData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
||||||
int packet_length) {
|
int packet_length) OVERRIDE {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -96,10 +96,6 @@ RtpReceiverImpl::~RtpReceiverImpl() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RTPReceiverStrategy* RtpReceiverImpl::GetMediaReceiver() const {
|
|
||||||
return rtp_media_receiver_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t RtpReceiverImpl::RegisterReceivePayload(
|
int32_t RtpReceiverImpl::RegisterReceivePayload(
|
||||||
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
||||||
const int8_t payload_type,
|
const int8_t payload_type,
|
||||||
|
@ -34,47 +34,38 @@ class RtpReceiverImpl : public RtpReceiver {
|
|||||||
|
|
||||||
virtual ~RtpReceiverImpl();
|
virtual ~RtpReceiverImpl();
|
||||||
|
|
||||||
RTPReceiverStrategy* GetMediaReceiver() const;
|
virtual int32_t RegisterReceivePayload(
|
||||||
|
|
||||||
int32_t RegisterReceivePayload(
|
|
||||||
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
||||||
const int8_t payload_type,
|
const int8_t payload_type,
|
||||||
const uint32_t frequency,
|
const uint32_t frequency,
|
||||||
const uint8_t channels,
|
const uint8_t channels,
|
||||||
const uint32_t rate);
|
const uint32_t rate) OVERRIDE;
|
||||||
|
|
||||||
int32_t DeRegisterReceivePayload(const int8_t payload_type);
|
virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) OVERRIDE;
|
||||||
|
|
||||||
bool IncomingRtpPacket(
|
virtual bool IncomingRtpPacket(
|
||||||
const RTPHeader& rtp_header,
|
const RTPHeader& rtp_header,
|
||||||
const uint8_t* payload,
|
const uint8_t* payload,
|
||||||
int payload_length,
|
int payload_length,
|
||||||
PayloadUnion payload_specific,
|
PayloadUnion payload_specific,
|
||||||
bool in_order);
|
bool in_order) OVERRIDE;
|
||||||
|
|
||||||
NACKMethod NACK() const;
|
virtual NACKMethod NACK() const OVERRIDE;
|
||||||
|
|
||||||
// Turn negative acknowledgement requests on/off.
|
// Turn negative acknowledgement requests on/off.
|
||||||
void SetNACKStatus(const NACKMethod method);
|
virtual void SetNACKStatus(const NACKMethod method) OVERRIDE;
|
||||||
|
|
||||||
// Returns the last received timestamp.
|
// Returns the last received timestamp.
|
||||||
bool Timestamp(uint32_t* timestamp) const;
|
virtual bool Timestamp(uint32_t* timestamp) const OVERRIDE;
|
||||||
bool LastReceivedTimeMs(int64_t* receive_time_ms) const;
|
virtual bool LastReceivedTimeMs(int64_t* receive_time_ms) const OVERRIDE;
|
||||||
|
|
||||||
uint32_t SSRC() const;
|
virtual uint32_t SSRC() const OVERRIDE;
|
||||||
|
|
||||||
int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const;
|
virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const OVERRIDE;
|
||||||
|
|
||||||
int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const;
|
virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const OVERRIDE;
|
||||||
|
|
||||||
// RTX.
|
virtual TelephoneEventHandler* GetTelephoneEventHandler() OVERRIDE;
|
||||||
void SetRTXStatus(bool enable, uint32_t ssrc);
|
|
||||||
|
|
||||||
void RTXStatus(bool* enable, uint32_t* ssrc, int* payload_type) const;
|
|
||||||
|
|
||||||
void SetRtxPayloadType(int payload_type);
|
|
||||||
|
|
||||||
TelephoneEventHandler* GetTelephoneEventHandler();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool HaveReceivedFrame() const;
|
bool HaveReceivedFrame() const;
|
||||||
|
@ -30,7 +30,7 @@ class RtpDataCallback : public webrtc::NullRtpData {
|
|||||||
virtual int32_t OnReceivedPayloadData(
|
virtual int32_t OnReceivedPayloadData(
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
const uint16_t payload_size,
|
const uint16_t payload_size,
|
||||||
const webrtc::WebRtcRTPHeader* rtp_header) {
|
const webrtc::WebRtcRTPHeader* rtp_header) OVERRIDE {
|
||||||
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
|
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,19 +54,19 @@ class VcmPayloadSinkFactory::VcmPayloadSink
|
|||||||
virtual int32_t OnReceivedPayloadData(
|
virtual int32_t OnReceivedPayloadData(
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
const uint16_t payload_size,
|
const uint16_t payload_size,
|
||||||
const WebRtcRTPHeader* rtp_header) {
|
const WebRtcRTPHeader* rtp_header) OVERRIDE {
|
||||||
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
|
return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
||||||
int packet_length) {
|
int packet_length) OVERRIDE {
|
||||||
// We currently don't handle FEC.
|
// We currently don't handle FEC.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// VCMPacketRequestCallback
|
// VCMPacketRequestCallback
|
||||||
virtual int32_t ResendPackets(const uint16_t* sequence_numbers,
|
virtual int32_t ResendPackets(const uint16_t* sequence_numbers,
|
||||||
uint16_t length) {
|
uint16_t length) OVERRIDE {
|
||||||
stream_->ResendPackets(sequence_numbers, length);
|
stream_->ResendPackets(sequence_numbers, length);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -72,14 +72,14 @@ class ViEReceiver : public RtpData {
|
|||||||
int ReceivedRTPPacket(const void* rtp_packet, int rtp_packet_length,
|
int ReceivedRTPPacket(const void* rtp_packet, int rtp_packet_length,
|
||||||
const PacketTime& packet_time);
|
const PacketTime& packet_time);
|
||||||
int ReceivedRTCPPacket(const void* rtcp_packet, int rtcp_packet_length);
|
int ReceivedRTCPPacket(const void* rtcp_packet, int rtcp_packet_length);
|
||||||
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
|
||||||
int packet_length) OVERRIDE;
|
|
||||||
|
|
||||||
// Implements RtpData.
|
// Implements RtpData.
|
||||||
virtual int32_t OnReceivedPayloadData(
|
virtual int32_t OnReceivedPayloadData(
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
const uint16_t payload_size,
|
const uint16_t payload_size,
|
||||||
const WebRtcRTPHeader* rtp_header);
|
const WebRtcRTPHeader* rtp_header) OVERRIDE;
|
||||||
|
virtual bool OnRecoveredPacket(const uint8_t* packet,
|
||||||
|
int packet_length) OVERRIDE;
|
||||||
|
|
||||||
void GetReceiveBandwidthEstimatorStats(
|
void GetReceiveBandwidthEstimatorStats(
|
||||||
ReceiveBandwidthEstimatorStats* output) const;
|
ReceiveBandwidthEstimatorStats* output) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user