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

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: Rebase. Address andresantoso's comments. 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; 72 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0;
72 virtual unsigned ImageTextureTarget() = 0; 73 virtual unsigned ImageTextureTarget() = 0;
74 virtual VideoPixelFormat VideoFramePixelFormat() = 0;
xhwang 2015/08/21 20:53:07 add a comment?
Daniele Castagna 2015/08/21 21:28:17 Done.
73 virtual bool IsTextureRGSupported() = 0; 75 virtual bool IsTextureRGSupported() = 0;
74 76
75 virtual gpu::gles2::GLES2Interface* GetGLES2Interface() = 0; 77 virtual gpu::gles2::GLES2Interface* GetGLES2Interface() = 0;
76 78
77 // Allocate & return a shared memory segment. 79 // Allocate & return a shared memory segment.
78 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; 80 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0;
79 81
80 // Returns the task runner the video accelerator runs on. 82 // Returns the task runner the video accelerator runs on.
81 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; 83 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
82 84
83 // Returns the supported codec profiles of video decode accelerator. 85 // Returns the supported codec profiles of video decode accelerator.
84 virtual VideoDecodeAccelerator::SupportedProfiles 86 virtual VideoDecodeAccelerator::SupportedProfiles
85 GetVideoDecodeAcceleratorSupportedProfiles() = 0; 87 GetVideoDecodeAcceleratorSupportedProfiles() = 0;
86 88
87 // Returns the supported codec profiles of video encode accelerator. 89 // Returns the supported codec profiles of video encode accelerator.
88 virtual VideoEncodeAccelerator::SupportedProfiles 90 virtual VideoEncodeAccelerator::SupportedProfiles
89 GetVideoEncodeAcceleratorSupportedProfiles() = 0; 91 GetVideoEncodeAcceleratorSupportedProfiles() = 0;
90 92
91 protected: 93 protected:
92 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>; 94 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>;
93 virtual ~GpuVideoAcceleratorFactories() {} 95 virtual ~GpuVideoAcceleratorFactories() {}
94 }; 96 };
95 97
96 } // namespace media 98 } // namespace media
97 99
98 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 100 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698