Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ef5a71c3f3067a3f070dae47da382e57b135526f
https://github.com/WebKit/WebKit/commit/ef5a71c3f3067a3f070dae47da382e57b135526f
Author: Vivienne Watermeier <[email protected]>
Date: 2026-02-13 (Fri, 13 Feb 2026)
Changed paths:
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
M Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp
Log Message:
-----------
[GStreamer] TrackID parsing fallback to hashing stream-id
https://bugs.webkit.org/show_bug.cgi?id=307432
Reviewed by Philippe Normand.
If GStreamer reports a stream-id that we aren't able to
parse into an integer, we currently just use the track index instead.
This however makes it difficult to identify a track from looking at a pad,
and when getStreamIdFromPad() fails, it's not clear if this is due
to failing to parse the id, or if there is no stream-start event altogether.
This may happen for example in MediaPlayerPrivateGStreamer::setupCodecProbe().
Just hashing the stream-id if we can't otherwise parse it solves both
of these issues.
Test: Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::getStreamIdFromPad): the only error case here is now missing
stream-start
(WebCore::parseStreamId): fall back to hashing, thus never fail parsing
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfTrack): if we can't find
an id at this point, just bail out.
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): no need to
fallback to index anymore
(WebCore::TrackPrivateBaseGStreamer::setPad): ditto
(WebCore::TrackPrivateBaseGStreamer::installUpdateConfigurationHandlers): we
don't even need to parse an id here.
Canonical link: https://commits.webkit.org/307493@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications