| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ | 5 #ifndef CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ |
| 6 #define CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ | 6 #define CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ |
| 7 | 7 |
| 8 #include "chrome/gpu/media/gpu_video_device.h" | 8 #include "chrome/gpu/media/gpu_video_device.h" |
| 9 | 9 |
| 10 // A simple GpuVideoDevice that create VideoFrame with GL textures. | 10 // A simple GpuVideoDevice that create VideoFrame with GL textures. |
| 11 // It uploads frames in RGBA format in system memory to the GL texture. | 11 // It uploads frames in RGBA format in system memory to the GL texture. |
| 12 class FakeGlVideoDevice : public GpuVideoDevice { | 12 class FakeGlVideoDevice : public GpuVideoDevice { |
| 13 public: | 13 public: |
| 14 virtual ~FakeGlVideoDevice() {} | 14 virtual ~FakeGlVideoDevice() {} |
| 15 | 15 |
| 16 virtual void* GetDevice(); | 16 virtual void* GetDevice(); |
| 17 virtual bool CreateVideoFrameFromGlTextures( | 17 virtual bool CreateVideoFrameFromGlTextures( |
| 18 size_t width, size_t height, media::VideoFrame::Format format, | 18 size_t width, size_t height, media::VideoFrame::Format format, |
| 19 const std::vector<media::VideoFrame::GlTexture>& textures, | 19 const std::vector<media::VideoFrame::GlTexture>& textures, |
| 20 scoped_refptr<media::VideoFrame>* frame); | 20 scoped_refptr<media::VideoFrame>* frame); |
| 21 virtual void ReleaseVideoFrame( | 21 virtual void ReleaseVideoFrame( |
| 22 const scoped_refptr<media::VideoFrame>& frame); | 22 const scoped_refptr<media::VideoFrame>& frame); |
| 23 virtual bool UploadToVideoFrame(void* buffer, | 23 virtual bool ConvertToVideoFrame(void* buffer, |
| 24 scoped_refptr<media::VideoFrame> frame); | 24 scoped_refptr<media::VideoFrame> frame); |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 #endif // CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ | 27 #endif // CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ |
| OLD | NEW |