| OLD | NEW |
| 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/common/mailbox.h" | 12 #include "gpu/command_buffer/common/mailbox.h" |
| 13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
| 14 #include "media/video/video_decode_accelerator.h" |
| 14 #include "media/video/video_encode_accelerator.h" | 15 #include "media/video/video_encode_accelerator.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class SingleThreadTaskRunner; | 18 class SingleThreadTaskRunner; |
| 18 class SharedMemory; | 19 class SharedMemory; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace gfx { | 22 namespace gfx { |
| 22 class Rect; | 23 class Rect; |
| 23 class Size; | 24 class Size; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual void DeleteTexture(uint32 texture_id) = 0; | 58 virtual void DeleteTexture(uint32 texture_id) = 0; |
| 58 | 59 |
| 59 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 60 virtual void WaitSyncPoint(uint32 sync_point) = 0; |
| 60 | 61 |
| 61 // Allocate & return a shared memory segment. | 62 // Allocate & return a shared memory segment. |
| 62 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; | 63 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; |
| 63 | 64 |
| 64 // Returns the task runner the video accelerator runs on. | 65 // Returns the task runner the video accelerator runs on. |
| 65 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; | 66 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; |
| 66 | 67 |
| 67 // Returns the supported codec profiles of video encode accelerator. | 68 // Returns true if video decode accelerator can query the supported codec |
| 68 virtual std::vector<VideoEncodeAccelerator::SupportedProfile> | 69 // profiles and store profiles in |supported_profiles|. |
| 69 GetVideoEncodeAcceleratorSupportedProfiles() = 0; | 70 virtual bool GetVideoDecodeAcceleratorSupportedProfiles( |
| 71 std::vector<VideoDecodeAccelerator::SupportedProfile>* |
| 72 supported_profiles) = 0; |
| 73 |
| 74 // |supported_profiles| stores the supported codec profiles of video encode |
| 75 // accelerator. |
| 76 virtual void GetVideoEncodeAcceleratorSupportedProfiles( |
| 77 std::vector<VideoEncodeAccelerator::SupportedProfile>* |
| 78 supported_profiles) = 0; |
| 70 | 79 |
| 71 protected: | 80 protected: |
| 72 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>; | 81 friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>; |
| 73 virtual ~GpuVideoAcceleratorFactories(); | 82 virtual ~GpuVideoAcceleratorFactories(); |
| 74 }; | 83 }; |
| 75 | 84 |
| 76 } // namespace media | 85 } // namespace media |
| 77 | 86 |
| 78 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 87 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
| OLD | NEW |