summaryrefslogtreecommitdiffstats
path: root/chromium/media/filters/clockless_video_frame_scheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/filters/clockless_video_frame_scheduler.h')
-rw-r--r--chromium/media/filters/clockless_video_frame_scheduler.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/chromium/media/filters/clockless_video_frame_scheduler.h b/chromium/media/filters/clockless_video_frame_scheduler.h
new file mode 100644
index 00000000000..e52a73b91ed
--- /dev/null
+++ b/chromium/media/filters/clockless_video_frame_scheduler.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_
+#define MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_
+
+#include "media/filters/video_frame_scheduler.h"
+
+namespace media {
+
+// A scheduler that immediately displays frames.
+class ClocklessVideoFrameScheduler : public VideoFrameScheduler {
+ public:
+ typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> DisplayCB;
+
+ explicit ClocklessVideoFrameScheduler(const DisplayCB& display_cb);
+ virtual ~ClocklessVideoFrameScheduler();
+
+ // VideoFrameScheduler implementation.
+ virtual void ScheduleVideoFrame(const scoped_refptr<VideoFrame>& frame,
+ base::TimeTicks wall_ticks,
+ const DoneCB& done_cb) OVERRIDE;
+ virtual void Reset() OVERRIDE;
+
+ private:
+ DisplayCB display_cb_;
+
+ DISALLOW_COPY_AND_ASSIGN(ClocklessVideoFrameScheduler);
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_