| // Copyright 2021 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/cdm/cdm_capability.h" |
| |
| #include <utility> |
| |
| namespace media { |
| |
| VideoCodecInfo::VideoCodecInfo() = default; |
| |
| VideoCodecInfo::VideoCodecInfo( |
| base::flat_set<VideoCodecProfile> supported_profiles, |
| bool supports_clear_lead) |
| : supported_profiles(std::move(supported_profiles)), |
| supports_clear_lead(supports_clear_lead) {} |
| |
| VideoCodecInfo::VideoCodecInfo( |
| base::flat_set<VideoCodecProfile> supported_profiles) |
| : supported_profiles(std::move(supported_profiles)) {} |
| |
| VideoCodecInfo::VideoCodecInfo(const VideoCodecInfo& other) = default; |
| |
| VideoCodecInfo::~VideoCodecInfo() = default; |
| |
| bool operator==(const VideoCodecInfo& lhs, const VideoCodecInfo& rhs) { |
| return lhs.supported_profiles == rhs.supported_profiles && |
| lhs.supports_clear_lead == rhs.supports_clear_lead; |
| } |
| |
| CdmCapability::CdmCapability() = default; |
| |
| CdmCapability::CdmCapability( |
| base::flat_set<AudioCodec> audio_codecs, |
| VideoCodecMap video_codecs, |
| base::flat_set<EncryptionScheme> encryption_schemes, |
| base::flat_set<CdmSessionType> session_types) |
| : audio_codecs(std::move(audio_codecs)), |
| video_codecs(std::move(video_codecs)), |
| encryption_schemes(std::move(encryption_schemes)), |
| session_types(std::move(session_types)) {} |
| |
| CdmCapability::CdmCapability(const CdmCapability& other) = default; |
| |
| CdmCapability::~CdmCapability() = default; |
| |
| bool operator==(const CdmCapability& lhs, const CdmCapability& rhs) { |
| return lhs.audio_codecs == rhs.audio_codecs && |
| lhs.video_codecs == rhs.video_codecs && |
| lhs.encryption_schemes == rhs.encryption_schemes && |
| lhs.session_types == rhs.session_types; |
| } |
| |
| } // namespace media |