Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1931827] VideoDecoder: Return unsupported for codec strings with spaces #49827

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

moz-wptsync-bot
Copy link
Collaborator

Previously, codec strings containing spaces were trimmed, and
VideoDecoder would report them as "supported". However, per changes
introduced in PR #48870 [1], such codec strings, while "valid" in terms
of syntax, should be considered "unsupported" by the VideoDecoder.

Given that codec strings with spaces should be marked as "unsupported",
it's unnecessary to parse these codec strings before checking if they
are supported video codecs. The underlying checking method reports codec
strings containing spaces as "unsupported", naturally aligning with the
expected behavior.

[1] #48870

Differential Revision: https://phabricator.services.mozilla.com/D231716

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1931827
gecko-commit: 375d118ff39a50118a2fa26b3892d81da6f327a8
gecko-reviewers: media-playback-reviewers, alwu

Previously, codec strings containing spaces were trimmed, and
VideoDecoder would report them as "supported". However, per changes
introduced in PR #48870 [1], such codec strings, while "valid" in terms
of syntax, should be considered "unsupported" by the VideoDecoder.

Given that codec strings with spaces should be marked as "unsupported",
it's unnecessary to parse these codec strings before checking if they
are supported video codecs. The underlying checking method reports codec
strings containing spaces as "unsupported", naturally aligning with the
expected behavior.

[1] #48870

Differential Revision: https://phabricator.services.mozilla.com/D231716

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1931827
gecko-commit: 375d118ff39a50118a2fa26b3892d81da6f327a8
gecko-reviewers: media-playback-reviewers, alwu
This patch updates AudioDecoder to return "unsupported" for codec
strings containing spaces, consistent with the approach taken in the
preceding patch.

As part of this update, the `AudioMIMECreateParam` class is removed
since there is no longer a need to trim spaces from codec strings. Any
codec string containing spaces is immediately considered "unsupported".

Additionally, this patch adds a WPT to verify that AudioDecoder
correctly returns "unsupported" for codec strings with spaces, ensuring
the decoder behaves as expected.

Differential Revision: https://phabricator.services.mozilla.com/D231717

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1931827
gecko-commit: b28767c670a7bb8d22744d3586b7bac7ef73d785
gecko-reviewers: media-playback-reviewers, alwu
This patch updates AudioEncoder to return "unsupported" for codec
strings containing spaces, consistent with the approach taken in the
preceding patch.

By moving `IsSupportedAudioCodec` to `CanEncode` and removing the
unnecessary codec string trimming, AudioEncoder now behaves as expected
since codec string with spaces fails to pass `IsSupportedAudioCodec`'s
check.

A WPT is also added to verify that AudioEncoder returns "unsupported"
when passing codec strings that contains spaces to `IsConfigSupported`
or `configure`.

Differential Revision: https://phabricator.services.mozilla.com/D231718

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1931827
gecko-commit: 709c474955599eed0ae62f9d8815b517c7d1cf07
gecko-reviewers: media-playback-reviewers, alwu
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit 1d70c9c into master Dec 24, 2024
19 checks passed
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1931827 branch December 24, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants