No longer register ulpfec as a codec with RTPPayloadRegistry.
Delete method RTPPayloadRegistry::ulpfec_payload_type(). RtpVideoStreamReceiver can check its own config to know what the payload type is. Bug: webrtc:8995 Change-Id: Idc2bc7d747d77127f2b2261ff50610422e5686a6 Reviewed-on: https://webrtc-review.googlesource.com/61501 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@{#22414}
This commit is contained in:
@ -63,9 +63,7 @@ class RTPPayloadRegistry {
|
||||
bool ReportMediaPayloadType(uint8_t media_payload_type);
|
||||
|
||||
int8_t red_payload_type() const { return GetPayloadTypeWithName("red"); }
|
||||
int8_t ulpfec_payload_type() const {
|
||||
return GetPayloadTypeWithName("ulpfec");
|
||||
}
|
||||
|
||||
int8_t last_received_payload_type() const {
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
return last_received_payload_type_;
|
||||
|
||||
@ -138,13 +138,6 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver(
|
||||
: kDefaultMaxReorderingThreshold;
|
||||
rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold);
|
||||
|
||||
if (IsUlpfecEnabled()) {
|
||||
VideoCodec ulpfec_codec = {};
|
||||
ulpfec_codec.codecType = kVideoCodecULPFEC;
|
||||
ulpfec_codec.plType = config_.rtp.ulpfec_payload_type;
|
||||
RTC_CHECK(AddReceiveCodec(ulpfec_codec));
|
||||
}
|
||||
|
||||
if (IsRedEnabled()) {
|
||||
VideoCodec red_codec = {};
|
||||
red_codec.codecType = kVideoCodecRED;
|
||||
@ -449,15 +442,15 @@ void RtpVideoStreamReceiver::ParseAndHandleEncapsulatingHeader(
|
||||
const uint8_t* packet, size_t packet_length, const RTPHeader& header) {
|
||||
RTC_DCHECK_CALLED_SEQUENTIALLY(&worker_task_checker_);
|
||||
if (rtp_payload_registry_.IsRed(header)) {
|
||||
int8_t ulpfec_pt = rtp_payload_registry_.ulpfec_payload_type();
|
||||
if (packet[header.headerLength] == ulpfec_pt) {
|
||||
if (packet[header.headerLength] == config_.rtp.ulpfec_payload_type) {
|
||||
rtp_receive_statistics_->FecPacketReceived(header, packet_length);
|
||||
// Notify video_receiver about received FEC packets to avoid NACKing these
|
||||
// packets.
|
||||
NotifyReceiverOfFecPacket(header);
|
||||
}
|
||||
if (ulpfec_receiver_->AddReceivedRedPacket(header, packet, packet_length,
|
||||
ulpfec_pt) != 0) {
|
||||
if (ulpfec_receiver_->AddReceivedRedPacket(
|
||||
header, packet, packet_length,
|
||||
config_.rtp.ulpfec_payload_type) != 0) {
|
||||
return;
|
||||
}
|
||||
ulpfec_receiver_->ProcessReceivedFec();
|
||||
|
||||
Reference in New Issue
Block a user