[webkit-changes] [WebKit/WebKit] 7926de: [GStreamer][MSE] Optional encoders for AppendPIpel...
Vivienne
noreply at github.com
Wed Feb 19 06:13:16 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7926de4222132a135d84b4d4cc05d8f6738f9c6a
https://github.com/WebKit/WebKit/commit/7926de4222132a135d84b4d4cc05d8f6738f9c6a
Author: Vivienne Watermeier <vwatermeier at igalia.com>
Date: 2025-02-19 (Wed, 19 Feb 2025)
Changed paths:
M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h
Log Message:
-----------
[GStreamer][MSE] Optional encoders for AppendPIpeline streams
https://bugs.webkit.org/show_bug.cgi?id=287860
Reviewed by Philippe Normand.
Adds optional encoder elements, analogous to the optional parsers streams can have.
This is necessary for TextTrack support in MSE, where we need to re-encode any
subtitle or caption tracks to WebVTT, which is the format WebKit expects.
A stream in AppendPipeline now looks like this:
__________ ___________ ___________
___________ | | | | | |
| | -> | parser | -> | encoder | -> | appsink |
| demuxer | |________| |_________| |_________|
|_________| -> ...
Additionally, I've renamed parser elements, which previously tended to break pipeline dumps.
See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7979
While this was backported to 1.24.10, the change also makes element names more descriptive.
(Take for example 0_parser, which might now be called parser_0_video.)
Finally, I've changed some logging in TrackPrivateBaseGStreamer, which didn't yet use track IDs.
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
(WebCore::TrackPrivateBaseGStreamer::getTag):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfStreamChanged):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkCapsChanged):
(WebCore::AppendPipeline::didReceiveInitializationSegment):
(WebCore::createOptionalParserForFormat):
Just takes the new element's name as argument now.
(WebCore::createOptionalEncoderForFormat):
Creates an encoder, analogous to its parser counterpart.
(WebCore::AppendPipeline::recycleTrackForPad):
(WebCore::AppendPipeline::makeWebKitTrack):
(WebCore::AppendPipeline::Track::emplaceOptionalParserForFormat):
Creates parserName, and links the parser to the encoder, instead of the appsink.
(WebCore::AppendPipeline::Track::emplaceOptionalEncoderForFormat):
Create an encoder and link it to the appsink, also set finalCaps here.
(WebCore::AppendPipeline::Track::initializeElements):
(WebCore::AppendPipeline::streamTypeToStringLower):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h:
Add fields to AppendPipeline::Track: finalCaps, encoder, and encoderPad.
Canonical link: https://commits.webkit.org/290605@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list