[gegl] gcut: guard gexiv2 using bits with ifdefs
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gcut: guard gexiv2 using bits with ifdefs
- Date: Fri, 14 Jul 2017 19:56:50 +0000 (UTC)
commit 91f16f74c4031cdf9da9eb4458733f3672d1e2ea
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jul 14 21:56:33 2017 +0200
gcut: guard gexiv2 using bits with ifdefs
gcut/Makefile.am | 4 +---
gcut/gcut.c | 10 +++++++++-
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gcut/Makefile.am b/gcut/Makefile.am
index 7bd0a7f..770b412 100644
--- a/gcut/Makefile.am
+++ b/gcut/Makefile.am
@@ -45,17 +45,15 @@ default.edl.inc: default.edl
gcut_SOURCES = \
gcut.c \
-default.edl.inc \
+ default.edl.inc \
gcut.h \
iconographer.c \
clip.c
if HAVE_MRG
-if HAVE_GEXIV2
if HAVE_SDL
gcut_SOURCES += gcut-ui.c renderer.c
AM_CFLAGS += $(SDL_CFLAGS)
AM_LDFLAGS += $(SDL_LIBS)
endif
endif
-endif
diff --git a/gcut/gcut.c b/gcut/gcut.c
index d25bb06..5485fe9 100644
--- a/gcut/gcut.c
+++ b/gcut/gcut.c
@@ -1,13 +1,17 @@
+#include "config.h"
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <ctype.h>
#include <stdio.h>
#include <gegl.h>
-#include <gexiv2/gexiv2.h>
#include <libgen.h>
#include <gegl-audio-fragment.h>
+#if HAVE_GEXIV2
+#include <gexiv2/gexiv2.h>
+#endif
+
/* GEGL edit decision list - a digital video cutter and splicer */
/* take a string and expand {t=v i t=v t=v } to numeric or string
@@ -1476,6 +1480,7 @@ void
gegl_meta_set_audio (const char *path,
GeglAudioFragment *audio)
{
+#if HAVE_GEXIV2
GError *error = NULL;
GExiv2Metadata *e2m = gexiv2_metadata_new ();
gexiv2_metadata_open_path (e2m, path, &error);
@@ -1509,12 +1514,14 @@ gegl_meta_set_audio (const char *path,
g_string_free (str, TRUE);
}
g_object_unref (e2m);
+#endif
}
void
gegl_meta_get_audio (const char *path,
GeglAudioFragment *audio)
{
+#if HAVE_GEXIV2
GError *error = NULL;
GExiv2Metadata *e2m = gexiv2_metadata_new ();
gexiv2_metadata_open_path (e2m, path, &error);
@@ -1574,6 +1581,7 @@ gegl_meta_get_audio (const char *path,
else
g_warning ("%s", error->message);
g_object_unref (e2m);
+#endif
}
void gcut_set_selection (GeglEDL *edl, int start_frame, int end_frame)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]