Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 437ffaac6c61c3b629437ae99bdafa7a446eb2d9
https://github.com/WebKit/WebKit/commit/437ffaac6c61c3b629437ae99bdafa7a446eb2d9
Author: Youenn Fablet <[email protected]>
Date: 2026-06-15 (Mon, 15 Jun 2026)
Changed paths:
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.h
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.mm
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTB.h
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTB.mm
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBAV1.h
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBAV1.mm
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBVP9.h
M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBVP9.mm
Log Message:
-----------
Refactor WebRTCVideoDecoder to store VideoInfo and color space override
centrally
rdar://178529773
https://bugs.webkit.org/show_bug.cgi?id=316393
Reviewed by Jean-Yves Avenard.
This is a preparatory refactoring that moves color-space-override state
from individual subclasses into the WebRTCVideoDecoder base class, and
replaces the raw CMVideoFormatDescriptionRef plumbing in WebRTCVideoDecoderVTB
with a VideoInfo-based approach. No external behavior changes.
- WebRTCVideoDecoder gains m_colorSpaceOverride with a protected accessor
and a protected constructor that accepts an initial override value.
- WebRTCVideoDecoderVTB replaces setVideoFormat(CMVideoFormatDescriptionRef)
with setVideoInfo(Ref<VideoInfo>) and stores m_videoInfo alongside m_format.
A new private updateFormat(const VideoInfo&) derives m_format from the
supplied VideoInfo, applying the color space override when present and
falling back to the in-band bitstream color space when not.
- WebRTCVideoDecoderVTBAV1 drops its own m_colorSpaceOverride (now inherited
from the base). decodeFrame calls createVideoInfoFromAV1Stream without a
color space argument and passes the result to setVideoInfo; updateFormat
handles the override application centrally.
- WebRTCVideoDecoderVTBVP9 likewise drops m_colorSpaceOverride. The local
createVP9VideoInfoFromData no longer takes a color space parameter; the
override is applied in updateFormat.
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.h:
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.mm:
(WebCore::WebRTCLocalVideoDecoder::WebRTCLocalVideoDecoder):
(WebCore::WebRTCVideoDecoder::create):
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTB.h:
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTB.mm:
(WebCore::WebRTCVideoDecoderVTB::WebRTCVideoDecoderVTB):
(WebCore::WebRTCVideoDecoderVTB::setVideoInfo):
(WebCore::WebRTCVideoDecoderVTB::updateFormat):
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBAV1.h:
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBAV1.mm:
(WebCore::WebRTCVideoDecoderVTBAV1::WebRTCVideoDecoderVTBAV1):
(WebCore::WebRTCVideoDecoderVTBAV1::~WebRTCVideoDecoderVTBAV1):
(WebCore::WebRTCVideoDecoderVTBAV1::decodeFrame):
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBVP9.h:
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoderVTBVP9.mm:
(WebCore::createVP9VideoInfoFromData):
(WebCore::WebRTCVideoDecoderVTBVP9::WebRTCVideoDecoderVTBVP9):
(WebCore::WebRTCVideoDecoderVTBVP9::decodeFrame):
Canonical link: https://commits.webkit.org/315209@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications