Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / public / renderer / video_frame_provider.h
blob08e51da9bdac039279879575c2ef0a309872360b
1 // Copyright 2013 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.
5 #ifndef CONTENT_PUBLIC_RENDERER_VIDEO_FRAME_PROVIDER_H_
6 #define CONTENT_PUBLIC_RENDERER_VIDEO_FRAME_PROVIDER_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
11 namespace media {
12 class VideoFrame;
15 namespace content {
17 // Define an interface to provide a sequence of video frames to clients.
18 // TODO(wjia): remove ref count.
19 // TODO(wjia): rename interface so it doesn't clash with cc::VideoFrameProvider.
20 class VideoFrameProvider
21 : public base::RefCountedThreadSafe<VideoFrameProvider> {
22 public:
23 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>&)>
24 RepaintCB;
26 // Start to provide video frames to the caller.
27 virtual void Start() = 0;
29 // Stop to provide video frames to the caller.
30 virtual void Stop() = 0;
32 // Resume to provide video frames to the caller after being paused.
33 virtual void Play() = 0;
35 // Put the provider in pause state and the caller will not receive video
36 // frames, but the provider might still generate video frames which are
37 // thrown away.
38 virtual void Pause() = 0;
40 protected:
41 friend class base::RefCountedThreadSafe<VideoFrameProvider>;
43 virtual ~VideoFrameProvider() {}
47 } // namespace content
49 #endif // CONTENT_PUBLIC_RENDERER_VIDEO_FRAME_PROVIDER_H_