chromium-browser-stable-test/chromium-40-wmvflvmpg.patch
2019-09-13 00:11:53 +03:00

90 lines
3.4 KiB
Diff

diff -up chromium-62.0.3192.0/media/base/mime_util_internal.cc.wmvflvmpg chromium-62.0.3192.0/media/base/mime_util_internal.cc
--- chromium-62.0.3192.0/media/base/mime_util_internal.cc.wmvflvmpg 2017-08-30 15:52:00.602204610 +0200
+++ chromium-62.0.3192.0/media/base/mime_util_internal.cc 2017-08-30 16:08:19.855437935 +0200
@@ -91,6 +91,15 @@
{"mp2", MimeUtil::MP2},
{"mp4v.20.8", MimeUtil::MPEG4_SP},
{"mp4v.20.240", MimeUtil::MPEG4_ASP},
+ {"msmpeg4v1", MimeUtil::MSMPEG4v1},
+ {"msmpeg4v2", MimeUtil::MSMPEG4v2},
+ {"msmpeg4v3", MimeUtil::MSMPEG4v3},
+ {"wmv7", MimeUtil::WMV7},
+ {"wmv8", MimeUtil::WMV8},
+ {"wmv9", MimeUtil::WMV9},
+ {"vc-1", MimeUtil::VC1},
+ {"vp6", MimeUtil::VP6},
+ {"mpeg1", MimeUtil::MPEG1},
});
return *kStringToCodecMap;
@@ -323,6 +333,7 @@
CodecSet webm_codecs(webm_audio_codecs);
webm_codecs.insert(webm_video_codecs.begin(), webm_video_codecs.end());
+ const CodecSet mp1_codecs{MPEG1};
const CodecSet mp3_codecs{MP3, MP2};
CodecSet mp4_audio_codecs{FLAC, MP3, OPUS, MP2, DTS, AC3, EAC3};
@@ -366,6 +377,28 @@
CodecSet mp4_codecs(mp4_audio_codecs);
mp4_codecs.insert(mp4_video_codecs.begin(), mp4_video_codecs.end());
+ const CodecSet wma_codecs{WMA1, WMA2};
+
+ CodecSet wmv_codecs(wma_codecs);
+ wmv_codecs.emplace(MSMPEG4v1);
+ wmv_codecs.emplace(MSMPEG4v2);
+ wmv_codecs.emplace(MSMPEG4v3);
+ wmv_codecs.emplace(MPEG4_SP);
+ wmv_codecs.emplace(MPEG4_ASP);
+ wmv_codecs.emplace(WMV7);
+ wmv_codecs.emplace(WMV8);
+ wmv_codecs.emplace(WMV9);
+ wmv_codecs.emplace(VC1);
+
+ matroska_codecs.emplace(MSMPEG4v1);
+ matroska_codecs.emplace(MSMPEG4v2);
+ matroska_codecs.emplace(MSMPEG4v3);
+
+ CodecSet flv_codecs(mp4_codecs);
+ flv_codecs.emplace(VP6);
+ flv_codecs.emplace(MP3);
+ flv_codecs.emplace(FLV1);
+
const CodecSet implicit_codec;
AddContainerWithCodecs("audio/wav", wav_codecs);
AddContainerWithCodecs("audio/x-wav", wav_codecs);
@@ -389,6 +421,11 @@
AddContainerWithCodecs("audio/x-matroska", matroska_audio_codecs);
AddContainerWithCodecs("video/x-matroska", matroska_codecs);
AddContainerWithCodecs("video/x-msvideo", matroska_codecs);
+ AddContainerWithCodecs("video/x-ms-wmv", wmv_codecs);
+ AddContainerWithCodecs("audio/x-ms-wma", wma_codecs);
+ AddContainerWithCodecs("video/x-ms-asf", wmv_codecs);
+ AddContainerWithCodecs("video/x-flv", flv_codecs);
+ AddContainerWithCodecs("video/mpeg", mp1_codecs);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
AddContainerWithCodecs("audio/aac", implicit_codec); // AAC / ADTS.
diff -up chromium-62.0.3192.0/net/base/mime_util.cc.wmvflvmpg chromium-62.0.3192.0/net/base/mime_util.cc
--- chromium-62.0.3192.0/net/base/mime_util.cc.wmvflvmpg 2017-08-30 15:52:00.604204573 +0200
+++ chromium-62.0.3192.0/net/base/mime_util.cc 2017-08-30 16:08:50.210885222 +0200
@@ -94,6 +94,10 @@ static const MimeInfo kPrimaryMappings[]
{"video/x-matroska", "mkv"},
{"audio/x-matroska", "mkv"},
{"video/x-msvideo", "avi"},
+ {"video/x-ms-wmv", "wmv"},
+ {"audio/x-ms-wma", "wma"},
+ {"video/x-flv", "flv"},
+ {"video/mpeg", "mpg,mpeg"},
{"multipart/related", "mht,mhtml"},
{"text/css", "css"},
{"text/html", "html,htm,shtml,shtm"},
@@ -512,6 +516,7 @@ static const char* const kStandardVideoT
"video/sd-video",
"video/webm",
"video/x-dv",
+ "video/x-flv",
"video/x-m4v",
"video/x-matroska",
"video/x-mpeg",