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

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

Issue 1133563010: Add a GpuMemoryBuffer pool that creates hardware backed VideoFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reveman@'s nits. Created 5 years, 7 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/common/mailbox.h" 13 #include "gpu/command_buffer/common/mailbox.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 #include "media/video/video_decode_accelerator.h" 15 #include "media/video/video_decode_accelerator.h"
15 #include "media/video/video_encode_accelerator.h" 16 #include "media/video/video_encode_accelerator.h"
17 #include "ui/gfx/gpu_memory_buffer.h"
16 18
17 namespace base { 19 namespace base {
18 class SingleThreadTaskRunner; 20 class SingleThreadTaskRunner;
19 class SharedMemory; 21 class SharedMemory;
20 } 22 }
21 23
22 namespace gfx { 24 namespace gfx {
23 class Rect; 25 class Rect;
24 class Size; 26 class Size;
25 } 27 }
(...skipping 26 matching lines...) Expand all
52 // Allocate & delete native textures. 54 // Allocate & delete native textures.
53 virtual bool CreateTextures(int32 count, 55 virtual bool CreateTextures(int32 count,
54 const gfx::Size& size, 56 const gfx::Size& size,
55 std::vector<uint32>* texture_ids, 57 std::vector<uint32>* texture_ids,
56 std::vector<gpu::Mailbox>* texture_mailboxes, 58 std::vector<gpu::Mailbox>* texture_mailboxes,
57 uint32 texture_target) = 0; 59 uint32 texture_target) = 0;
58 virtual void DeleteTexture(uint32 texture_id) = 0; 60 virtual void DeleteTexture(uint32 texture_id) = 0;
59 61
60 virtual void WaitSyncPoint(uint32 sync_point) = 0; 62 virtual void WaitSyncPoint(uint32 sync_point) = 0;
61 63
64 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
65 const gfx::Size& size,
66 gfx::GpuMemoryBuffer::Format format,
67 gfx::GpuMemoryBuffer::Usage usage) = 0;
68
69 virtual bool IsTextureRGSupported() = 0;
70
71 virtual gpu::gles2::GLES2Interface* GetGLES2Interface() = 0;
72
62 // Allocate & return a shared memory segment. 73 // Allocate & return a shared memory segment.
63 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; 74 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0;
64 75
65 // Returns the task runner the video accelerator runs on. 76 // Returns the task runner the video accelerator runs on.
66 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; 77 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
67 78
68 // Returns the supported codec profiles of video decode accelerator. 79 // Returns the supported codec profiles of video decode accelerator.
69 virtual VideoDecodeAccelerator::SupportedProfiles 80 virtual VideoDecodeAccelerator::SupportedProfiles
70 GetVideoDecodeAcceleratorSupportedProfiles() = 0; 81 GetVideoDecodeAcceleratorSupportedProfiles() = 0;
71 82
72 // Returns the supported codec profiles of video encode accelerator. 83 // Returns the supported codec profiles of video encode accelerator.
73 virtual VideoEncodeAccelerator::SupportedProfiles 84 virtual VideoEncodeAccelerator::SupportedProfiles
74 GetVideoEncodeAcceleratorSupportedProfiles() = 0; 85 GetVideoEncodeAcceleratorSupportedProfiles() = 0;
75 86
76 protected: 87 protected:
77 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>; 88 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>;
78 virtual ~GpuVideoAcceleratorFactories() {} 89 virtual ~GpuVideoAcceleratorFactories() {}
79 }; 90 };
80 91
81 } // namespace media 92 } // namespace media
82 93
83 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 94 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW
« no previous file with comments | « media/renderers/default_renderer_factory.cc ('k') | media/renderers/mock_gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698