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

Side by Side Diff: media/renderers/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: Cleaned up. VideoFormat propagated. Test. 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_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 5 #ifndef MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "gpu/command_buffer/client/gles2_interface.h" 12 #include "gpu/command_buffer/client/gles2_interface.h"
13 #include "gpu/command_buffer/common/mailbox.h" 13 #include "gpu/command_buffer/common/mailbox.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/base/video_types.h"
15 #include "media/video/video_decode_accelerator.h" 16 #include "media/video/video_decode_accelerator.h"
16 #include "media/video/video_encode_accelerator.h" 17 #include "media/video/video_encode_accelerator.h"
17 #include "ui/gfx/gpu_memory_buffer.h" 18 #include "ui/gfx/gpu_memory_buffer.h"
18 19
19 namespace base { 20 namespace base {
20 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
21 class SharedMemory; 22 class SharedMemory;
22 } 23 }
23 24
24 namespace gfx { 25 namespace gfx {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void DeleteTexture(uint32 texture_id) = 0; 63 virtual void DeleteTexture(uint32 texture_id) = 0;
63 64
64 virtual void WaitSyncPoint(uint32 sync_point) = 0; 65 virtual void WaitSyncPoint(uint32 sync_point) = 0;
65 66
66 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 67 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
67 const gfx::Size& size, 68 const gfx::Size& size,
68 gfx::BufferFormat format, 69 gfx::BufferFormat format,
69 gfx::BufferUsage usage) = 0; 70 gfx::BufferUsage usage) = 0;
70 71
71 virtual unsigned ImageTextureTarget() = 0; 72 virtual unsigned ImageTextureTarget() = 0;
73 virtual VideoPixelFormat VideoFramePixelFormat() = 0;
72 virtual bool IsTextureRGSupported() = 0; 74 virtual bool IsTextureRGSupported() = 0;
73 75
74 virtual gpu::gles2::GLES2Interface* GetGLES2Interface() = 0; 76 virtual gpu::gles2::GLES2Interface* GetGLES2Interface() = 0;
75 77
76 // Allocate & return a shared memory segment. 78 // Allocate & return a shared memory segment.
77 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; 79 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0;
78 80
79 // Returns the task runner the video accelerator runs on. 81 // Returns the task runner the video accelerator runs on.
80 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; 82 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
81 83
82 // Returns the supported codec profiles of video decode accelerator. 84 // Returns the supported codec profiles of video decode accelerator.
83 virtual VideoDecodeAccelerator::SupportedProfiles 85 virtual VideoDecodeAccelerator::SupportedProfiles
84 GetVideoDecodeAcceleratorSupportedProfiles() = 0; 86 GetVideoDecodeAcceleratorSupportedProfiles() = 0;
85 87
86 // Returns the supported codec profiles of video encode accelerator. 88 // Returns the supported codec profiles of video encode accelerator.
87 virtual VideoEncodeAccelerator::SupportedProfiles 89 virtual VideoEncodeAccelerator::SupportedProfiles
88 GetVideoEncodeAcceleratorSupportedProfiles() = 0; 90 GetVideoEncodeAcceleratorSupportedProfiles() = 0;
89 91
90 protected: 92 protected:
91 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>; 93 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>;
92 virtual ~GpuVideoAcceleratorFactories() {} 94 virtual ~GpuVideoAcceleratorFactories() {}
93 }; 95 };
94 96
95 } // namespace media 97 } // namespace media
96 98
97 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 99 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698