[webkit-changes] [WebKit/WebKit] c9a7ac: [GStreamer] GRefPtr template specialization for Gs...

Philippe Normand noreply at github.com
Thu Mar 2 08:50:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c9a7acf64ee345688a8b9d4bec7a63a0128be7e3
      https://github.com/WebKit/WebKit/commit/c9a7acf64ee345688a8b9d4bec7a63a0128be7e3
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h

  Log Message:
  -----------
  [GStreamer] GRefPtr template specialization for GstDeviceMonitor
https://bugs.webkit.org/show_bug.cgi?id=253237

Reviewed by Xabier Rodriguez-Calvar.

We're (hopefully) not fixing a leak here, since without specialization the generic
g_object_ref/unref would be called. But having a specialization for this object is still a good
thing, allowing for instance the GStreamer leak tracer to correctly track lifetime of device
monitors.

Also, drive-by, stop the monitor only if it was successfully started, similarily to the
CaptureDeviceManager implementation.

* Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::maximumNumberOfOutputChannels):
* Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstDeviceMonitor>):
(WTF::derefGPtr<GstDeviceMonitor>):
* Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h:

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




More information about the webkit-changes mailing list