| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "media/gpu/gpu_video_decode_accelerator_factory_impl.h" | 5 #include "media/gpu/gpu_video_decode_accelerator_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "gpu/command_buffer/service/gpu_preferences.h" | 8 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 9 #include "media/gpu/gpu_video_accelerator_util.h" | 9 #include "media/gpu/gpu_video_accelerator_util.h" |
| 10 #include "media/gpu/media_gpu_export.h" | 10 #include "media/gpu/media_gpu_export.h" |
| 11 | 11 |
| 12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 13 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
| 14 #include "media/gpu/dxva_video_decode_accelerator_win.h" | 14 #include "media/gpu/dxva_video_decode_accelerator_win.h" |
| 15 #elif defined(OS_MACOSX) | 15 #elif defined(OS_MACOSX) |
| 16 #include "media/gpu/vt_video_decode_accelerator_mac.h" | 16 #include "media/gpu/vt_video_decode_accelerator_mac.h" |
| 17 #elif defined(OS_CHROMEOS) | 17 #elif defined(OS_CHROMEOS) |
| 18 #if defined(USE_V4L2_CODEC) | 18 #if defined(USE_V4L2_CODEC) |
| 19 #include "media/gpu/v4l2_device.h" | 19 #include "media/gpu/v4l2_device.h" |
| 20 #include "media/gpu/v4l2_slice_video_decode_accelerator.h" | 20 #include "media/gpu/v4l2_slice_video_decode_accelerator.h" |
| 21 #include "media/gpu/v4l2_video_decode_accelerator.h" | 21 #include "media/gpu/v4l2_video_decode_accelerator.h" |
| 22 #include "ui/gl/gl_surface_egl.h" | 22 #include "ui/gl/gl_surface_egl.h" |
| 23 #endif | 23 #endif |
| 24 #if defined(ARCH_CPU_X86_FAMILY) | 24 #if defined(ARCH_CPU_X86_FAMILY) |
| 25 #include "media/gpu/vaapi_video_decode_accelerator.h" | 25 #include "media/gpu/vaapi_video_decode_accelerator.h" |
| 26 #include "ui/gl/gl_implementation.h" | 26 #include "ui/gl/gl_implementation.h" |
| 27 #endif | 27 #endif |
| 28 #elif defined(OS_ANDROID) | 28 #elif defined(OS_ANDROID) |
| 29 #include "media/gpu/android_video_decode_accelerator.h" | 29 #include "media/gpu/android_video_decode_accelerator.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 namespace media { | 32 namespace media { |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> | 35 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactory> |
| 36 GpuVideoDecodeAcceleratorFactoryImpl::Create( | 36 GpuVideoDecodeAcceleratorFactory::Create( |
| 37 const GetGLContextCallback& get_gl_context_cb, | 37 const GetGLContextCallback& get_gl_context_cb, |
| 38 const MakeGLContextCurrentCallback& make_context_current_cb, | 38 const MakeGLContextCurrentCallback& make_context_current_cb, |
| 39 const BindGLImageCallback& bind_image_cb) { | 39 const BindGLImageCallback& bind_image_cb) { |
| 40 return base::WrapUnique(new GpuVideoDecodeAcceleratorFactoryImpl( | 40 return base::WrapUnique(new GpuVideoDecodeAcceleratorFactory( |
| 41 get_gl_context_cb, make_context_current_cb, bind_image_cb, | 41 get_gl_context_cb, make_context_current_cb, bind_image_cb, |
| 42 GetGLES2DecoderCallback())); | 42 GetGLES2DecoderCallback())); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // static | 45 // static |
| 46 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> | 46 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactory> |
| 47 GpuVideoDecodeAcceleratorFactoryImpl::CreateWithGLES2Decoder( | 47 GpuVideoDecodeAcceleratorFactory::CreateWithGLES2Decoder( |
| 48 const GetGLContextCallback& get_gl_context_cb, | 48 const GetGLContextCallback& get_gl_context_cb, |
| 49 const MakeGLContextCurrentCallback& make_context_current_cb, | 49 const MakeGLContextCurrentCallback& make_context_current_cb, |
| 50 const BindGLImageCallback& bind_image_cb, | 50 const BindGLImageCallback& bind_image_cb, |
| 51 const GetGLES2DecoderCallback& get_gles2_decoder_cb) { | 51 const GetGLES2DecoderCallback& get_gles2_decoder_cb) { |
| 52 return base::WrapUnique(new GpuVideoDecodeAcceleratorFactoryImpl( | 52 return base::WrapUnique(new GpuVideoDecodeAcceleratorFactory( |
| 53 get_gl_context_cb, make_context_current_cb, bind_image_cb, | 53 get_gl_context_cb, make_context_current_cb, bind_image_cb, |
| 54 get_gles2_decoder_cb)); | 54 get_gles2_decoder_cb)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // static | 57 // static |
| 58 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> | 58 MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactory> |
| 59 GpuVideoDecodeAcceleratorFactoryImpl::CreateWithNoGL() { | 59 GpuVideoDecodeAcceleratorFactory::CreateWithNoGL() { |
| 60 return Create(GetGLContextCallback(), MakeGLContextCurrentCallback(), | 60 return Create(GetGLContextCallback(), MakeGLContextCurrentCallback(), |
| 61 BindGLImageCallback()); | 61 BindGLImageCallback()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // static | 64 // static |
| 65 MEDIA_GPU_EXPORT gpu::VideoDecodeAcceleratorCapabilities | 65 MEDIA_GPU_EXPORT gpu::VideoDecodeAcceleratorCapabilities |
| 66 GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities( | 66 GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities( |
| 67 const gpu::GpuPreferences& gpu_preferences) { | 67 const gpu::GpuPreferences& gpu_preferences) { |
| 68 VideoDecodeAccelerator::Capabilities capabilities; | 68 VideoDecodeAccelerator::Capabilities capabilities; |
| 69 if (gpu_preferences.disable_accelerated_video_decode) | 69 if (gpu_preferences.disable_accelerated_video_decode) |
| 70 return gpu::VideoDecodeAcceleratorCapabilities(); | 70 return gpu::VideoDecodeAcceleratorCapabilities(); |
| 71 | 71 |
| 72 // Query VDAs for their capabilities and construct a set of supported | 72 // Query VDAs for their capabilities and construct a set of supported |
| 73 // profiles for current platform. This must be done in the same order as in | 73 // profiles for current platform. This must be done in the same order as in |
| 74 // CreateVDA(), as we currently preserve additional capabilities (such as | 74 // CreateVDA(), as we currently preserve additional capabilities (such as |
| 75 // resolutions supported) only for the first VDA supporting the given codec | 75 // resolutions supported) only for the first VDA supporting the given codec |
| 76 // profile (instead of calculating a superset). | 76 // profile (instead of calculating a superset). |
| 77 // TODO(posciak,henryhsu): improve this so that we choose a superset of | 77 // TODO(posciak,henryhsu): improve this so that we choose a superset of |
| 78 // resolutions and other supported profile parameters. | 78 // resolutions and other supported profile parameters. |
| 79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
| 80 capabilities.supported_profiles = | 80 capabilities.supported_profiles = |
| 81 DXVAVideoDecodeAccelerator::GetSupportedProfiles(); | 81 DXVAVideoDecodeAccelerator::GetSupportedProfiles(); |
| 82 #elif defined(OS_CHROMEOS) | 82 #elif defined(OS_CHROMEOS) |
| 83 VideoDecodeAccelerator::SupportedProfiles vda_profiles; | 83 VideoDecodeAccelerator::SupportedProfiles vda_profiles; |
| 84 #if defined(USE_V4L2_CODEC) | 84 #if defined(USE_V4L2_CODEC) |
| 85 vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles(); | 85 vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles(); |
| 86 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( | 86 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( |
| 87 vda_profiles, &capabilities.supported_profiles); | 87 vda_profiles, &capabilities.supported_profiles); |
| 88 vda_profiles = V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles(); | 88 vda_profiles = V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 99 VTVideoDecodeAccelerator::GetSupportedProfiles(); | 99 VTVideoDecodeAccelerator::GetSupportedProfiles(); |
| 100 #elif defined(OS_ANDROID) | 100 #elif defined(OS_ANDROID) |
| 101 capabilities = | 101 capabilities = |
| 102 AndroidVideoDecodeAccelerator::GetCapabilities(gpu_preferences); | 102 AndroidVideoDecodeAccelerator::GetCapabilities(gpu_preferences); |
| 103 #endif | 103 #endif |
| 104 return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities( | 104 return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities( |
| 105 capabilities); | 105 capabilities); |
| 106 } | 106 } |
| 107 | 107 |
| 108 MEDIA_GPU_EXPORT std::unique_ptr<VideoDecodeAccelerator> | 108 MEDIA_GPU_EXPORT std::unique_ptr<VideoDecodeAccelerator> |
| 109 GpuVideoDecodeAcceleratorFactoryImpl::CreateVDA( | 109 GpuVideoDecodeAcceleratorFactory::CreateVDA( |
| 110 VideoDecodeAccelerator::Client* client, | 110 VideoDecodeAccelerator::Client* client, |
| 111 const VideoDecodeAccelerator::Config& config, | 111 const VideoDecodeAccelerator::Config& config, |
| 112 const gpu::GpuDriverBugWorkarounds& workarounds, | 112 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 113 const gpu::GpuPreferences& gpu_preferences) { | 113 const gpu::GpuPreferences& gpu_preferences) { |
| 114 DCHECK(thread_checker_.CalledOnValidThread()); | 114 DCHECK(thread_checker_.CalledOnValidThread()); |
| 115 | 115 |
| 116 if (gpu_preferences.disable_accelerated_video_decode) | 116 if (gpu_preferences.disable_accelerated_video_decode) |
| 117 return nullptr; | 117 return nullptr; |
| 118 | 118 |
| 119 // Array of Create..VDA() function pointers, potentially usable on current | 119 // Array of Create..VDA() function pointers, potentially usable on current |
| 120 // platform. This list is ordered by priority, from most to least preferred, | 120 // platform. This list is ordered by priority, from most to least preferred, |
| 121 // if applicable. This list must be in the same order as the querying order | 121 // if applicable. This list must be in the same order as the querying order |
| 122 // in GetDecoderCapabilities() above. | 122 // in GetDecoderCapabilities() above. |
| 123 using CreateVDAFp = std::unique_ptr<VideoDecodeAccelerator> ( | 123 using CreateVDAFp = std::unique_ptr<VideoDecodeAccelerator> ( |
| 124 GpuVideoDecodeAcceleratorFactoryImpl::*)( | 124 GpuVideoDecodeAcceleratorFactory::*)(const gpu::GpuDriverBugWorkarounds&, |
| 125 const gpu::GpuDriverBugWorkarounds&, const gpu::GpuPreferences&) const; | 125 const gpu::GpuPreferences&) const; |
| 126 const CreateVDAFp create_vda_fps[] = { | 126 const CreateVDAFp create_vda_fps[] = { |
| 127 #if defined(OS_WIN) | 127 #if defined(OS_WIN) |
| 128 &GpuVideoDecodeAcceleratorFactoryImpl::CreateDXVAVDA, | 128 &GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA, |
| 129 #endif | 129 #endif |
| 130 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) | 130 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| 131 &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA, | 131 &GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA, |
| 132 &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA, | 132 &GpuVideoDecodeAcceleratorFactory::CreateV4L2SVDA, |
| 133 #endif | 133 #endif |
| 134 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 134 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 135 &GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA, | 135 &GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA, |
| 136 #endif | 136 #endif |
| 137 #if defined(OS_MACOSX) | 137 #if defined(OS_MACOSX) |
| 138 &GpuVideoDecodeAcceleratorFactoryImpl::CreateVTVDA, | 138 &GpuVideoDecodeAcceleratorFactory::CreateVTVDA, |
| 139 #endif | 139 #endif |
| 140 #if defined(OS_ANDROID) | 140 #if defined(OS_ANDROID) |
| 141 &GpuVideoDecodeAcceleratorFactoryImpl::CreateAndroidVDA, | 141 &GpuVideoDecodeAcceleratorFactory::CreateAndroidVDA, |
| 142 #endif | 142 #endif |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 std::unique_ptr<VideoDecodeAccelerator> vda; | 145 std::unique_ptr<VideoDecodeAccelerator> vda; |
| 146 | 146 |
| 147 for (const auto& create_vda_function : create_vda_fps) { | 147 for (const auto& create_vda_function : create_vda_fps) { |
| 148 vda = (this->*create_vda_function)(workarounds, gpu_preferences); | 148 vda = (this->*create_vda_function)(workarounds, gpu_preferences); |
| 149 if (vda && vda->Initialize(config, client)) | 149 if (vda && vda->Initialize(config, client)) |
| 150 return vda; | 150 return vda; |
| 151 } | 151 } |
| 152 | 152 |
| 153 return nullptr; | 153 return nullptr; |
| 154 } | 154 } |
| 155 | 155 |
| 156 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
| 157 std::unique_ptr<VideoDecodeAccelerator> | 157 std::unique_ptr<VideoDecodeAccelerator> |
| 158 GpuVideoDecodeAcceleratorFactoryImpl::CreateDXVAVDA( | 158 GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA( |
| 159 const gpu::GpuDriverBugWorkarounds& workarounds, | 159 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 160 const gpu::GpuPreferences& gpu_preferences) const { | 160 const gpu::GpuPreferences& gpu_preferences) const { |
| 161 std::unique_ptr<VideoDecodeAccelerator> decoder; | 161 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 162 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { | 162 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { |
| 163 DVLOG(0) << "Initializing DXVA HW decoder for windows."; | 163 DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
| 164 decoder.reset(new DXVAVideoDecodeAccelerator(get_gl_context_cb_, | 164 decoder.reset(new DXVAVideoDecodeAccelerator(get_gl_context_cb_, |
| 165 make_context_current_cb_, | 165 make_context_current_cb_, |
| 166 workarounds, gpu_preferences)); | 166 workarounds, gpu_preferences)); |
| 167 } | 167 } |
| 168 return decoder; | 168 return decoder; |
| 169 } | 169 } |
| 170 #endif | 170 #endif |
| 171 | 171 |
| 172 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) | 172 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| 173 std::unique_ptr<VideoDecodeAccelerator> | 173 std::unique_ptr<VideoDecodeAccelerator> |
| 174 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA( | 174 GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA( |
| 175 const gpu::GpuDriverBugWorkarounds& workarounds, | 175 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 176 const gpu::GpuPreferences& gpu_preferences) const { | 176 const gpu::GpuPreferences& gpu_preferences) const { |
| 177 std::unique_ptr<VideoDecodeAccelerator> decoder; | 177 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 178 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 178 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 179 if (device.get()) { | 179 if (device.get()) { |
| 180 decoder.reset(new V4L2VideoDecodeAccelerator( | 180 decoder.reset(new V4L2VideoDecodeAccelerator( |
| 181 gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, | 181 gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, |
| 182 make_context_current_cb_, device)); | 182 make_context_current_cb_, device)); |
| 183 } | 183 } |
| 184 return decoder; | 184 return decoder; |
| 185 } | 185 } |
| 186 | 186 |
| 187 std::unique_ptr<VideoDecodeAccelerator> | 187 std::unique_ptr<VideoDecodeAccelerator> |
| 188 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA( | 188 GpuVideoDecodeAcceleratorFactory::CreateV4L2SVDA( |
| 189 const gpu::GpuDriverBugWorkarounds& workarounds, | 189 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 190 const gpu::GpuPreferences& gpu_preferences) const { | 190 const gpu::GpuPreferences& gpu_preferences) const { |
| 191 std::unique_ptr<VideoDecodeAccelerator> decoder; | 191 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 192 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 192 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 193 if (device.get()) { | 193 if (device.get()) { |
| 194 decoder.reset(new V4L2SliceVideoDecodeAccelerator( | 194 decoder.reset(new V4L2SliceVideoDecodeAccelerator( |
| 195 device, gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, | 195 device, gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, |
| 196 make_context_current_cb_)); | 196 make_context_current_cb_)); |
| 197 } | 197 } |
| 198 return decoder; | 198 return decoder; |
| 199 } | 199 } |
| 200 #endif | 200 #endif |
| 201 | 201 |
| 202 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 202 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 203 std::unique_ptr<VideoDecodeAccelerator> | 203 std::unique_ptr<VideoDecodeAccelerator> |
| 204 GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA( | 204 GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA( |
| 205 const gpu::GpuDriverBugWorkarounds& workarounds, | 205 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 206 const gpu::GpuPreferences& gpu_preferences) const { | 206 const gpu::GpuPreferences& gpu_preferences) const { |
| 207 std::unique_ptr<VideoDecodeAccelerator> decoder; | 207 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 208 decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_, | 208 decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_, |
| 209 bind_image_cb_)); | 209 bind_image_cb_)); |
| 210 return decoder; | 210 return decoder; |
| 211 } | 211 } |
| 212 #endif | 212 #endif |
| 213 | 213 |
| 214 #if defined(OS_MACOSX) | 214 #if defined(OS_MACOSX) |
| 215 std::unique_ptr<VideoDecodeAccelerator> | 215 std::unique_ptr<VideoDecodeAccelerator> |
| 216 GpuVideoDecodeAcceleratorFactoryImpl::CreateVTVDA( | 216 GpuVideoDecodeAcceleratorFactory::CreateVTVDA( |
| 217 const gpu::GpuDriverBugWorkarounds& workarounds, | 217 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 218 const gpu::GpuPreferences& gpu_preferences) const { | 218 const gpu::GpuPreferences& gpu_preferences) const { |
| 219 std::unique_ptr<VideoDecodeAccelerator> decoder; | 219 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 220 decoder.reset( | 220 decoder.reset( |
| 221 new VTVideoDecodeAccelerator(make_context_current_cb_, bind_image_cb_)); | 221 new VTVideoDecodeAccelerator(make_context_current_cb_, bind_image_cb_)); |
| 222 return decoder; | 222 return decoder; |
| 223 } | 223 } |
| 224 #endif | 224 #endif |
| 225 | 225 |
| 226 #if defined(OS_ANDROID) | 226 #if defined(OS_ANDROID) |
| 227 std::unique_ptr<VideoDecodeAccelerator> | 227 std::unique_ptr<VideoDecodeAccelerator> |
| 228 GpuVideoDecodeAcceleratorFactoryImpl::CreateAndroidVDA( | 228 GpuVideoDecodeAcceleratorFactory::CreateAndroidVDA( |
| 229 const gpu::GpuDriverBugWorkarounds& workarounds, | 229 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 230 const gpu::GpuPreferences& gpu_preferences) const { | 230 const gpu::GpuPreferences& gpu_preferences) const { |
| 231 std::unique_ptr<VideoDecodeAccelerator> decoder; | 231 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 232 decoder.reset(new AndroidVideoDecodeAccelerator(make_context_current_cb_, | 232 decoder.reset(new AndroidVideoDecodeAccelerator(make_context_current_cb_, |
| 233 get_gles2_decoder_cb_)); | 233 get_gles2_decoder_cb_)); |
| 234 return decoder; | 234 return decoder; |
| 235 } | 235 } |
| 236 #endif | 236 #endif |
| 237 | 237 |
| 238 GpuVideoDecodeAcceleratorFactoryImpl::GpuVideoDecodeAcceleratorFactoryImpl( | 238 GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory( |
| 239 const GetGLContextCallback& get_gl_context_cb, | 239 const GetGLContextCallback& get_gl_context_cb, |
| 240 const MakeGLContextCurrentCallback& make_context_current_cb, | 240 const MakeGLContextCurrentCallback& make_context_current_cb, |
| 241 const BindGLImageCallback& bind_image_cb, | 241 const BindGLImageCallback& bind_image_cb, |
| 242 const GetGLES2DecoderCallback& get_gles2_decoder_cb) | 242 const GetGLES2DecoderCallback& get_gles2_decoder_cb) |
| 243 : get_gl_context_cb_(get_gl_context_cb), | 243 : get_gl_context_cb_(get_gl_context_cb), |
| 244 make_context_current_cb_(make_context_current_cb), | 244 make_context_current_cb_(make_context_current_cb), |
| 245 bind_image_cb_(bind_image_cb), | 245 bind_image_cb_(bind_image_cb), |
| 246 get_gles2_decoder_cb_(get_gles2_decoder_cb) {} | 246 get_gles2_decoder_cb_(get_gles2_decoder_cb) {} |
| 247 | 247 |
| 248 GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {} | 248 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} |
| 249 | 249 |
| 250 } // namespace media | 250 } // namespace media |
| OLD | NEW |