12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // Copyright 2020 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #include "media/base/decoder.h"
- #include "base/notreached.h"
- namespace media {
- Decoder::Decoder() = default;
- Decoder::~Decoder() = default;
- bool Decoder::IsPlatformDecoder() const {
- return false;
- }
- bool Decoder::SupportsDecryption() const {
- return false;
- }
- std::string GetDecoderName(VideoDecoderType type) {
- switch (type) {
- case VideoDecoderType::kUnknown:
- return "Unknown Video Decoder";
- case VideoDecoderType::kFFmpeg:
- return "FFmpegVideoDecoder";
- case VideoDecoderType::kVpx:
- return "VpxVideoDecoder";
- case VideoDecoderType::kAom:
- return "AomVideoDecoder";
- case VideoDecoderType::kMojo:
- return "MojoVideoDecoder";
- case VideoDecoderType::kDecrypting:
- return "DecryptingVideoDecoder";
- case VideoDecoderType::kDav1d:
- return "Dav1dVideoDecoder";
- case VideoDecoderType::kFuchsia:
- return "FuchsiaVideoDecoder";
- case VideoDecoderType::kMediaCodec:
- return "MediaCodecVideoDecoder";
- case VideoDecoderType::kGav1:
- return "Gav1VideoDecoder";
- case VideoDecoderType::kD3D11:
- return "D3D11VideoDecoder";
- case VideoDecoderType::kVaapi:
- return "VaapiVideoDecoder";
- case VideoDecoderType::kBroker:
- return "VideoDecoderBroker";
- case VideoDecoderType::kVda:
- return "VDAVideoDecoder";
- case VideoDecoderType::kV4L2:
- return "V4L2VideoDecoder";
- case VideoDecoderType::kTesting:
- return "Testing or Mock Video decoder";
- }
- }
- std::string GetDecoderName(AudioDecoderType type) {
- switch (type) {
- case AudioDecoderType::kUnknown:
- return "Unknown Audio Decoder";
- case AudioDecoderType::kFFmpeg:
- return "FFmpegAudioDecoder";
- case AudioDecoderType::kMojo:
- return "MojoAudioDecoder";
- case AudioDecoderType::kDecrypting:
- return "DecryptingAudioDecoder";
- case AudioDecoderType::kMediaCodec:
- return "MediaCodecAudioDecoder";
- case AudioDecoderType::kBroker:
- return "AudioDecoderBroker";
- case AudioDecoderType::kTesting:
- return "Testing or Mock Audio decoder";
- case AudioDecoderType::kAudioToolbox:
- return "AudioToolbox";
- case AudioDecoderType::kMediaFoundation:
- return "MediaFoundationAudioDecoder";
- }
- }
- std::ostream& operator<<(std::ostream& out, AudioDecoderType type) {
- return out << GetDecoderName(type);
- }
- std::ostream& operator<<(std::ostream& out, VideoDecoderType type) {
- return out << GetDecoderName(type);
- }
- } // namespace media
|