OLD | NEW |
| (Empty) |
1 // Copyright 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 CC_TEST_FAKE_VIDEO_FRAME_H_ | |
6 #define CC_TEST_FAKE_VIDEO_FRAME_H_ | |
7 | |
8 #include "media/base/video_frame.h" | |
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrame.h" | |
10 | |
11 namespace cc { | |
12 | |
13 class FakeVideoFrame : public WebKit::WebVideoFrame { | |
14 public: | |
15 explicit FakeVideoFrame(const scoped_refptr<media::VideoFrame>& frame); | |
16 virtual ~FakeVideoFrame(); | |
17 | |
18 // WebKit::WebVideoFrame implementation. | |
19 virtual Format format() const; | |
20 virtual unsigned width() const; | |
21 virtual unsigned height() const; | |
22 virtual unsigned planes() const; | |
23 virtual int stride(unsigned plane) const; | |
24 virtual const void* data(unsigned plane) const; | |
25 virtual unsigned textureId() const; | |
26 virtual unsigned textureTarget() const; | |
27 virtual WebKit::WebRect visibleRect() const; | |
28 virtual WebKit::WebSize textureSize() const; | |
29 | |
30 static media::VideoFrame* ToVideoFrame( | |
31 WebKit::WebVideoFrame* web_video_frame); | |
32 | |
33 private: | |
34 scoped_refptr<media::VideoFrame> frame_; | |
35 }; | |
36 | |
37 } // namespace cc | |
38 | |
39 #endif // CC_TEST_FAKE_VIDEO_FRAME_H_ | |
OLD | NEW |