Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GStreamer] Make GstMappedFrame assert when it is not initialized
https://bugs.webkit.org/show_bug.cgi?id=269980 Reviewed by Carlos Garcia Campos. This way we can align the implementation of GstMappedFrame with GstMappedBuffer and assert when its data is accessed but it was not properly mapped at initialization. Even when now it is properly protected at members access, additional checks were added in some places where its instantiation was not being checked. A fly-by improvement is making the constructor taking GRefPtr<GstSample> to take const & to avoid unnecessary ref/unref. * Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h: (WebCore::GstMappedFrame::GstMappedFrame): (WebCore::GstMappedFrame::get): (WebCore::GstMappedFrame::ComponentData const): (WebCore::GstMappedFrame::ComponentStride const): (WebCore::GstMappedFrame::info): (WebCore::GstMappedFrame::width const): (WebCore::GstMappedFrame::height const): (WebCore::GstMappedFrame::format const): (WebCore::GstMappedFrame::planeData const): (WebCore::GstMappedFrame::planeStride const): (WebCore::GstMappedFrame::isValid const): (WebCore::GstMappedFrame::operator! const): * Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp: (WebCore::VideoFrame::copyTo): * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.cpp: (WebCore::GStreamerVideoFrameLibWebRTC::ToI420): Canonical link: https://commits.webkit.org/275320@main
- Loading branch information
Showing
3 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters