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

Unified Diff: webkit/media/video_frame_provider.h

Issue 10918052: create a separate WebMediaPlayer for URL derived from media stream (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win build Created 8 years, 3 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
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

Powered by Google App Engine
This is Rietveld 408576698