[webkit-changes] [WebKit/WebKit] 248020: keyFramesDecoded > 0 while framesDecoded == 0

youennf noreply at github.com
Thu Oct 12 09:25:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 248020847da1d5e6b9130d04b3ff4353efa29d2c
      https://github.com/WebKit/WebKit/commit/248020847da1d5e6b9130d04b3ff4353efa29d2c
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h

  Log Message:
  -----------
  keyFramesDecoded > 0 while framesDecoded == 0
https://bugs.webkit.org/show_bug.cgi?id=262972
rdar://116810102

Reviewed by Eric Carlson.

When creating a remote decoder, there is a small amount of time where the decoder does not have a connection.
We were previously returning an error, which would instruct libwebrtc backend to request a key frame.
Some services only provide SPS/PPS in the first frame and not the succeesive key frames.
When dropping the first frame with a missing connection, we would not be able to recover.

To prevent this, we store the frames to decode in a vector if the decoder does not have a connection.
When setting the connection, we then send all frames to the GPU process.

Manually tested.

* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::sendFrameToDecode):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::setDecoderConnection):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

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




More information about the webkit-changes mailing list