Ensure Call is notified of un demuxable packets
With this cl, packets that are discarded in RtpTransport now notifies Call, so that
they can be part of BWE even if they are dropped.
These packets have been recevied on the transport, and has bin decrypted
and parsed and thus can be accounted for.
The un demuxable packets are forwarded to Call similarly how RTCP packets are forwarded.
Bug: webrtc:14928
Change-Id: Ia53349c7b316c4442a3c7aac085a85ec4f4ab9ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299262
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39727}
diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc
index 3ea24d4..4c351a6 100644
--- a/pc/jsep_transport_controller.cc
+++ b/pc/jsep_transport_controller.cc
@@ -53,7 +53,7 @@
RTC_DCHECK_RUN_ON(network_thread_);
UpdateAggregateStates_n();
}),
- config_(config),
+ config_(std::move(config)),
active_reset_srtp_params_(config.active_reset_srtp_params),
bundles_(config.bundle_policy) {
// The `transport_observer` is assumed to be non-null.
@@ -1090,6 +1090,8 @@
jsep_transport->rtp_transport()->SignalRtcpPacketReceived.connect(
this, &JsepTransportController::OnRtcpPacketReceived_n);
+ jsep_transport->rtp_transport()->SignalUnDemuxableRtpPacketReceived.connect(
+ this, &JsepTransportController::OnUnDemuxableRtpPacketReceived_n);
transports_.RegisterTransport(content_info.name, std::move(jsep_transport));
UpdateAggregateStates_n();
@@ -1410,6 +1412,12 @@
config_.rtcp_handler(*packet, packet_time_us);
}
+void JsepTransportController::OnUnDemuxableRtpPacketReceived_n(
+ const webrtc::RtpPacketReceived& packet) {
+ RTC_DCHECK(config_.un_demuxable_packet_handler);
+ config_.un_demuxable_packet_handler(packet);
+}
+
void JsepTransportController::OnDtlsHandshakeError(
rtc::SSLHandshakeError error) {
config_.on_dtls_handshake_error_(error);