Add documentation+DCHECK for the packet path from transport to call.
An upcoming change will remove PeerConnection's involvement in the RTCP packet path and keep the flow consistent with the RTP packet path. Bug: webrtc:11993 Change-Id: I7ce1bbe8bbc352a49310e2e55b55ca5d8d927935 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217389 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33927}
This commit is contained in:
parent
bb7ee95c71
commit
3f418ccf99
14
call/call.cc
14
call/call.cc
@ -1363,6 +1363,19 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type,
|
||||
const uint8_t* packet,
|
||||
size_t length) {
|
||||
TRACE_EVENT0("webrtc", "Call::DeliverRtcp");
|
||||
|
||||
// TODO(bugs.webrtc.org/11993): This DCHECK is here just to maintain the
|
||||
// invariant that currently the only call path to this function is via
|
||||
// `PeerConnection::InitializeRtcpCallback()`. DeliverRtp on the other hand
|
||||
// gets called via the channel classes and
|
||||
// WebRtc[Audio|Video]Channel's `OnPacketReceived`. We'll remove the
|
||||
// PeerConnection involvement as well as
|
||||
// `JsepTransportController::OnRtcpPacketReceived_n` and `rtcp_handler`
|
||||
// and make sure that the flow of packets is consistent from the
|
||||
// `RtpTransport` class, via the *Channel and *Engine classes and into Call.
|
||||
// This way we'll also know more about the context of the packet.
|
||||
RTC_DCHECK_EQ(media_type, MediaType::ANY);
|
||||
|
||||
// TODO(pbos): Make sure it's a valid packet.
|
||||
// Return DELIVERY_UNKNOWN_SSRC if it can be determined that
|
||||
// there's no receiver of the packet.
|
||||
@ -1409,6 +1422,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
|
||||
rtc::CopyOnWriteBuffer packet,
|
||||
int64_t packet_time_us) {
|
||||
TRACE_EVENT0("webrtc", "Call::DeliverRtp");
|
||||
RTC_DCHECK_NE(media_type, MediaType::ANY);
|
||||
|
||||
RtpPacketReceived parsed_packet;
|
||||
if (!parsed_packet.Parse(std::move(packet)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user