Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e1f55e8d9ee93718eb1013f6ded952a00887990f
      
https://github.com/WebKit/WebKit/commit/e1f55e8d9ee93718eb1013f6ded952a00887990f
  Author: Vivienne Watermeier <vwaterme...@igalia.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    A 
LayoutTests/media/media-source/content/counting-video-vttsimple-manifest.json
    A LayoutTests/media/media-source/content/counting-video-vttsimple.mp4
    A LayoutTests/media/media-source/media-source-vttsimple-expected.txt
    A LayoutTests/media/media-source/media-source-vttsimple.html
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h

  Log Message:
  -----------
  [GStreamer][MSE] Support text tracks in MSE
https://bugs.webkit.org/show_bug.cgi?id=281343

Reviewed by Alicia Boya Garcia and Xabier Rodriguez-Calvar.

Add support for text tracks in MSE, in particular WebVTT tracks.

In AppendPipeline, we reencode any text tracks to WebVTT by plugging webvttenc 
if necessary.
(Optional encoders were implemented in: https://commits.webkit.org/290605@main )

As WebKit takes care of subtitles anyway, these tracks don't flow through the 
playback pipeline
and are instead directly handled by InbandTextTrackPrivateGStreamer. We remove 
any text tracks
from the stream collection, and so webkitmediasrc will never create pads for 
them.

* 
LayoutTests/media/media-source/content/counting-video-vttsimple-manifest.json: 
Added.
* LayoutTests/media/media-source/content/counting-video-vttsimple.mp4: Added.
* LayoutTests/media/media-source/media-source-vttsimple-expected.txt: Added.
* LayoutTests/media/media-source/media-source-vttsimple.html: Added.
  Similar to media-managedmse-webvtt-track.html, but without using managed MSE.

* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::initializeDecoders):
  Always support webvtt in MSE.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
  Allow text tracks for MSE.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
  Assign StreamType::Text to application/x-subtitle-webvtt.
(WebCore::AppendPipeline::appsinkNewSample):
  Handle text samples in InbandTextTrackPrivateGStreamer.
(WebCore::AppendPipeline::didReceiveInitializationSegment):
  Add text track info to InitializationSegment.
(WebCore::createOptionalEncoderForFormat):
  Plug webvttenc, if necessary.
(WebCore::AppendPipeline::Track::emplaceOptionalParserForFormat):
  Add missing underscore to element name.
(WebCore::AppendPipeline::Track::emplaceOptionalEncoderForFormat):
  Ditto.
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
  Refactored code in common with start Source to emitStreams.
(WebCore::MediaPlayerPrivateGStreamerMSE::startSource):
  Ditto.
(WebCore::MediaPlayerPrivateGStreamerMSE::emitStreams):
  Filters and emits streams.
(WebCore::filterOutRepeatingTracks):
  Deleted. Filtering is done in emitStreams now.
(WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
  Don't include text tracks in the stream collection.
(WebCore::MediaPlayerPrivateGStreamerMSE::startSource):
  Ditto.

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



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

Reply via email to