blob: 18ebaa5b86ffdd91eb1a703ed88201bfa5659845 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// 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/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.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::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(done_cb, frame, DISPLAYED));
}
void ClocklessVideoFrameScheduler::Reset() {
}
} // namespace media
|