Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 566115fefbbe1154a999006b0aa2ecc389945b3a
      
https://github.com/WebKit/WebKit/commit/566115fefbbe1154a999006b0aa2ecc389945b3a
  Author: Youenn Fablet <[email protected]>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
    M Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h

  Log Message:
  -----------
  [macOS Debug] webrtc/ephemeral-certificates-and-cnames.html is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=313764

Reviewed by Jean-Yves Avenard.

Refactor LibWebRTCCodecs encoder setup to remove the synchronous 
BinarySemaphore wait in createEncoder(),
as it could deadlock and made the test flaky when closing the connection while 
GPU process connection is not yet created.

To do so, we do the following:
- Make createEncoder() asynchronous and buffer encode requests in 
Encoder::pendingFrames until a connection is available.
- Make initializeEncoder() synchronous so EncoderInitializationData is 
populated before libwebrtc's subsequent setEncodeRates() call.
- Track the latest rate in EncoderInitializationData and have setEncodeRates 
update it on both the connected and no-connection paths.
  That way, so setEncoderConnection re-applies the latest rate after a GPU 
process crash.
- Add WTF_REQUIRES_LOCK-annotated accessors for initializationData, with an 
ASSERT in the setter to enforce its single-use invariant.
- Reset sharedVideoFrameWriter inside setEncoderConnection so a reconnect to a 
new GPU process always drains pendingFrames against a fresh writer.
- setEncodeRates now returns a RefPtr. It can return nullptr in case of WebRTC 
code path, but not in the case of WebCodecs code path.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Canonical link: https://commits.webkit.org/313954@main



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

Reply via email to