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

Unified Diff: media/filters/clockless_video_frame_scheduler.cc

Issue 257793004: Update VideoFrameScheduler API and add clockless and testing implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 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
« no previous file with comments | « media/filters/clockless_video_frame_scheduler.h ('k') | media/filters/test_video_frame_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/clockless_video_frame_scheduler.cc
diff --git a/media/filters/clockless_video_frame_scheduler.cc b/media/filters/clockless_video_frame_scheduler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b37d430776378739733d8e44308ac006bfc768e4
--- /dev/null
+++ b/media/filters/clockless_video_frame_scheduler.cc
@@ -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.
+
+#include "media/filters/clockless_video_frame_scheduler.h"
+
+#include "base/bind.h"
+#include "base/location.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "media/base/video_frame.h"
+
+namespace media {
+
+ClocklessVideoFrameScheduler::ClocklessVideoFrameScheduler(
+ const DisplayCB& display_cb)
+ : display_cb_(display_cb) {
+}
+
+ClocklessVideoFrameScheduler::~ClocklessVideoFrameScheduler() {
+}
+
+void ClocklessVideoFrameScheduler::ScheduleVideoFrame(
+ const scoped_refptr<VideoFrame>& frame,
+ base::TimeTicks /* wall_ticks */,
+ const DoneCB& done_cb) {
+ display_cb_.Run(frame);
+ base::MessageLoopProxy::current()->PostTask(
+ FROM_HERE, base::Bind(done_cb, frame, DISPLAYED));
+}
+
+void ClocklessVideoFrameScheduler::Reset() {
+}
+
+} // namespace media
« no previous file with comments | « media/filters/clockless_video_frame_scheduler.h ('k') | media/filters/test_video_frame_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698