diff --git a/modules/rtp_rtcp/include/rtp_rtcp.h b/modules/rtp_rtcp/include/rtp_rtcp.h index 94c8250aba..18d1bdcf07 100644 --- a/modules/rtp_rtcp/include/rtp_rtcp.h +++ b/modules/rtp_rtcp/include/rtp_rtcp.h @@ -417,12 +417,21 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface { // Video // ************************************************************************** + // Requests new key frame. + // using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1 + void SendPictureLossIndication() { SendRTCP(kRtcpPli); } + // using FIR, https://tools.ietf.org/html/rfc5104#section-4.3.1.2 + void SendFullIntraRequest() { SendRTCP(kRtcpFir); } + // Set method for requestion a new key frame. // Returns -1 on failure else 0. + RTC_DEPRECATED virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; // Sends a request for a keyframe. // Returns -1 on failure else 0. + // Use above SendPictureLossIndication and SendFullIntraRequest instead. + RTC_DEPRECATED virtual int32_t RequestKeyFrame() = 0; // Sends a LossNotification RTCP message. diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index d575ba6b68..1d4861b87c 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -717,11 +717,13 @@ int32_t ModuleRtpRtcpImpl::SetKeyFrameRequestMethod( int32_t ModuleRtpRtcpImpl::RequestKeyFrame() { switch (key_frame_req_method_) { case kKeyFrameReqPliRtcp: - return SendRTCP(kRtcpPli); + SendPictureLossIndication(); + break; case kKeyFrameReqFirRtcp: - return SendRTCP(kRtcpFir); + SendFullIntraRequest(); + break; } - return -1; + return 0; } int32_t ModuleRtpRtcpImpl::SendLossNotification(uint16_t last_decoded_seq_num, diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc index a8647c8e8e..668dfa45f6 100644 --- a/video/rtp_video_stream_receiver.cc +++ b/video/rtp_video_stream_receiver.cc @@ -209,7 +209,6 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver( rtp_rtcp_->SetRTCPStatus(config_.rtp.rtcp_mode); rtp_rtcp_->SetSSRC(config_.rtp.local_ssrc); rtp_rtcp_->SetRemoteSSRC(config_.rtp.remote_ssrc); - rtp_rtcp_->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp); static const int kMaxPacketAgeToNack = 450; const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0) @@ -478,7 +477,7 @@ void RtpVideoStreamReceiver::RequestKeyFrame() { if (keyframe_request_sender_) { keyframe_request_sender_->RequestKeyFrame(); } else { - rtp_rtcp_->RequestKeyFrame(); + rtp_rtcp_->SendPictureLossIndication(); } }