Skip to content

Commit

Permalink
[GStreamer] Two new failures media/media-can-play-case-sensitive-flac…
Browse files Browse the repository at this point in the history
….html, media/media-can-play-type-case-sensitive.html

https://bugs.webkit.org/show_bug.cgi?id=260625

Reviewed by Xabier Rodriguez-Calvar.

Codec string matching is now case-sensitive in the registry scanner.

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::initializeDecoders):
(WebCore::GStreamerRegistryScanner::isContentTypeSupported const):

Canonical link: https://commits.webkit.org/267343@main
  • Loading branch information
philn committed Aug 28, 2023
1 parent 18c7539 commit 5ee3f9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions LayoutTests/platform/glib/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -3467,9 +3467,6 @@ imported/w3c/web-platform-tests/html/canvas/offscreen/text/fontVariantCaps-1.htm
imported/w3c/web-platform-tests/html/canvas/offscreen/text/fontVariantCaps-3.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/canvas/offscreen/text/fontVariantCaps-4.html [ ImageOnlyFailure ]

webkit.org/b/260625 media/media-can-play-case-sensitive-flac.html [ Failure ]
webkit.org/b/260625 media/media-can-play-type-case-sensitive.html [ Failure ]

# End: Common failures between GTK and WPE.

#////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void GStreamerRegistryScanner::initializeDecoders(const GStreamerRegistryScanner
Vector<GstCapsWebKitMapping> mseCompatibleMapping = {
{ ElementFactories::Type::AudioDecoder, "audio/x-ac3", { }, { "x-ac3"_s, "ac-3"_s, "ac3"_s } },
{ ElementFactories::Type::AudioDecoder, "audio/x-eac3", { "audio/x-ac3"_s }, { "x-eac3"_s, "ec3"_s, "ec-3"_s, "eac3"_s } },
{ ElementFactories::Type::AudioDecoder, "audio/x-flac", { "audio/x-flac"_s, "audio/flac"_s }, {"x-flac"_s, "flac"_s } },
{ ElementFactories::Type::AudioDecoder, "audio/x-flac", { "audio/x-flac"_s, "audio/flac"_s }, {"x-flac"_s, "flac"_s, "fLaC"_s } },
};
fillMimeTypeSetFromCapsMapping(factories, mseCompatibleMapping);

Expand Down Expand Up @@ -803,8 +803,7 @@ MediaPlayerEnums::SupportsType GStreamerRegistryScanner::isContentTypeSupported(
if (codecs.isEmpty())
return SupportsType::MayBeSupported;

for (const auto& item : codecs) {
auto codec = item.convertToASCIILowercase();
for (const auto& codec : codecs) {
bool requiresHardwareSupport = contentTypesRequiringHardwareSupport
.findIf([containerType, codec](auto& hardwareContentType) -> bool {
auto hardwareContainer = hardwareContentType.containerType();
Expand Down

0 comments on commit 5ee3f9a

Please sign in to comment.