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

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

Issue 1864813002: Tab/Desktop Capture: Use requests instead of timer-based refreshing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_refresh_from_sinks
Patch Set: Fix WCVCD unit tests that test resize policies. Created 4 years, 8 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: media/capture/content/video_capture_oracle.h
diff --git a/media/capture/content/video_capture_oracle.h b/media/capture/content/video_capture_oracle.h
index 8c4f6827e582d8ed7fe5f64ce8418143ff392b78..92a63a45a9c8b58c477691bec299a27c97b4d3e8 100644
--- a/media/capture/content/video_capture_oracle.h
+++ b/media/capture/content/video_capture_oracle.h
@@ -24,19 +24,13 @@ namespace media {
class MEDIA_EXPORT VideoCaptureOracle {
public:
enum Event {
- kTimerPoll,
kCompositorUpdate,
+ kActiveRefreshRequest,
+ kPassiveRefreshRequest,
kMouseCursorUpdate,
kNumEvents,
};
- enum {
- // The recommended minimum amount of time between calls to
- // ObserveEventAndDecideCapture() for the kTimerPoll Event type. Anything
- // lower than this isn't harmful, just wasteful.
- kMinTimerPollPeriodMillis = 125, // 8 FPS
- };
-
VideoCaptureOracle(base::TimeDelta min_capture_period,
const gfx::Size& max_frame_size,
media::ResolutionChangePolicy resolution_change_policy,
@@ -104,6 +98,10 @@ class MEDIA_EXPORT VideoCaptureOracle {
return last_time_animation_was_detected_;
}
+ // Returns a NUL-terminated string containing a short, human-readable form of
+ // |event|.
+ static const char* EventAsString(Event event);
+
private:
// Retrieve/Assign a frame timestamp by capture |frame_number|. Only valid
// when IsFrameInRecentHistory(frame_number) returns true.

Powered by Google App Engine
This is Rietveld 408576698