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

Side by Side Diff: media/renderers/mock_gpu_video_accelerator_factories.h

Issue 1306693002: media: Convert I420 VideoFrame to UYVY GpuMemoryBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/CHECK_EQ/DCHECK_EQ. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 5 #ifndef MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
6 #define MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 6 #define MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "media/renderers/gpu_video_accelerator_factories.h" 10 #include "media/renderers/gpu_video_accelerator_factories.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, 45 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles,
46 VideoEncodeAccelerator::SupportedProfiles()); 46 VideoEncodeAccelerator::SupportedProfiles());
47 47
48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
49 const gfx::Size& size, 49 const gfx::Size& size,
50 gfx::BufferFormat format, 50 gfx::BufferFormat format,
51 gfx::BufferUsage usage) override; 51 gfx::BufferUsage usage) override;
52 52
53 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; 53 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override;
54 unsigned ImageTextureTarget() override; 54 unsigned ImageTextureTarget() override;
55 VideoPixelFormat VideoFrameOutputFormat() override {
56 return video_frame_output_format_;
57 };
58
59 void SetVideoFrameOutputFormat(
60 const VideoPixelFormat video_frame_output_format) {
61 video_frame_output_format_ = video_frame_output_format;
62 };
63
55 MOCK_METHOD0(IsTextureRGSupported, bool()); 64 MOCK_METHOD0(IsTextureRGSupported, bool());
56 MOCK_METHOD0(GetGLES2Interface, gpu::gles2::GLES2Interface*()); 65 MOCK_METHOD0(GetGLES2Interface, gpu::gles2::GLES2Interface*());
57 66
58 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override; 67 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override;
59 68
60 scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator() override; 69 scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator() override;
61 70
62 scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() override; 71 scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() override;
63 72
64 private: 73 private:
65 ~MockGpuVideoAcceleratorFactories() override; 74 ~MockGpuVideoAcceleratorFactories() override;
66 75
67 DISALLOW_COPY_AND_ASSIGN(MockGpuVideoAcceleratorFactories); 76 DISALLOW_COPY_AND_ASSIGN(MockGpuVideoAcceleratorFactories);
77
78 VideoPixelFormat video_frame_output_format_ = PIXEL_FORMAT_I420;
68 }; 79 };
69 80
70 } // namespace media 81 } // namespace media
71 82
72 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 83 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW
« no previous file with comments | « media/renderers/gpu_video_accelerator_factories.h ('k') | media/renderers/mock_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698