mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
devicemonitor: g_queue_clear_full introduced in glib 2.60
The GStreamer dependency is glib >=2.56.0. Therefore, define
g_queue_clear_full if glib < 2.60.
Issue added in commit 1912bcbc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1251>
This commit is contained in:
parent
6d447acef5
commit
0fee1e5d46
1 changed files with 12 additions and 0 deletions
|
@ -357,6 +357,18 @@ gst_device_monitor_dispose (GObject * object)
|
|||
G_OBJECT_CLASS (gst_device_monitor_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 60, 0)
|
||||
#define g_queue_clear_full queue_clear_full
|
||||
static void
|
||||
queue_clear_full (GQueue * queue, GDestroyNotify free_func)
|
||||
{
|
||||
gpointer data;
|
||||
|
||||
while ((data = g_queue_pop_head (queue)) != NULL)
|
||||
free_func (data);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gst_device_monitor_get_devices:
|
||||
* @monitor: A #GstDeviceProvider
|
||||
|
|
Loading…
Reference in a new issue