examples/snapshot: Does not need GTK but only gdk-pixbuf
This commit is contained in:
parent
00fa39befa
commit
88975f224e
@ -298,6 +298,7 @@ AC_SUBST(GST_PREFIX)
|
|||||||
dnl GTK is optional and only used in examples
|
dnl GTK is optional and only used in examples
|
||||||
HAVE_GTK=no
|
HAVE_GTK=no
|
||||||
HAVE_GTK_X11=no
|
HAVE_GTK_X11=no
|
||||||
|
HAVE_GDK_PIXBUF=no
|
||||||
GTK_REQ=3.10
|
GTK_REQ=3.10
|
||||||
if test "x$BUILD_EXAMPLES" = "xyes"; then
|
if test "x$BUILD_EXAMPLES" = "xyes"; then
|
||||||
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
|
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
|
||||||
@ -306,10 +307,15 @@ if test "x$BUILD_EXAMPLES" = "xyes"; then
|
|||||||
PKG_CHECK_MODULES(GTK_QUARTZ, gtk+-quartz-3.0 >= $GTK_REQ, HAVE_GTK_QUARTZ=yes, HAVE_GTK_QUARTZ=no)
|
PKG_CHECK_MODULES(GTK_QUARTZ, gtk+-quartz-3.0 >= $GTK_REQ, HAVE_GTK_QUARTZ=yes, HAVE_GTK_QUARTZ=no)
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0, HAVE_GDK_PIXBUF=yes, HAVE_GDK_PIXBUF=no)
|
||||||
|
AC_SUBST(GDK_PIXBUF_LIBS)
|
||||||
|
AC_SUBST(GDK_PIXBUF_CFLAGS)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_GTK_QUARTZ, test "x$HAVE_GTK_QUARTZ" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK_QUARTZ, test "x$HAVE_GTK_QUARTZ" = "xyes")
|
||||||
|
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$HAVE_GDK_PIXBUF" = "xyes")
|
||||||
|
|
||||||
HAVE_QT=no
|
HAVE_QT=no
|
||||||
HAVE_QT_MOC=no
|
HAVE_QT_MOC=no
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : false)
|
gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : false)
|
||||||
gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : false)
|
gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : false)
|
||||||
gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : false)
|
gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : false)
|
||||||
|
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', required : false)
|
||||||
|
|
||||||
subdir('app')
|
subdir('app')
|
||||||
subdir('audio')
|
subdir('audio')
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if HAVE_GTK
|
if HAVE_GDK_PIXBUF
|
||||||
GTK_EXAMPLES=snapshot
|
GDK_PIXBUF_EXAMPLES=snapshot
|
||||||
endif
|
endif
|
||||||
|
|
||||||
examples = $(GTK_EXAMPLES)
|
examples = $(GDK_PIXBUF_EXAMPLES)
|
||||||
|
|
||||||
noinst_PROGRAMS = $(examples)
|
noinst_PROGRAMS = $(examples)
|
||||||
|
|
||||||
LIBS = $(GST_LIBS) $(GTK_LIBS)
|
LIBS = $(GST_LIBS) $(GDK_PIXBUF_LIBS)
|
||||||
AM_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
|
AM_CFLAGS = $(GST_CFLAGS) $(GDK_PIXBUF_CFLAGS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if gtk_dep.found()
|
if gdk_pixbuf_dep.found()
|
||||||
executable('snapshot', 'snapshot.c',
|
executable('snapshot', 'snapshot.c',
|
||||||
c_args : gst_plugins_base_args,
|
c_args : gst_plugins_base_args,
|
||||||
include_directories: [configinc, libsinc],
|
include_directories: [configinc, libsinc],
|
||||||
dependencies : [libm, glib_deps, gst_dep, video_dep, gtk_dep],
|
dependencies : [libm, glib_deps, gst_dep, video_dep, gdk_pixbuf_dep],
|
||||||
install: false)
|
install: false)
|
||||||
endif
|
endif
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user