[GStreamer][MSE] Trim space between codecs
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Oct 2017 09:35:53 +0000 (09:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Oct 2017 09:35:53 +0000 (09:35 +0000)
commitaf22e076188ad964d3bb61ba4022015e2fb14c27
treec5a952519d2ea2b9d6205cc37e360c2367d7837f
parenteaa02dfbff4b5972c19a925e9184bf34d9fb7d88
[GStreamer][MSE] Trim space between codecs
https://bugs.webkit.org/show_bug.cgi?id=178160

Patch by Alicia Boya GarcĂ­a <aboya@igalia.com> on 2017-10-27
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Modify supportsCodecs() to accept a Vector<String> instead of
receiving a string and parsing itself.

This improves passrate for `mediasource-is-type-supported` as it
ensures that whitespace between codecs is now trimmed and codec
strings such as `video/webm;codecs="opus, vp9"` are matched as a valid
type, as required by the spec.

This patch also renames supportCodecs() to supportAllCodecs() and adds
a new variant, supportCodec(), that checks for support of an
individual codec.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodec):
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsAllCodecs):
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

LayoutTests:

Update expected test output.

* platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h