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

[GStreamer] FLAC Audio Format Support #4927

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

philn
Copy link
Member

@philn philn commented Oct 3, 2022

e0bd875

[GStreamer] FLAC Audio Format Support
https://bugs.webkit.org/show_bug.cgi?id=245876

Reviewed by NOBODY (OOPS!).

Flac support was added in AppendPipeline, in case the SourceBuffer is audio/flac that would mean
typefind should be able to detect it and that the flac data is not muxed, thus requires no demuxing.

The MediaSourcePrivateGStreamer::addSourceBuffer() also now returns NotSupported in case the
containerType is not supported by AppendPipeline.

* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::addSourceBuffer):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::isContentTypeSupported):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:

e0bd875

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 🧪 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-debug ✅ 🛠 gtk ✅ 🛠 wincairo
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🛠 mac-AS-debug ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 api-mac ✅ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-wk1
✅ 🛠 tv-sim ✅ 🧪 mac-wk2
✅ 🛠 watch ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 watch-sim ✅ 🧪 mac-wk2-stress

@philn philn self-assigned this Oct 3, 2022
@philn philn added Media Bugs related to the HTML 5 Media elements. Other labels Oct 3, 2022
@philn philn requested a review from ntrrgc October 3, 2022 14:45
@philn
Copy link
Member Author

philn commented Oct 3, 2022

I'll try to write a test for this...

@philn philn marked this pull request as draft October 3, 2022 16:56
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 3, 2022
Copy link
Contributor

@calvaris calvaris left a comment

Choose a reason for hiding this comment

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

LGTM

@ntrrgc
Copy link
Contributor

ntrrgc commented Oct 4, 2022

@philn What browsers do support this?

FLAC bytestream is clearly not in the spec registry https://www.w3.org/TR/mse-byte-stream-format-registry/#registry -- and it's not in the MSE WebM ByteStream spec either for that matter https://www.w3.org/TR/mse-byte-stream-format-webm/#webm-mime-parameters (it's not generally a recognized audio format for WebM for that matter)

GStreamer gives us a lot of flexibility in adding formats to MSE, both containerized and as raw packetized streams, but I'd like to understand the motivations behind any non-standard additions.

@philn
Copy link
Member Author

philn commented Oct 4, 2022

I found this demo, https://brionv.com/misc/msetest4/flac2.html
But audio doesn't play here, neither in Chromium, Chrome or FF.

However this bug came up for a real use-case, it seems Deezer premium streams audio/flac sourcebuffers... if you check the linked bug.

So yeah... not sure what to do.....

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

Reviewed by NOBODY (OOPS!).

Flac support was added in AppendPipeline, in case the SourceBuffer is audio/flac that would mean
typefind should be able to detect it and that the flac data is not muxed, thus requires no demuxing.

The MediaSourcePrivateGStreamer::addSourceBuffer() also now returns NotSupported in case the
containerType is not supported by AppendPipeline.

* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::addSourceBuffer):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::isContentTypeSupported):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
@philn philn removed the merging-blocked Applied to prevent a change from being merged label Oct 4, 2022
@philn
Copy link
Member Author

philn commented Oct 10, 2022

In the bug report, the reporter said this is supported by the other web engines.

@ntrrgc
Copy link
Contributor

ntrrgc commented Oct 10, 2022

But you also said you couldn't get the test to work in other browsers, so I'm a bit confused.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 13, 2022
@xeenon xeenon removed the Other label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements. merging-blocked Applied to prevent a change from being merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants