Delete RTPPayloadRegistry::SetIncomingPayloadType.
It only affects the write-only member |incoming_payload_type_|. Bug: webrtc:8995 Change-Id: I0cf86a6d0603c809367105cee31eb1b8b2802d32 Reviewed-on: https://webrtc-review.googlesource.com/61040 Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22382}
This commit is contained in:
parent
b619936dee
commit
6fed924857
@ -922,7 +922,6 @@ void Channel::OnRtpPacket(const RtpPacketReceived& packet) {
|
||||
bool in_order = IsPacketInOrder(header);
|
||||
rtp_receive_statistics_->IncomingPacket(
|
||||
header, packet.size(), IsPacketRetransmitted(header, in_order));
|
||||
rtp_payload_registry_->SetIncomingPayloadType(header);
|
||||
|
||||
ReceivePacket(packet.data(), packet.size(), header);
|
||||
}
|
||||
|
||||
@ -65,11 +65,6 @@ class RTPPayloadRegistry {
|
||||
last_received_media_payload_type_ = -1;
|
||||
}
|
||||
|
||||
// This sets the payload type of the packets being received from the network
|
||||
// on the media SSRC. For instance if packets are encapsulated with RED, this
|
||||
// payload type will be the RED payload type.
|
||||
void SetIncomingPayloadType(const RTPHeader& header);
|
||||
|
||||
// Returns true if the new media payload type has not changed.
|
||||
bool ReportMediaPayloadType(uint8_t media_payload_type);
|
||||
|
||||
@ -103,7 +98,6 @@ class RTPPayloadRegistry {
|
||||
|
||||
rtc::CriticalSection crit_sect_;
|
||||
std::map<int, RtpUtility::Payload> payload_type_map_;
|
||||
int8_t incoming_payload_type_;
|
||||
int8_t last_received_payload_type_;
|
||||
int8_t last_received_media_payload_type_;
|
||||
bool rtx_;
|
||||
|
||||
@ -103,8 +103,7 @@ bool IsPayloadTypeValid(int8_t payload_type) {
|
||||
} // namespace
|
||||
|
||||
RTPPayloadRegistry::RTPPayloadRegistry()
|
||||
: incoming_payload_type_(-1),
|
||||
last_received_payload_type_(-1),
|
||||
: last_received_payload_type_(-1),
|
||||
last_received_media_payload_type_(-1),
|
||||
rtx_(false),
|
||||
ssrc_rtx_(0) {}
|
||||
@ -267,10 +266,6 @@ bool RTPPayloadRegistry::RtxEnabled() const {
|
||||
return rtx_;
|
||||
}
|
||||
|
||||
bool RTPPayloadRegistry::IsRtxInternal(const RTPHeader& header) const {
|
||||
return rtx_ && ssrc_rtx_ == header.ssrc;
|
||||
}
|
||||
|
||||
void RTPPayloadRegistry::SetRtxSsrc(uint32_t ssrc) {
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
ssrc_rtx_ = ssrc;
|
||||
@ -310,12 +305,6 @@ rtc::Optional<RtpUtility::Payload> RTPPayloadRegistry::PayloadTypeToPayload(
|
||||
: rtc::Optional<RtpUtility::Payload>(it->second);
|
||||
}
|
||||
|
||||
void RTPPayloadRegistry::SetIncomingPayloadType(const RTPHeader& header) {
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
if (!IsRtxInternal(header))
|
||||
incoming_payload_type_ = header.payloadType;
|
||||
}
|
||||
|
||||
bool RTPPayloadRegistry::ReportMediaPayloadType(uint8_t media_payload_type) {
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
if (last_received_media_payload_type_ == media_payload_type) {
|
||||
|
||||
@ -331,10 +331,7 @@ void RtpVideoStreamReceiver::OnRtpPacket(const RtpPacketReceived& packet) {
|
||||
header.payload_type_frequency = kVideoPayloadTypeFrequency;
|
||||
|
||||
bool in_order = IsPacketInOrder(header);
|
||||
if (!packet.recovered()) {
|
||||
// TODO(nisse): Why isn't this done for recovered packets?
|
||||
rtp_payload_registry_.SetIncomingPayloadType(header);
|
||||
}
|
||||
|
||||
ReceivePacket(packet.data(), packet.size(), header);
|
||||
// Update receive statistics after ReceivePacket.
|
||||
// Receive statistics will be reset if the payload type changes (make sure
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user