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

Side by Side Diff: media/filters/video_frame_scheduler.h

Issue 237093007: Introduce VideoFrameScheduler{Impl}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_VIDEO_FRAME_SCHEDULER_H_
6 #define MEDIA_FILTERS_VIDEO_FRAME_SCHEDULER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "media/base/media_export.h"
11
12 namespace media {
13
14 class VideoFrame;
15
16 // Defines an abstract video frame scheduler that is capable of managing the
17 // display of video frames at explicit times.
18 class MEDIA_EXPORT VideoFrameScheduler {
19 public:
20 VideoFrameScheduler() {}
21 virtual ~VideoFrameScheduler() {}
22
23 enum Reason {
24 DISPLAYED, // Frame was displayed.
25 DROPPED, // Frame was dropped.
26 RESET, // Scheduler was reset and frames are being returned.
acolwell GONE FROM CHROMIUM 2014/04/14 21:17:59 nit: Frames are returned in all cases so this comm
scherkus (not reviewing) 2014/04/14 21:35:31 Done.
27 };
28 typedef base::Callback<void(const scoped_refptr<VideoFrame>&, Reason)> DoneCB;
29
30 // Schedule |frame| to be displayed at |wall_ticks|, firing |done_cb| when
31 // the scheduler has finished with the frame.
32 //
33 // Assuming Reset() wasn't called, frames will be returned as either DISPLAYED
34 // or DROPPED.
acolwell GONE FROM CHROMIUM 2014/04/14 21:17:59 This part of the comment doesn't seem that helpful
scherkus (not reviewing) 2014/04/14 21:35:31 yeah -- removed
35 virtual void ScheduleVideoFrame(const scoped_refptr<VideoFrame>& frame,
36 base::TimeTicks wall_ticks,
37 const DoneCB& done_cb) = 0;
38
39 // Causes the scheduler to release all previously scheduled frames. Frames
40 // will be returned as RESET.
41 virtual void Reset() = 0;
42 };
43
44 } // namespace media
45
46 #endif // MEDIA_FILTERS_VIDEO_FRAME_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/video_frame_scheduler_impl.h » ('j') | media/filters/video_frame_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698