| 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.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" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(gpu_preferences); |
| 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(); |
| 89 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( | 89 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( |
| 90 vda_profiles, &capabilities.supported_profiles); | 90 vda_profiles, &capabilities.supported_profiles); |
| 91 #endif | 91 #endif |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} | 248 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} |
| 249 | 249 |
| 250 } // namespace media | 250 } // namespace media |
| OLD | NEW |