forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpu_video_decode_accelerator_helpers.cc
32 lines (27 loc) · 1.16 KB
/
gpu_video_decode_accelerator_helpers.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
namespace media {
GpuVideoDecodeGLClient::GpuVideoDecodeGLClient() = default;
GpuVideoDecodeGLClient::~GpuVideoDecodeGLClient() = default;
GpuVideoDecodeGLClient::GpuVideoDecodeGLClient(const GpuVideoDecodeGLClient&) =
default;
GpuVideoDecodeGLClient& GpuVideoDecodeGLClient::operator=(
const GpuVideoDecodeGLClient&) = default;
SupportedVideoDecoderConfigs ConvertFromSupportedProfiles(
const VideoDecodeAccelerator::SupportedProfiles& profiles,
bool allow_encrypted) {
SupportedVideoDecoderConfigs configs;
for (const auto& profile : profiles) {
configs.push_back(SupportedVideoDecoderConfig(
profile.profile, // profile_min
profile.profile, // profile_max
profile.min_resolution, // coded_size_min
profile.max_resolution, // coded_size_max
allow_encrypted, // allow_encrypted
profile.encrypted_only)); // require_encrypted);
}
return configs;
}
} // namespace media