Deprecate RtpRtcp::SetKeyFrameRequestMethod
Replaced by separate methods SendPictureLossIndication and SendFullIntraRequest. The split SetKeyFrameRequestMethod/RequestKeyFrame implicitly requires that the two methods are called on the same thread, to avoid a data race. After downstream code is updated, both deprecated methods and the member |ModuleRtpRtcpImpl::key_frame_req_method_| can be deleted. Bug: None Change-Id: I454f6d16b667f2306cba0dec467ddc183ad449c8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140043 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@{#28163}
This commit is contained in:
parent
48edc9224c
commit
dd0094a227
@ -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.
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user