Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 35764f98cfb6a8f43be130fe6eb0d395bf0b4a1f
      
https://github.com/WebKit/WebKit/commit/35764f98cfb6a8f43be130fe6eb0d395bf0b4a1f
  Author: Xabier Rodriguez-Calvar <[email protected]>
  Date:   2025-09-22 (Mon, 22 Sep 2025)

  Changed paths:
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    A Source/WTF/wtf/text/CStringView.cpp
    A Source/WTF/wtf/text/CStringView.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
    M 
Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h
    M Source/WebCore/inspector/agents/page/PageHeapAgent.cpp
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp
    M Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp
    M Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioRTPPacketizer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerIncomingTrackProcessor.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerMockDeviceProvider.cpp
    M Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoRTPPacketizer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.h
    M 
Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
    M Tools/TestWebKitAPI/CMakeLists.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp

  Log Message:
  -----------
  [GStreamer] Change gstStructureGetString and Name to properly handle null 
terminated strings
https://bugs.webkit.org/show_bug.cgi?id=290306

Reviewed by Geoffrey Garen.

Created a new CStringView type to wrap a C String and be able to recover, 
without copies, the original string while
taking advantage of some other string niceties likes comparisons and the like. 
This class handles UTF8 strings only, so
if you need to compare or interface with any other WebKit strings, you have to 
convert to String.

I used that on gstStructureGetString and Name and updated the rest of the code 
accordingly.

Tests: Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/CStringView.cpp: Added.
(WTF::CStringView::toString const):
(WTF::CStringView::dump const):
* Source/WTF/wtf/text/CStringView.h: Added.
(WTF::operator==):
(WTF::safePrintfType):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::requestPad):
(WebCore::GStreamerMediaEndpoint::connectIncomingTrack):
(WebCore::GStreamerMediaEndpoint::preprocessStats):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp:
(WebCore::GStreamerRtpReceiverBackend::getParameters):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp:
(WebCore::iceCandidateType):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp:
(WebCore::toRTCEncodingParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::payloadTypeForEncodingName):
(WebCore::capsFromRtpCapabilities):
(WebCore::capsFromSDPMedia):
(WebCore::extractMidAndRidFromRTPBuffer):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h:
* Source/WebCore/inspector/agents/page/PageHeapAgent.cpp:
(WebCore::PageHeapAgent::heapSnapshotBuilderOverrideClassName):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::userAgent const):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::webkitGstGhostPadFromStaticTemplate):
(WebCore::capsMediaType):
(WebCore::doCapsHaveType):
(WebCore::gstStructureGet):
(WebCore::gstStructureGetString):
(WebCore::gstStructureGetName):
(WebCore::gstStructureGetArray):
(WebCore::gstStructureGetList):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::isContentTypeSupported const):
* Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp:
(WebCore::GStreamerVideoFrameConverter::convert):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:
(WebCore::retrieveTemporalIndex):
* Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp:
(webKitAudioSinkConfigure):
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformCaps):
(transformInPlace):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::appsinkCapsChanged):
* Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp:
(WebCore::GStreamerMediaDescription::extractCodecName const):
* Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp:
(WebCore::MermaidBuilder::describeCaps):
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(webkit_video_encoder_class_init):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioRTPPacketizer.cpp:
(WebCore::GStreamerAudioRTPPacketizer::create):
* 
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
(WebCore::GStreamerCaptureDeviceManager::captureDeviceFromGstDevice):
* 
Source/WebCore/platform/mediastream/gstreamer/GStreamerIncomingTrackProcessor.cpp:
(WebCore::GStreamerIncomingTrackProcessor::configure):
(WebCore::GStreamerIncomingTrackProcessor::incomingTrackProcessor):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(webkitMediaStreamSrcAddTrack):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerMockDeviceProvider.cpp:
(webkitGstMockDeviceProviderSwitchDefaultDevice):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
(WebCore::GStreamerVideoCapturer::reconfigure):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoRTPPacketizer.cpp:
(WebCore::GStreamerVideoRTPPacketizer::create):
* 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setInitialParameters):
* 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setParameters):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::getPacketizerForRid):
* 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.h:
* 
Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerWebRTCVideoDecoder::makeElement):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(WebKit::operator<<):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp: Added.
(TestWebKitAPI::TEST(WTF, CStringViewNullAndEmpty)):
(TestWebKitAPI::TEST(WTF, CStringViewLength)):
(TestWebKitAPI::TEST(WTF, CStringViewFrom)):
(TestWebKitAPI::TEST(WTF, CStringViewEquality)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to