Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d259cb2a0dedc8005483df441736c7e92f68c056
      
https://github.com/WebKit/WebKit/commit/d259cb2a0dedc8005483df441736c7e92f68c056
  Author: Alicia Boya Garcia <[email protected]>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp

  Log Message:
  -----------
  [GStreamer] Add transfer annotations to functions that return element pointer
https://bugs.webkit.org/show_bug.cgi?id=291898

Reviewed by Philippe Normand.

Instances of GstElement must be floating on construction.

This is an API requirement from GstElementFactory (see
gst_element_factory_create_with_properties() for details), and it is
automatically fulfilled by the constructor of GInitiallyUnowned, which
is a base class of GstElement.

However, this may not be immediately obvious to readers, so this patch
adds transfer annotations in comments to a few functions in
GStreamerCommon that return raw pointers.

This patch adds comments and assertions and introduces no new behavior.

Potentially converting those functions to use GRefPtr instead of raw
pointers is outside of the scope of this patch.

* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::createAutoAudioSink):
(WebCore::createPlatformAudioSink):
(WebCore::gstBufferNewWrappedFast):
(WebCore::makeGStreamerElement):
* Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp:
(webkitAudioSinkNew):

Canonical link: https://commits.webkit.org/294188@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