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 #include "media/filters/clockless_video_frame_scheduler.h" |
| 6 |
| 7 #include "base/bind.h" |
| 8 #include "base/location.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "media/base/video_frame.h" |
| 11 |
| 12 namespace media { |
| 13 |
| 14 ClocklessVideoFrameScheduler::ClocklessVideoFrameScheduler( |
| 15 const DisplayCB& display_cb) |
| 16 : display_cb_(display_cb) { |
| 17 } |
| 18 |
| 19 ClocklessVideoFrameScheduler::~ClocklessVideoFrameScheduler() { |
| 20 } |
| 21 |
| 22 void ClocklessVideoFrameScheduler::ScheduleVideoFrame( |
| 23 const scoped_refptr<VideoFrame>& frame, |
| 24 base::TimeTicks wall_ticks, |
| 25 const DoneCB& done_cb) { |
| 26 display_cb_.Run(frame); |
| 27 base::MessageLoopProxy::current()->PostTask( |
| 28 FROM_HERE, base::Bind(done_cb, frame, DISPLAYED)); |
| 29 } |
| 30 |
| 31 void ClocklessVideoFrameScheduler::Reset() { |
| 32 } |
| 33 |
| 34 } // namespace media |
OLD | NEW |