[webkit-changes] [WebKit/WebKit] c83c25: WebCodecsVideoFrame should set its VideoFrame pres...

youennf noreply at github.com
Thu Jan 25 06:07:45 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c83c252e819519949155fd90995230fc40afd2a2
      https://github.com/WebKit/WebKit/commit/c83c252e819519949155fd90995230fc40afd2a2
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    A LayoutTests/http/wpt/mediastream/mediastreamtrackprocessor-videoframe-timestamp-expected.txt
    A LayoutTests/http/wpt/mediastream/mediastreamtrackprocessor-videoframe-timestamp.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h
    M Source/WebCore/platform/VideoFrame.cpp
    M Source/WebCore/platform/VideoFrame.h
    M Source/WebCore/platform/graphics/cv/VideoFrameCV.h
    M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm
    M Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.h
    M Source/WebCore/platform/mediastream/libwebrtc/VideoFrameLibWebRTC.cpp
    M Source/WebCore/platform/mediastream/libwebrtc/VideoFrameLibWebRTC.h
    M Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.h

  Log Message:
  -----------
  WebCodecsVideoFrame should set its VideoFrame presentationTime at construction time
https://bugs.webkit.org/show_bug.cgi?id=267994
rdar://121512179

Reviewed by Eric Carlson.

Consumers of WebCodecsVideoFrame like MediaStreamTrackProcessor use VideoFrame presentationTime instead of WebCodecsVideoFrame timestamp.
We need to keep them in sync and this patch does it at construction time.
We introduce a VideoFrame clone() method for the case where we cannot update the VideoFrame presentationTime directly.
We cannot remove WebCodecsVideoFrame timestamp since timestamp needs to stay even if WebCodecsVideoFrame is closed.

* LayoutTests/http/wpt/mediastream/mediastreamtrackprocessor-videoframe-timestamp-expected.txt: Added.
* LayoutTests/http/wpt/mediastream/mediastreamtrackprocessor-videoframe-timestamp.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
(WebCore::timestampToMediaTime):
(WebCore::mediaTimeToTimestamp):
(WebCore::WebCodecsVideoFrame::create):
(WebCore::WebCodecsVideoFrame::initializeFrameFromOtherFrame):
(WebCore::WebCodecsVideoFrame::initializeFrameWithResourceAndSize):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h:
* Source/WebCore/platform/VideoFrame.cpp:
(WebCore::VideoFrame::updateTimestamp):
* Source/WebCore/platform/VideoFrame.h:
* Source/WebCore/platform/graphics/cv/VideoFrameCV.h:
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrameCV::VideoFrameCV):
(WebCore::VideoFrameCV::clone):
* Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
(WebCore::VideoFrame::clone):
* Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.h:
* Source/WebCore/platform/mediastream/libwebrtc/VideoFrameLibWebRTC.cpp:
(WebCore::VideoFrameLibWebRTC::clone):
* Source/WebCore/platform/mediastream/libwebrtc/VideoFrameLibWebRTC.h:
* Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::m_pixelFormat):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::newReadReference const):
(WebKit::RemoteVideoFrameProxy::pixelBuffer const):
(WebKit::RemoteVideoFrameProxy::clone):
* Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.h:

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




More information about the webkit-changes mailing list