<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2d5a03ec50e379f70f70d2badabd5bb5fffd646f">https://github.com/macports/macports-ports/commit/2d5a03ec50e379f70f70d2badabd5bb5fffd646f</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 2d5a03ec50e379f70f70d2badabd5bb5fffd646f
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Sun Aug 25 19:46:43 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> gstreamer1-gst-plugins-good: update to 1.24.7
</span>---
gnome/gstreamer1-gst-plugins-good/Portfile | 19 +-
.../files/patch-gstosxaudiodeviceprovider.c.diff | 250 +++++++++++++++++++++
2 files changed, 263 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gnome/gstreamer1-gst-plugins-good/Portfile b/gnome/gstreamer1-gst-plugins-good/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 2594a415342..c711c61adce 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/gnome/gstreamer1-gst-plugins-good/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gnome/gstreamer1-gst-plugins-good/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +11,7 @@ PortGroup muniversal 1.0
</span> name gstreamer1-gst-plugins-good
set my_name gst-plugins-good
# please only commit stable updates (even numbered releases)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-version 1.24.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 1.24.7
</span> revision 0
description A set of good-quality plug-ins for GStreamer under GStreamer's preferred \
license, LGPL.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,9 +27,9 @@ master_sites https://gstreamer.freedesktop.org/src/${my_name}/
</span> use_xz yes
distname ${my_name}-${version}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 40daa4008e12520ae8d63057f1f63dc466f73ec4 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 badcfc5292b035bde99a77327d468b2f0b116b40420bc9f25fb8e3970824ba75 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 2917136
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 02cbfb32c8ea976bacf749ea5a3f47b705f31aac \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 759acb11e6de8373ff8cbb5e7ab8eb9a38631be81cf24220267b001eb55593c1 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 2922348
</span>
set py_ver 3.12
set py_ver_nodot [string map {. {}} ${py_ver}]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -63,9 +63,16 @@ depends_lib-append port:aalib \
</span> port:twolame \
port:wavpack
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${os.platform} eq "darwin" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span> snowleopard-memmem.patch
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 16} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-gstosxaudiodeviceprovider.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
patchfiles-append patch-coreaudio.diff
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gnome/gstreamer1-gst-plugins-good/files/patch-gstosxaudiodeviceprovider.c.diff b/gnome/gstreamer1-gst-plugins-good/files/patch-gstosxaudiodeviceprovider.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..d6a4087c442
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gnome/gstreamer1-gst-plugins-good/files/patch-gstosxaudiodeviceprovider.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,250 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Revert a breaking commit: https://github.com/GStreamer/gstreamer/commit/9ca8f16a3bc11cbb48360095a4c42ecc17222568
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- sys/osxaudio/gstosxaudiodeviceprovider.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ sys/osxaudio/gstosxaudiodeviceprovider.c 2024-08-25 20:10:00.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,9 +29,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "gstosxaudiosink.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "gstosxaudiodeviceprovider.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-GST_DEBUG_CATEGORY_STATIC (gst_osxaudio_device_debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define GST_CAT_DEFAULT gst_osxaudio_device_debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 120000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -58,13 +55,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "osxaudiodeviceprovider", GST_RANK_PRIMARY,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static gboolean gst_osx_audio_device_provider_start (GstDeviceProvider *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void gst_osx_audio_device_provider_stop (GstDeviceProvider * provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static GList *gst_osx_audio_device_provider_probe (GstDeviceProvider *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-gst_osx_audio_device_provider_update_devices (GstOsxAudioDeviceProvider * self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gst_osx_audio_device_provider_class_init (GstOsxAudioDeviceProviderClass *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -72,17 +64,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GstDeviceProviderClass *dm_class = GST_DEVICE_PROVIDER_CLASS (klass);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- dm_class->start = gst_osx_audio_device_provider_start;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- dm_class->stop = gst_osx_audio_device_provider_stop;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dm_class->probe = gst_osx_audio_device_provider_probe;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gst_device_provider_class_set_static_metadata (dm_class,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "OSX Audio Device Provider", "Source/Sink/Audio",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "List and monitor OSX audio source and sink devices",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Hyunjun Ko <zzoon@igalia.com>");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_DEBUG_CATEGORY_INIT (gst_osxaudio_device_debug, "osxaudio_device", 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "Audio device provider for macOS");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -247,64 +234,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return devices;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static OSStatus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_audio_devices_changed_cb (AudioObjectID inObjectID, UInt32 inNumberAddresses,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const AudioObjectPropertyAddress * inAddresses,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *__nullable inClientData)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstOsxAudioDeviceProvider *self =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_OSX_AUDIO_DEVICE_PROVIDER (inClientData);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_DEBUG ("Audio devices changed");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gst_osx_audio_device_provider_update_devices (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return noErr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static AudioObjectPropertyAddress
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_get_devices_list_address ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- AudioObjectPropertyAddress address = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- .mSelector = kAudioHardwarePropertyDevices,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- .mScope = kAudioObjectPropertyScopeGlobal,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- .mElement = kAudioObjectPropertyElementMain
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return address;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static gboolean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_start_audio_device_watcher (GstOsxAudioDeviceProvider * self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- AudioObjectPropertyAddress propertyAddress = _get_devices_list_address ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- OSStatus result = AudioObjectAddPropertyListener (kAudioObjectSystemObject,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &propertyAddress, _audio_devices_changed_cb, self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (result != noErr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_WARNING ("Failed to add device list change listener: %d", result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_DEBUG ("Audio device watcher started");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static gboolean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_stop_audio_device_watcher (GstOsxAudioDeviceProvider * self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- AudioObjectPropertyAddress propertyAddress = _get_devices_list_address ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- OSStatus result = AudioObjectRemovePropertyListener (kAudioObjectSystemObject,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &propertyAddress, _audio_devices_changed_cb, self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (result != noErr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_WARNING ("Failed to remove device list change listener: %d", result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_DEBUG ("Audio device watcher stopped");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gst_osx_audio_device_provider_probe_internal (GstOsxAudioDeviceProvider * self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gboolean is_src, AudioDeviceID * osx_devices, gint ndevices,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -382,122 +311,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return devices;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static gboolean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-gst_osx_audio_device_provider_start (GstDeviceProvider * provider)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstOsxAudioDeviceProvider *self = GST_OSX_AUDIO_DEVICE_PROVIDER (provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *devices = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *iter;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- devices = gst_osx_audio_device_provider_probe (provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (devices) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = devices; iter; iter = g_list_next (iter)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gst_device_provider_device_add (provider, GST_DEVICE (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_list_free (devices);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return _start_audio_device_watcher (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-gst_osx_audio_device_provider_stop (GstDeviceProvider * provider)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstOsxAudioDeviceProvider *self = GST_OSX_AUDIO_DEVICE_PROVIDER (provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _stop_audio_device_watcher (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static gboolean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-gst_osx_audio_device_is_in_list (GList * list, GstDevice * gst_device)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstOsxAudioDevice *osx_device = GST_OSX_AUDIO_DEVICE (gst_device);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gchar *name = gst_device_get_display_name (gst_device);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *iter;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gboolean found = FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = list; iter; iter = g_list_next (iter)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstOsxAudioDevice *other_osx = GST_OSX_AUDIO_DEVICE (iter->data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gchar *other_name = gst_device_get_display_name (GST_DEVICE (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Only checking ID + class for now.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Should be enough to pick up changes when an existing output device
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * adds an input or vice versa */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (g_ascii_strcasecmp (name, other_name) == 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- && osx_device->device_id == other_osx->device_id) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- found = TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_free (other_name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (found)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_free (name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return found;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-gst_osx_audio_device_provider_update_devices (GstOsxAudioDeviceProvider * self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GstDeviceProvider *provider = GST_DEVICE_PROVIDER_CAST (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *prev_devices = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *new_devices = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *to_add = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *to_remove = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GList *iter;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_OBJECT_LOCK (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- prev_devices = g_list_copy_deep (provider->devices,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (GCopyFunc) gst_object_ref, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GST_OBJECT_UNLOCK (self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- new_devices = gst_osx_audio_device_provider_probe (provider);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!new_devices)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- goto done;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Ownership of GstDevice for gst_device_provider_device_add()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * and gst_device_provider_device_remove() is a bit complicated.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Remove floating reference here for things to be clear */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = new_devices; iter; iter = g_list_next (iter))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gst_object_ref_sink (iter->data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Check added devices */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = new_devices; iter; iter = g_list_next (iter)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!gst_osx_audio_device_is_in_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (prev_devices, GST_DEVICE (iter->data))) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to_add = g_list_prepend (to_add, gst_object_ref (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Check removed devices */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = prev_devices; iter; iter = g_list_next (iter)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!gst_osx_audio_device_is_in_list (new_devices, GST_DEVICE (iter->data))) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to_remove = g_list_prepend (to_remove, gst_object_ref (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = to_remove; iter; iter = g_list_next (iter))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gst_device_provider_device_remove (provider, GST_DEVICE (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (iter = to_add; iter; iter = g_list_next (iter))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gst_device_provider_device_add (provider, GST_DEVICE (iter->data));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-done:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (prev_devices)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_list_free_full (prev_devices, (GDestroyNotify) gst_object_unref);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (to_add)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_list_free_full (to_add, (GDestroyNotify) gst_object_unref);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (to_remove)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_list_free_full (to_remove, (GDestroyNotify) gst_object_unref);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (new_devices)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_list_free (new_devices);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enum
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PROP_DEVICE_ID = 1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -587,7 +400,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gstdev->element = element_name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return gstdev;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -609,7 +421,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gst_osx_audio_device_set_property (GObject * object, guint prop_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const GValue * value, GParamSpec * pspec)
</span></pre><pre style='margin:0'>
</pre>