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

Side by Side Diff: media/gpu/gpu_video_decode_accelerator_factory_impl.cc

Issue 1973753003: media/gpu: restore some of the reformatting done during migration to media/gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | media/gpu/h264_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_impl.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 // static 64 // static
65 MEDIA_GPU_EXPORT gpu::VideoDecodeAcceleratorCapabilities 65 MEDIA_GPU_EXPORT gpu::VideoDecodeAcceleratorCapabilities
66 GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities( 66 GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities(
67 const gpu::GpuPreferences& gpu_preferences) { 67 const gpu::GpuPreferences& gpu_preferences) {
68 media::VideoDecodeAccelerator::Capabilities capabilities; 68 media::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 media::VideoDecodeAccelerator::SupportedProfiles vda_profiles; 83 media::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 media::GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( 86 media::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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 const BindGLImageCallback& bind_image_cb, 233 const BindGLImageCallback& bind_image_cb,
234 const GetGLES2DecoderCallback& get_gles2_decoder_cb) 234 const GetGLES2DecoderCallback& get_gles2_decoder_cb)
235 : get_gl_context_cb_(get_gl_context_cb), 235 : get_gl_context_cb_(get_gl_context_cb),
236 make_context_current_cb_(make_context_current_cb), 236 make_context_current_cb_(make_context_current_cb),
237 bind_image_cb_(bind_image_cb), 237 bind_image_cb_(bind_image_cb),
238 get_gles2_decoder_cb_(get_gles2_decoder_cb) {} 238 get_gles2_decoder_cb_(get_gles2_decoder_cb) {}
239 239
240 GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {} 240 GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {}
241 241
242 } // namespace media 242 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/gpu/h264_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698