Diff
Modified: trunk/LayoutTests/ChangeLog (282381 => 282382)
--- trunk/LayoutTests/ChangeLog 2021-09-14 07:40:37 UTC (rev 282381)
+++ trunk/LayoutTests/ChangeLog 2021-09-14 07:46:35 UTC (rev 282382)
@@ -1,3 +1,15 @@
+2021-09-14 Xabier Rodriguez Calvar <[email protected]>
+
+ [GStreamer] Enable H265 codec
+ https://bugs.webkit.org/show_bug.cgi?id=229920
+
+ Reviewed by Philippe Normand.
+
+ * media/media-can-play-h265-video-expected.txt: Added.
+ * media/media-can-play-h265-video.html: Added.
+ * platform/ios/media/media-can-play-h265-video-expected.txt: Added.
+ * platform/mac/media/media-can-play-h265-video-expected.txt: Added.
+
2021-09-13 Ryan Haddad <[email protected]>
[ Mac iOS ] 2 imported/w3c/web-platform-tests/css/cssom-view/ (layout-tests) are constant text failures
Added: trunk/LayoutTests/media/media-can-play-h265-video-expected.txt (0 => 282382)
--- trunk/LayoutTests/media/media-can-play-h265-video-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-can-play-h265-video-expected.txt 2021-09-14 07:46:35 UTC (rev 282382)
@@ -0,0 +1,10 @@
+
+Test HTMLMediaElement canPlayType() method with multiple video mpeg4 MIME types with H265 codecs.
+
+These tests may be expected to fail if the WebKit port does not support the format.
+
+EXPECTED (video.canPlayType('video/mp4') == 'maybe') OK
+EXPECTED (video.canPlayType('video/mp4; Codecs="hvc1.2.20000000.l123.b0"') == 'probably') OK
+EXPECTED (video.canPlayType(' Video/MP4 ; CODECS="hev1.1.6.L150.B0"') == 'probably') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/media-can-play-h265-video.html (0 => 282382)
--- trunk/LayoutTests/media/media-can-play-h265-video.html (rev 0)
+++ trunk/LayoutTests/media/media-can-play-h265-video.html 2021-09-14 07:46:35 UTC (rev 282382)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ <script>
+ function start()
+ {
+ video = document.getElementsByTagName('video')[0];
+
+ testExpected("video.canPlayType('video/mp4')", "maybe");
+ testExpected("video.canPlayType('video/mp4; Codecs=\"hvc1.2.20000000.l123.b0\"')", "probably");
+ testExpected("video.canPlayType(' Video/MP4 ; CODECS=\"hev1.1.6.L150.B0\"')", "probably");
+
+ endTest();
+ }
+ </script>
+ </head>
+ <body _onload_="start()">
+ <video controls></video>
+ <p>Test HTMLMediaElement <em>canPlayType()</em> method with multiple video mpeg4 MIME types with H265 codecs.</p>
+ <p>These tests may be expected to fail if the WebKit port does not support the format.</p>
+ </body>
+</html>
Added: trunk/LayoutTests/platform/ios/media/media-can-play-h265-video-expected.txt (0 => 282382)
--- trunk/LayoutTests/platform/ios/media/media-can-play-h265-video-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/media/media-can-play-h265-video-expected.txt 2021-09-14 07:46:35 UTC (rev 282382)
@@ -0,0 +1,10 @@
+
+Test HTMLMediaElement canPlayType() method with multiple video mpeg4 MIME types with H265 codecs.
+
+These tests may be expected to fail if the WebKit port does not support the format.
+
+EXPECTED (video.canPlayType('video/mp4') == 'maybe') OK
+EXPECTED (video.canPlayType('video/mp4; Codecs="hvc1.2.20000000.l123.b0"') == 'probably') OK
+EXPECTED (video.canPlayType(' Video/MP4 ; CODECS="hev1.1.6.L150.B0"') == 'probably'), OBSERVED '' FAIL
+END OF TEST
+
Added: trunk/LayoutTests/platform/mac/media/media-can-play-h265-video-expected.txt (0 => 282382)
--- trunk/LayoutTests/platform/mac/media/media-can-play-h265-video-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/media/media-can-play-h265-video-expected.txt 2021-09-14 07:46:35 UTC (rev 282382)
@@ -0,0 +1,10 @@
+
+Test HTMLMediaElement canPlayType() method with multiple video mpeg4 MIME types with H265 codecs.
+
+These tests may be expected to fail if the WebKit port does not support the format.
+
+EXPECTED (video.canPlayType('video/mp4') == 'maybe') OK
+EXPECTED (video.canPlayType('video/mp4; Codecs="hvc1.2.20000000.l123.b0"') == 'probably') OK
+EXPECTED (video.canPlayType(' Video/MP4 ; CODECS="hev1.1.6.L150.B0"') == 'probably'), OBSERVED '' FAIL
+END OF TEST
+
Modified: trunk/Source/WebCore/ChangeLog (282381 => 282382)
--- trunk/Source/WebCore/ChangeLog 2021-09-14 07:40:37 UTC (rev 282381)
+++ trunk/Source/WebCore/ChangeLog 2021-09-14 07:46:35 UTC (rev 282382)
@@ -1,3 +1,18 @@
+2021-09-14 Xabier Rodriguez Calvar <[email protected]>
+
+ [GStreamer] Enable H265 codec
+ https://bugs.webkit.org/show_bug.cgi?id=229920
+
+ Reviewed by Philippe Normand.
+
+ Check for H265 decoder and parser and add the corresponding
+ variants.
+
+ Test: media/media-can-play-h265-video.html
+
+ * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
+ (WebCore::GStreamerRegistryScanner::initializeDecoders):
+
2021-09-14 Nikos Mouchtaris <[email protected]>
Fix bug in calc functions sin/cos/tan
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp (282381 => 282382)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp 2021-09-14 07:40:37 UTC (rev 282381)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp 2021-09-14 07:46:35 UTC (rev 282382)
@@ -307,15 +307,29 @@
m_decoderMimeTypeSet.add(AtomString("audio/webm"));
}
+ bool shouldAddMP4Container = false;
+
auto h264DecoderAvailable = factories.hasElementForMediaType(ElementFactories::Type::VideoDecoder, "video/x-h264, profile="" constrained-baseline, baseline, high }", ElementFactories::CheckHardwareClassifier::Yes);
if (h264DecoderAvailable && (!m_isMediaSource || factories.hasElementForMediaType(ElementFactories::Type::VideoParser, "video/x-h264"))) {
- m_decoderMimeTypeSet.add(AtomString("video/mp4"));
- m_decoderMimeTypeSet.add(AtomString("video/x-m4v"));
+ shouldAddMP4Container = true;
m_decoderCodecMap.add(AtomString("x-h264"), h264DecoderAvailable.isUsingHardware);
m_decoderCodecMap.add(AtomString("avc*"), h264DecoderAvailable.isUsingHardware);
m_decoderCodecMap.add(AtomString("mp4v*"), h264DecoderAvailable.isUsingHardware);
}
+ auto h265DecoderAvailable = factories.hasElementForMediaType(ElementFactories::Type::VideoDecoder, "video/x-h265", ElementFactories::CheckHardwareClassifier::Yes);
+ if (h265DecoderAvailable && (!m_isMediaSource || factories.hasElementForMediaType(ElementFactories::Type::VideoParser, "video/x-h265"))) {
+ shouldAddMP4Container = true;
+ m_decoderCodecMap.add(AtomString("x-h265"), h265DecoderAvailable.isUsingHardware);
+ m_decoderCodecMap.add(AtomString("hvc1*"), h265DecoderAvailable.isUsingHardware);
+ m_decoderCodecMap.add(AtomString("hev1*"), h265DecoderAvailable.isUsingHardware);
+ }
+
+ if (shouldAddMP4Container) {
+ m_decoderMimeTypeSet.add(AtomString("video/mp4"));
+ m_decoderMimeTypeSet.add(AtomString("video/x-m4v"));
+ }
+
Vector<String> av1DecodersDisallowedList { "av1dec"_s };
if ((matroskaSupported || isContainerTypeSupported(Configuration::Decoding, "video/mp4")) && factories.hasElementForMediaType(ElementFactories::Type::VideoDecoder, "video/x-av1", ElementFactories::CheckHardwareClassifier::No, std::make_optional(WTFMove(av1DecodersDisallowedList)))) {
m_decoderCodecMap.add(AtomString("av01*"), false);