mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
Add glib compatibility glue for older versions.
This commit is contained in:
parent
0fb1147d9c
commit
b54bf3175c
4 changed files with 42 additions and 0 deletions
|
@ -147,6 +147,9 @@ AC_SUBST(GTKDOC_VERSION)
|
||||||
dnl Check for GLib
|
dnl Check for GLib
|
||||||
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
|
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
|
||||||
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
||||||
|
AC_CHECK_LIB([glib-2.0], [g_list_free_full], [
|
||||||
|
AC_DEFINE([HAVE_G_LIST_FREE_FULL], [1],
|
||||||
|
[Define to 1 if g_list_free_full() is available.])])
|
||||||
AC_SUBST(GLIB_CFLAGS)
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
AC_SUBST(GLIB_LIBS)
|
AC_SUBST(GLIB_LIBS)
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ libgstvaapi_source_h = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_source_priv_h = \
|
libgstvaapi_source_priv_h = \
|
||||||
|
glibcompat.h \
|
||||||
gstvaapi_priv.h \
|
gstvaapi_priv.h \
|
||||||
gstvaapicompat.h \
|
gstvaapicompat.h \
|
||||||
gstvaapidebug.h \
|
gstvaapidebug.h \
|
||||||
|
|
36
gst-libs/gst/vaapi/glibcompat.h
Normal file
36
gst-libs/gst/vaapi/glibcompat.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* glibcompat.h - System-dependent definitions
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Intel Corporation
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free
|
||||||
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GLIB_COMPAT_H
|
||||||
|
#define GLIB_COMPAT_H
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifndef HAVE_G_LIST_FREE_FULL
|
||||||
|
static inline void
|
||||||
|
g_list_free_full(GList *list, GDestroyNotify free_func)
|
||||||
|
{
|
||||||
|
g_list_foreach(list, (GFunc)free_func, NULL);
|
||||||
|
g_list_free(list);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GLIB_COMPAT_H */
|
|
@ -26,4 +26,6 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "glibcompat.h"
|
||||||
|
|
||||||
#endif /* SYSDEPS_H */
|
#endif /* SYSDEPS_H */
|
||||||
|
|
Loading…
Reference in a new issue