Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1422)

Unified Diff: content/browser/media/capture/video_capture_oracle.h

Issue 1146723002: New FRAME_DURATION VideoFrameMetadata, with Cast Streaming use case. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expanded comments for VideoFrameMetadata::FRAME_DURATION. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/video_capture_oracle.h
diff --git a/content/browser/media/capture/video_capture_oracle.h b/content/browser/media/capture/video_capture_oracle.h
index 706f4a92dc537cf2a3d0bd2f45484e304d9427e5..e489c50983c62b6fb72a87675fbe4cfba768e06b 100644
--- a/content/browser/media/capture/video_capture_oracle.h
+++ b/content/browser/media/capture/video_capture_oracle.h
@@ -51,6 +51,13 @@ class CONTENT_EXPORT VideoCaptureOracle {
return smoothing_sampler_.min_capture_period();
}
+ // Returns the oracle's estimate of the duration of the next frame. This
+ // should be called just after ObserveEventAndDecideCapture(), and will only
+ // be non-zero if the call returned true.
+ base::TimeDelta estimated_frame_duration() const {
+ return duration_of_next_frame_;
+ }
+
private:
// Retrieve/Assign a frame timestamp by capture |frame_number|.
base::TimeTicks GetFrameTimestamp(int frame_number) const;
@@ -63,6 +70,11 @@ class CONTENT_EXPORT VideoCaptureOracle {
// sanity-check that event times are monotonically non-decreasing.
base::TimeTicks last_event_time_[kNumEvents];
+ // Updated by the last call to ObserveEventAndDecideCapture() with the
+ // estimated duration of the next frame to sample. This is zero if the method
+ // returned false.
+ base::TimeDelta duration_of_next_frame_;
+
// Stores the frame number from the last delivered frame.
int last_delivered_frame_number_;

Powered by Google App Engine
This is Rietveld 408576698