Always record timestamp of keyframe request.

Bug: chromium:1013590
Change-Id: I85b20f06cb0bec15dae199cf96512173f0faad42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159884
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29817}
This commit is contained in:
Markus Handell 2019-11-18 11:10:11 +01:00 committed by Commit Bot
parent 92dd35d035
commit 4186603902
2 changed files with 6 additions and 6 deletions

View File

@ -535,12 +535,13 @@ void VideoReceiveStream::SendNack(const std::vector<uint16_t>& sequence_numbers,
rtp_video_stream_receiver_.RequestPacketRetransmit(sequence_numbers);
}
void VideoReceiveStream::RequestKeyFrame() {
void VideoReceiveStream::RequestKeyFrame(int64_t timestamp_ms) {
if (config_.media_transport()) {
config_.media_transport()->RequestKeyFrame(config_.rtp.remote_ssrc);
} else {
rtp_video_stream_receiver_.RequestKeyFrame();
}
last_keyframe_request_ms_ = timestamp_ms;
}
void VideoReceiveStream::OnCompleteFrame(
@ -672,14 +673,13 @@ void VideoReceiveStream::HandleEncodedFrame(
rtp_video_stream_receiver_.FrameDecoded(frame->id.picture_id);
if (decode_result == WEBRTC_VIDEO_CODEC_OK_REQUEST_KEYFRAME)
RequestKeyFrame();
RequestKeyFrame(now_ms);
} else if (!frame_decoded_ || !keyframe_required_ ||
(last_keyframe_request_ms_ + max_wait_for_keyframe_ms_ < now_ms)) {
keyframe_required_ = true;
// TODO(philipel): Remove this keyframe request when downstream project
// has been fixed.
RequestKeyFrame();
last_keyframe_request_ms_ = now_ms;
RequestKeyFrame(now_ms);
}
}
@ -707,7 +707,7 @@ void VideoReceiveStream::HandleFrameBufferTimeout() {
rtp_video_stream_receiver_.IsDecryptable())) {
RTC_LOG(LS_WARNING) << "No decodable frame in " << GetWaitMs()
<< " ms, requesting keyframe.";
RequestKeyFrame();
RequestKeyFrame(now_ms);
}
}

View File

@ -142,7 +142,7 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
void UpdatePlayoutDelays() const
RTC_EXCLUSIVE_LOCKS_REQUIRED(playout_delay_lock_);
void RequestKeyFrame();
void RequestKeyFrame(int64_t timestamp_ms);
void UpdateHistograms();