Branch: refs/heads/webkitglib/2.52
  Home:   https://github.com/WebKit/WebKit
  Commit: b439a31c63a39c24957462430d90ae3717d8c7ac
      
https://github.com/WebKit/WebKit/commit/b439a31c63a39c24957462430d90ae3717d8c7ac
  Author: Vivienne Watermeier <[email protected]>
  Date:   2026-02-16 (Mon, 16 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:
  -----------
  Cherry-pick 307493@main (ef5a71c3f306). 
https://bugs.webkit.org/show_bug.cgi?id=307432

    [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

Canonical link: https://commits.webkit.org/305877.74@webkitglib/2.52



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to