summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/video/frame_cadence_adapter.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/video/frame_cadence_adapter.h')
-rw-r--r--third_party/libwebrtc/video/frame_cadence_adapter.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/third_party/libwebrtc/video/frame_cadence_adapter.h b/third_party/libwebrtc/video/frame_cadence_adapter.h
index d0eab7e770..2b62bb26cd 100644
--- a/third_party/libwebrtc/video/frame_cadence_adapter.h
+++ b/third_party/libwebrtc/video/frame_cadence_adapter.h
@@ -60,14 +60,11 @@ class FrameCadenceAdapterInterface
// The |post_time| parameter indicates the current time sampled when
// FrameCadenceAdapterInterface::OnFrame was called.
//
- // |frames_scheduled_for_processing| indicates how many frames that have
- // been scheduled for processing. During sequential conditions where
- // FrameCadenceAdapterInterface::OnFrame is invoked and subsequently ending
- // up in this callback, this value will read 1. Otherwise if the
- // |queue| gets stalled for some reason, the value will increase
- // beyond 1.
+ // |queue_overload| is true if the frame cadence adapter notices it's
+ // not able to deliver the incoming |frame| to the |queue| in the expected
+ // time.
virtual void OnFrame(Timestamp post_time,
- int frames_scheduled_for_processing,
+ bool queue_overload,
const VideoFrame& frame) = 0;
// Called when the source has discarded a frame.
@@ -112,6 +109,12 @@ class FrameCadenceAdapterInterface
// Updates spatial layer enabled status.
virtual void UpdateLayerStatus(size_t spatial_index, bool enabled) = 0;
+ // Updates the restrictions of max frame rate for the video source.
+ // The new `max_frame_rate` will only affect the cadence of Callback::OnFrame
+ // for non-idle (non converged) repeated frames.
+ virtual void UpdateVideoSourceRestrictions(
+ absl::optional<double> max_frame_rate) = 0;
+
// Conditionally requests a refresh frame via
// Callback::RequestRefreshFrame.
virtual void ProcessKeyFrameRequest() = 0;