Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a4e8e5b80d172b1bd4f7afa2b3099d9e1bc81186
      
https://github.com/WebKit/WebKit/commit/a4e8e5b80d172b1bd4f7afa2b3099d9e1bc81186
  Author: Enrique Ocaña González <[email protected]>
  Date:   2025-04-25 (Fri, 25 Apr 2025)

  Changed paths:
    A LayoutTests/media/content/silence_with_id3_tags.mp3
    A LayoutTests/media/media-source/media-source-play-mp3-id3-tag-expected.txt
    A LayoutTests/media/media-source/media-source-play-mp3-id3-tag.html
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h

  Log Message:
  -----------
  [GStreamer][MSE] Support MP3 with ID3 tags
https://bugs.webkit.org/show_bug.cgi?id=291414

Reviewed by Alicia Boya Garcia.

If an MP3 with ID3 tags is appended to a SourceBuffer, AppendPipeline's
typefind detects it as application/x-id3 instead of audio/mpeg and can't
process it.

This commit takes care of that case by (optionally) creating an id3demux
that takes care of the ID3 tags (just ignores them) and produces
audio/mpeg at its output, so the processing can continue normally.

We can't know if id3demux can be created or not at AppendPipeline
instantiation time. In case the SourceBuffer mimetype is audio/mpeg, we
need to listen to the have-type signal from typefind and defer the
creation, configuration and connection of the demuxer (or identity, if
id3demux is not needed) until the signal happens.

The code to configure the demuxer has been refactored into its own
method, so it can be reused from the regular and the deferred demuxer
configuration codepaths.

* LayoutTests/media/content/silence_with_id3_tags.mp3: Added.
* LayoutTests/media/media-source/media-source-play-mp3-id3-tag-expected.txt: 
Added.
* LayoutTests/media/media-source/media-source-play-mp3-id3-tag.html: Added.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::configureOptionalDemuxerFromAnyThread): Refactored 
code to configure the demuxer. The configuration code has been enhanced to 
detect the case of demuxers with static pads (such as id3demux) and treat them 
in the same immediate configuration way as identity.
(WebCore::AppendPipeline::AppendPipeline): If the SourceBuffer mimetype is 
audio/mpeg, listen to have-type and create and configure the demuxer/identity 
there (just the first time the signal is triggered).
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h: Added new 
configureOptionalDemuxerFromAnyThread() private method.

Canonical link: https://commits.webkit.org/294106@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to