OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_ |
| 6 #define MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_ |
| 7 |
| 8 #include "media/filters/video_frame_scheduler.h" |
| 9 |
| 10 namespace media { |
| 11 |
| 12 // A scheduler that immediately displays frames. |
| 13 class ClocklessVideoFrameScheduler : public VideoFrameScheduler { |
| 14 public: |
| 15 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> DisplayCB; |
| 16 |
| 17 explicit ClocklessVideoFrameScheduler(const DisplayCB& display_cb); |
| 18 virtual ~ClocklessVideoFrameScheduler(); |
| 19 |
| 20 // VideoFrameScheduler implementation. |
| 21 virtual void ScheduleVideoFrame(const scoped_refptr<VideoFrame>& frame, |
| 22 base::TimeTicks wall_ticks, |
| 23 const DoneCB& done_cb) OVERRIDE; |
| 24 virtual void Reset() OVERRIDE; |
| 25 |
| 26 private: |
| 27 DisplayCB display_cb_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(ClocklessVideoFrameScheduler); |
| 30 }; |
| 31 |
| 32 } // namespace media |
| 33 |
| 34 #endif // MEDIA_FILTERS_CLOCKLESS_VIDEO_FRAME_SCHEDULER_H_ |
OLD | NEW |