-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlook_chromium_hevc_ac3.patch
147 lines (141 loc) · 5.41 KB
/
look_chromium_hevc_ac3.patch
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
diff --git a/electron b/electron
new file mode 160000
index 0000000000000..ce562b6889004
--- /dev/null
+++ b/electron
@@ -0,0 +1 @@
+Subproject commit ce562b68890043ae3404be27b088b20a91420c0e
diff --git a/media/base/supported_types.cc b/media/base/supported_types.cc
index 41a4609a2a7a3..0bff985da2ad7 100644
--- a/media/base/supported_types.cc
+++ b/media/base/supported_types.cc
@@ -201,30 +201,6 @@ bool IsAudioCodecProprietary(AudioCodec codec) {
}
#endif // !BUILDFLAG(USE_PROPRIETARY_CODECS)
-bool IsHevcProfileSupported(const VideoType& type) {
- if (!IsColorSpaceSupported(type.color_space))
- return false;
-
-#if BUILDFLAG(ENABLE_PLATFORM_HEVC)
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
- return GetSupplementalProfileCache()->IsProfileSupported(type.profile);
-#else
- return true;
-#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
-#elif BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_HEVC)
- // Only encrypted HEVC content is supported, and normally MSE.isTypeSupported
- // returns false for HEVC. The kEnableClearHevcForTesting flag allows it to
- // return true to enable a wider array of test scenarios to function properly.
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClearHevcForTesting)) {
- return false;
- }
- return type.profile == HEVCPROFILE_MAIN || type.profile == HEVCPROFILE_MAIN10;
-#else
- return false;
-#endif
-}
-
bool IsVp9ProfileSupported(const VideoType& type) {
#if BUILDFLAG(ENABLE_LIBVPX)
// High bit depth capabilities may be toggled via LibVPX config flags.
@@ -332,18 +308,17 @@ bool IsDefaultSupportedVideoType(const VideoType& type) {
case VideoCodec::kH264:
case VideoCodec::kVP8:
case VideoCodec::kTheora:
+ case VideoCodec::kHEVC:
+ case VideoCodec::kMPEG2:
return true;
case VideoCodec::kAV1:
return IsAV1Supported(type);
case VideoCodec::kVP9:
return IsVp9ProfileSupported(type);
- case VideoCodec::kHEVC:
- return IsHevcProfileSupported(type);
case VideoCodec::kMPEG4:
return IsMPEG4Supported();
case VideoCodec::kUnknown:
case VideoCodec::kVC1:
- case VideoCodec::kMPEG2:
case VideoCodec::kDolbyVision:
return false;
}
@@ -374,10 +349,10 @@ bool IsDefaultSupportedAudioType(const AudioType& type) {
case AudioCodec::kPCM_S24BE:
case AudioCodec::kPCM_ALAW:
case AudioCodec::kVorbis:
- return true;
+ case AudioCodec::kAC3:
case AudioCodec::kEAC3:
+ return true;
case AudioCodec::kALAC:
- case AudioCodec::kAC3:
case AudioCodec::kMpegHAudio:
case AudioCodec::kUnknown:
return false;
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 76f03d6608e57..75ab3118ffd47 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -139,6 +139,10 @@ AVCodecID AudioCodecToCodecID(AudioCodec audio_codec,
switch (audio_codec) {
case AudioCodec::kAAC:
return AV_CODEC_ID_AAC;
+ case AudioCodec::kAC3:
+ return AV_CODEC_ID_AC3;
+ case AudioCodec::kEAC3:
+ return AV_CODEC_ID_EAC3;
case AudioCodec::kALAC:
return AV_CODEC_ID_ALAC;
case AudioCodec::kMP3:
diff --git a/media/media_options.gni b/media/media_options.gni
index 5667cac61f3dd..7000f23a3781e 100644
--- a/media/media_options.gni
+++ b/media/media_options.gni
@@ -46,16 +46,15 @@ declare_args() {
# Enables AC3/EAC3 audio demuxing. This is enabled only on Chromecast, since
# it only provides demuxing, and is only useful for AC3/EAC3 audio
# pass-through to HDMI sink on Chromecast.
- enable_platform_ac3_eac3_audio = proprietary_codecs && is_chromecast
+ enable_platform_ac3_eac3_audio = true
- enable_platform_mpeg_h_audio = proprietary_codecs && is_chromecast
+ enable_platform_mpeg_h_audio = true
# Enables DTS/DTSX audio handling in chromium. This includes demuxing,
# on-device decoding and bitstream passthrough as supported by device.
enable_platform_dts_audio = false
- enable_mse_mpeg2ts_stream_parser =
- proprietary_codecs && (is_chromecast || is_fuchsia || use_fuzzing_engine)
+ enable_mse_mpeg2ts_stream_parser = true
enable_platform_encrypted_hevc =
proprietary_codecs &&
@@ -90,9 +89,7 @@ declare_args() {
# Enable HEVC/H265 demuxing. Actual decoding must be provided by the
# platform. Enabled by default for Chromecast, fuzzer builds and protected
# video on ChromeOS and Windows.
- enable_platform_hevc =
- proprietary_codecs &&
- (is_chromecast || use_fuzzing_engine || enable_platform_encrypted_hevc)
+ enable_platform_hevc = true
# Enable HEVC/H265 decoding with hardware acceleration assist. Enabled by
# default for fuzzer builds and protected video on ChromeOS. It is also
diff --git a/third_party/electron_node b/third_party/electron_node
new file mode 160000
index 0000000000000..8c7695b8b6d50
--- /dev/null
+++ b/third_party/electron_node
@@ -0,0 +1 @@
+Subproject commit 8c7695b8b6d508aef67d5f2d4c6b9f42ff0fb976
diff --git a/third_party/nan b/third_party/nan
new file mode 160000
index 0000000000000..d9609bb2f14e3
--- /dev/null
+++ b/third_party/nan
@@ -0,0 +1 @@
+Subproject commit d9609bb2f14e33a4d1d2f5ee1834eb4300eaf595
diff --git a/third_party/squirrel.mac b/third_party/squirrel.mac
new file mode 160000
index 0000000000000..9b8ad9deb8308
--- /dev/null
+++ b/third_party/squirrel.mac
@@ -0,0 +1 @@
+Subproject commit 9b8ad9deb830870a0da8d2bbf56cac6ea33eb9a4