Add low-latency stream signaling to VideoFrame and VCMTiming
This is the first CL out of three to make the low-latency stream signaling explicit. At the moment this is done by setting the render time to 0. There's a dependency between Chromium and WebRTC which is why this is split into three CLs to not break any existing functionality. Bug: chromium:1327251 Change-Id: Ie6b268746d587a99334485db77181fb2c6e9b567 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264502 Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37225}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
ca0c54dd96
commit
bbf639e930
@ -104,17 +104,14 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
|
||||
decodedImage.set_ntp_time_ms(frameInfo->ntp_time_ms);
|
||||
decodedImage.set_packet_infos(frameInfo->packet_infos);
|
||||
decodedImage.set_rotation(frameInfo->rotation);
|
||||
|
||||
absl::optional<int> max_composition_delay_in_frames =
|
||||
_timing->MaxCompositionDelayInFrames();
|
||||
if (max_composition_delay_in_frames) {
|
||||
VideoFrame::RenderParameters render_parameters = _timing->RenderParameters();
|
||||
if (render_parameters.max_composition_delay_in_frames) {
|
||||
// Subtract frames that are in flight.
|
||||
*max_composition_delay_in_frames -= timestamp_map_size;
|
||||
*max_composition_delay_in_frames =
|
||||
std::max(0, *max_composition_delay_in_frames);
|
||||
decodedImage.set_max_composition_delay_in_frames(
|
||||
max_composition_delay_in_frames);
|
||||
render_parameters.max_composition_delay_in_frames =
|
||||
std::max(0, *render_parameters.max_composition_delay_in_frames -
|
||||
timestamp_map_size);
|
||||
}
|
||||
decodedImage.set_render_parameters(render_parameters);
|
||||
|
||||
RTC_DCHECK(frameInfo->decodeStart);
|
||||
const Timestamp now = _clock->CurrentTime();
|
||||
|
||||
Reference in New Issue
Block a user