blob: 24a73f3dcb2e6ff33bb116f19828d8f46e91765c (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
// 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";
}
}
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
|