Bug 316404
| Summary: | [GStreamer][WebAudio] Disallow RialtoMSEAudio in WebAudio | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Enrique Ocaña <eocanha> |
| Component: | New Bugs | Assignee: | Enrique Ocaña <eocanha> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Enrique Ocaña
When WebAudio tries to find a decoder in Rialto, the platform-specific RialtoMSEAudioSink matches caps and is auto-plugged, but it's not actually suitable for the task. That sink can only play (render) encoded audio, and isn't able to just do decoding (so that the decoded samples are taken back by WebAudio). It can't play raw audio either. For those reasons, it should be disabled for WebAudio usage.
This problem affects AudioContext.decodeAudioData usage when there is a discrepancy between rialtomseaudiosink and software decoding plugins available on the platform. Such a situation causes HTMLMediaElement::canPlayType() declare support for content type but it should be understood as playback and not decoding to PCM. In turn, it makes `autoplug-select` as used in AudioFileReaderGStreamer.cpp [1] to pick `rialtomseaudiosink` which is invalid as per case when:
* Non-PCM content is used - get stuck in sample passing loop, it will be waiting to play which doesn't really happen in this scenario as samples were to be pulled and passed to another pipeline.
* PCM content is used - crash as the samples pulled won't be available to be taken.
[1] https://github.com/WebPlatformForEmbedded/WPEWebKit/blob/wpe-2.38/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp#L413C42-L413C57
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1680
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Enrique Ocaña
Pull request: https://github.com/WebKit/WebKit/pull/66551