summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorEdgard Lima <edgard.lima@indt.org.br>2007-12-04 17:20:25 +0000
committerEdgard Lima <edgard.lima@indt.org.br>2007-12-04 17:20:25 +0000
commitf44ca529d7773a095b9a02745ee71349b5161b2d (patch)
tree0a7c2030b7575283d5b151e40024c11f3b35fb60 /ext
parentcf4c5c965553c2c216561e4868621b82bf0a1ab5 (diff)
downloadgst-plugins-bad-f44ca529d7773a095b9a02745ee71349b5161b2d.tar.gz
gst-plugins-bad-f44ca529d7773a095b9a02745ee71349b5161b2d.tar.bz2
gst-plugins-bad-f44ca529d7773a095b9a02745ee71349b5161b2d.zip
Now compiles even when libiptc is missing.
Original commit message from CVS: Now compiles even when libiptc is missing.
Diffstat (limited to 'ext')
-rw-r--r--ext/metadata/metadatamuxjpeg.c8
-rw-r--r--ext/metadata/metadataparsejpeg.c13
2 files changed, 18 insertions, 3 deletions
diff --git a/ext/metadata/metadatamuxjpeg.c b/ext/metadata/metadatamuxjpeg.c
index 0e5c9334..74b7ad19 100644
--- a/ext/metadata/metadatamuxjpeg.c
+++ b/ext/metadata/metadatamuxjpeg.c
@@ -45,7 +45,9 @@
#include <string.h>
+#ifdef HAVE_IPTC
#include <libiptcdata/iptc-jpeg.h>
+#endif
static int
metadatamux_jpeg_reading (JpegMuxData * jpeg_data, guint8 ** buf,
@@ -55,8 +57,8 @@ metadatamux_jpeg_reading (JpegMuxData * jpeg_data, guint8 ** buf,
#define READ(buf, size) ( (size)--, *((buf)++) )
static void
-metadatamux_wrap_chunk (MetadataChunk * chunk, guint8 * buf, guint32 buf_size,
- guint8 a, guint8 b)
+metadatamux_wrap_chunk (MetadataChunk * chunk, const guint8 * buf,
+ guint32 buf_size, guint8 a, guint8 b)
{
guint8 *data = g_new (guint8, 4 + buf_size + chunk->size);
@@ -89,6 +91,7 @@ metadatamux_jpeg_lazy_update (JpegMuxData * jpeg_data)
has_exif = TRUE;
break;
case MD_CHUNK_IPTC:
+#ifdef HAVE_IPTC
{
unsigned int size = jpeg_data->inject_chunks->chunk[i].size + 256;
unsigned char *buf = g_new (guint8, size);
@@ -108,6 +111,7 @@ metadatamux_jpeg_lazy_update (JpegMuxData * jpeg_data)
/* FIXME: remove entry from list */
}
}
+#endif /* #ifdef HAVE_IPTC */
break;
case MD_CHUNK_XMP:
{
diff --git a/ext/metadata/metadataparsejpeg.c b/ext/metadata/metadataparsejpeg.c
index fb024150..541f7d7d 100644
--- a/ext/metadata/metadataparsejpeg.c
+++ b/ext/metadata/metadataparsejpeg.c
@@ -45,7 +45,9 @@
#include <string.h>
+#ifdef HAVE_IPTC
#include <libiptcdata/iptc-jpeg.h>
+#endif
static int
metadataparse_jpeg_reading (JpegParseData * jpeg_data, guint8 ** buf,
@@ -56,9 +58,11 @@ static int
metadataparse_jpeg_exif (JpegParseData * jpeg_data, guint8 ** buf,
guint32 * bufsize, guint8 ** next_start, guint32 * next_size);
+#ifdef HAVE_IPTC
static int
metadataparse_jpeg_iptc (JpegParseData * jpeg_data, guint8 ** buf,
guint32 * bufsize, guint8 ** next_start, guint32 * next_size);
+#endif
static int
metadataparse_jpeg_xmp (JpegParseData * jpeg_data, guint8 ** buf,
@@ -151,9 +155,11 @@ metadataparse_jpeg_parse (JpegParseData * jpeg_data, guint8 * buf,
next_size);
break;
case JPEG_PARSE_IPTC:
+#ifdef HAVE_IPTC
ret =
metadataparse_jpeg_iptc (jpeg_data, &buf, bufsize, next_start,
next_size);
+#endif
break;
case JPEG_PARSE_XMP:
ret =
@@ -320,7 +326,9 @@ metadataparse_jpeg_reading (JpegParseData * jpeg_data, guint8 ** buf,
}
}
}
- } else if (mark[1] == 0xED) { /* may be it is photoshop and may be there is iptc */
+ }
+#ifdef HAVE_IPTC
+ else if (mark[1] == 0xED) { /* may be it is photoshop and may be there is iptc */
if (chunk_size >= 16) { /* size2 "Photoshop 3.0" */
if (*bufsize < 14) {
@@ -350,6 +358,7 @@ metadataparse_jpeg_reading (JpegParseData * jpeg_data, guint8 ** buf,
}
}
}
+#endif /* #ifdef HAVE_IPTC */
/* just set jump sise */
jpeg_data->read = chunk_size - 2;
@@ -388,6 +397,7 @@ metadataparse_jpeg_exif (JpegParseData * jpeg_data, guint8 ** buf,
}
+#ifdef HAVE_IPTC
static int
metadataparse_jpeg_iptc (JpegParseData * jpeg_data, guint8 ** buf,
guint32 * bufsize, guint8 ** next_start, guint32 * next_size)
@@ -439,6 +449,7 @@ metadataparse_jpeg_iptc (JpegParseData * jpeg_data, guint8 ** buf,
return ret;
}
+#endif
static int
metadataparse_jpeg_xmp (JpegParseData * jpeg_data, guint8 ** buf,