gpu_video_decode_accelerator_helpers.cc 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "media/gpu/gpu_video_decode_accelerator_helpers.h"
  5. namespace media {
  6. GpuVideoDecodeGLClient::GpuVideoDecodeGLClient() = default;
  7. GpuVideoDecodeGLClient::~GpuVideoDecodeGLClient() = default;
  8. GpuVideoDecodeGLClient::GpuVideoDecodeGLClient(const GpuVideoDecodeGLClient&) =
  9. default;
  10. GpuVideoDecodeGLClient& GpuVideoDecodeGLClient::operator=(
  11. const GpuVideoDecodeGLClient&) = default;
  12. SupportedVideoDecoderConfigs ConvertFromSupportedProfiles(
  13. const VideoDecodeAccelerator::SupportedProfiles& profiles,
  14. bool allow_encrypted) {
  15. SupportedVideoDecoderConfigs configs;
  16. for (const auto& profile : profiles) {
  17. configs.push_back(SupportedVideoDecoderConfig(
  18. profile.profile, // profile_min
  19. profile.profile, // profile_max
  20. profile.min_resolution, // coded_size_min
  21. profile.max_resolution, // coded_size_max
  22. allow_encrypted, // allow_encrypted
  23. profile.encrypted_only)); // require_encrypted);
  24. }
  25. return configs;
  26. }
  27. } // namespace media