OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
| 6 #define WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 |
| 10 namespace media { |
| 11 class VideoFrame; |
| 12 } |
| 13 |
| 14 namespace webkit_media { |
| 15 |
| 16 // Define an interface for media stream client to get some information about |
| 17 // the media stream. |
| 18 class VideoFrameProvider |
| 19 : public base::RefCountedThreadSafe<VideoFrameProvider> { |
| 20 public: |
| 21 VideoFrameProvider() {} |
| 22 virtual void Start() = 0; |
| 23 virtual void Stop(const base::Closure& callback) = 0; |
| 24 virtual void GetCurrentFrame(scoped_refptr<media::VideoFrame> *frame_out) = 0; |
| 25 virtual void PutCurrentFrame( |
| 26 scoped_refptr<media::VideoFrame> returned_frame) = 0; |
| 27 // Add more API, such as GetFrameSize, etc. |
| 28 |
| 29 protected: |
| 30 friend class base::RefCountedThreadSafe<VideoFrameProvider>; |
| 31 virtual ~VideoFrameProvider() {} |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(VideoFrameProvider); |
| 35 }; |
| 36 |
| 37 } // namespace webkit_media |
| 38 |
| 39 #endif // WEBKIT_MEDIA_VIDEO_FRAME_PROVIDER_H_ |
OLD | NEW |