RTP video stream receivers: By default consider frames decryptable.

Looks like the original code [0] that should limit the amount of keyframe requests behaves a bit strange in a situation when the first keyframe is missed. Effectively in the encrypted session the receiver can't enforce getting the keyframe until it receives at least one frame which is decryptable [1]. And with dependency descriptors it can't do that until it receives a keyframe which contains proper DD header [2]. This leads to unnecessary delays until the sender sends a keyframe itself.

In this CL we "trust" that the stream is decryptable from the beginning unless proven the opposite [3].

[0]: https://webrtc-review.googlesource.com/c/src/+/123414/
[1]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/video_receive_stream2.cc#950
[2]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#415
[3]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#882

Bug: webrtc:10330
Change-Id: I167d728ddc7cde74a5c5e3327bce7364ed97b7ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260326
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36775}
This commit is contained in:
Artem Titarenko 2022-04-28 15:20:09 +02:00 committed by WebRTC LUCI CQ
parent 26d12fcc71
commit 658dfb74e5
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver(
PacketBufferMaxSize(field_trials_)), PacketBufferMaxSize(field_trials_)),
reference_finder_(std::make_unique<RtpFrameReferenceFinder>()), reference_finder_(std::make_unique<RtpFrameReferenceFinder>()),
has_received_frame_(false), has_received_frame_(false),
frames_decryptable_(false), frames_decryptable_(true),
absolute_capture_time_interpolator_(clock) { absolute_capture_time_interpolator_(clock) {
constexpr bool remb_candidate = true; constexpr bool remb_candidate = true;
if (packet_router_) if (packet_router_)

View File

@ -259,7 +259,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2(
PacketBufferMaxSize(field_trials_)), PacketBufferMaxSize(field_trials_)),
reference_finder_(std::make_unique<RtpFrameReferenceFinder>()), reference_finder_(std::make_unique<RtpFrameReferenceFinder>()),
has_received_frame_(false), has_received_frame_(false),
frames_decryptable_(false), frames_decryptable_(true),
absolute_capture_time_interpolator_(clock) { absolute_capture_time_interpolator_(clock) {
packet_sequence_checker_.Detach(); packet_sequence_checker_.Detach();
constexpr bool remb_candidate = true; constexpr bool remb_candidate = true;