Index: webkit/media/video_frame_provider.h |
=================================================================== |
--- webkit/media/video_frame_provider.h (revision 0) |
+++ webkit/media/video_frame_provider.h (revision 0) |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2012 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. |
+ |
+#ifndef WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
+#define WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
+ |
+#include "base/callback.h" |
+#include "base/memory/ref_counted.h" |
+ |
+namespace media { |
+class VideoFrame; |
+} |
+ |
+namespace webkit_media { |
+ |
+typedef base::Callback<void(const scoped_refptr<media::VideoFrame>&)> RepaintCB; |
scherkus (not reviewing)
2012/09/07 11:44:03
move this inside VFP class
wjia(left Chromium)
2012/09/13 01:22:07
Done.
|
+ |
+// Define an interface to provide a sequence of video frames to clients. |
+class VideoFrameProvider |
+ : public base::RefCountedThreadSafe<VideoFrameProvider> { |
scherkus (not reviewing)
2012/09/07 11:44:03
does this have to be refcounted?
would having imp
wjia(left Chromium)
2012/09/13 01:22:07
Some derived class needs ref counted, because it w
scherkus (not reviewing)
2012/09/13 10:25:24
Being accessed on two threads doesn't imply a clas
wjia(left Chromium)
2012/09/19 03:22:06
You are right. I have thought about refactoring me
|
+ public: |
+ virtual void Start() = 0; |
scherkus (not reviewing)
2012/09/07 11:44:03
docs for interface methods
wjia(left Chromium)
2012/09/13 01:22:07
Done.
|
+ virtual void Stop() = 0; |
+ virtual void Play() = 0; |
+ virtual void Pause() = 0; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<VideoFrameProvider>; |
+ VideoFrameProvider(); |
+ virtual ~VideoFrameProvider(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(VideoFrameProvider); |
+}; |
+ |
+} // namespace webkit_media |
+ |
+#endif // WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
Property changes on: webkit/media/video_frame_provider.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |