openexr: Add OpenEXR plugin
authorSebastian Dröge <sebastian@centricular.com>
Sat, 23 Nov 2013 10:29:08 +0000 (11:29 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 23 Nov 2013 17:51:35 +0000 (18:51 +0100)
See http://www.openexr.com

configure.ac
ext/Makefile.am
ext/openexr/Makefile.am [new file with mode: 0644]
ext/openexr/gstopenexr.c [new file with mode: 0644]
ext/openexr/gstopenexr.h [new file with mode: 0644]
ext/openexr/gstopenexrdec.cpp [new file with mode: 0644]
ext/openexr/gstopenexrdec.h [new file with mode: 0644]

index fc43831..003c17c 100644 (file)
@@ -1766,6 +1766,12 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
   AC_SUBST(OPENCV_LIBS)
 ])
 
+dnl *** OpenEXR ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_OPENEXR, true)
+AG_GST_CHECK_FEATURE(OPENEXR, [openexr library], openexr, [
+  AG_GST_PKG_CHECK_MODULES(OPENEXR, OpenEXR)
+])
+
 dnl *** OpenJPEG ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true)
 AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [
@@ -2499,6 +2505,7 @@ ext/neon/Makefile
 ext/ofa/Makefile
 ext/openal/Makefile
 ext/opencv/Makefile
+ext/openexr/Makefile
 ext/openjpeg/Makefile
 ext/opus/Makefile
 ext/rsvg/Makefile
index c06d481..bfae3d1 100644 (file)
@@ -226,6 +226,12 @@ else
 OPENCV_DIR=
 endif
 
+if USE_OPENEXR
+OPENEXR_DIR = openexr
+else
+OPENEXR_DIR =
+endif
+
 if USE_OPENJPEG
 OPENJPEG_DIR = openjpeg
 else
@@ -417,6 +423,7 @@ SUBDIRS=\
        $(OFA_DIR) \
        $(OPENAL_DIR) \
        $(OPENCV_DIR) \
+       $(OPENEXR_DIR) \
        $(OPENJPEG_DIR) \
        $(OPUS_DIR) \
        $(RSVG_DIR) \
@@ -476,6 +483,7 @@ DIST_SUBDIRS = \
        ofa \
        openal \
        opencv \
+       openexr \
        openjpeg \
        opus \
        rsvg \
diff --git a/ext/openexr/Makefile.am b/ext/openexr/Makefile.am
new file mode 100644 (file)
index 0000000..6379697
--- /dev/null
@@ -0,0 +1,16 @@
+plugin_LTLIBRARIES = libgstopenexr.la
+
+libgstopenexr_la_SOURCES = gstopenexrdec.cpp gstopenexr.c
+libgstopenexr_la_CFLAGS = \
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(OPENEXR_CFLAGS)
+libgstopenexr_la_CXXFLAGS = \
+       $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENEXR_CFLAGS)
+libgstopenexr_la_LIBADD = \
+       $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+       $(GST_LIBS) $(OPENEXR_LIBS)
+libgstopenexr_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstopenexr_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = \
+       gstopenexrdec.h \
+       gstopenexr.h
diff --git a/ext/openexr/gstopenexr.c b/ext/openexr/gstopenexr.c
new file mode 100644 (file)
index 0000000..8f5ab28
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2013 Sebastian Dröge <sebastian@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstopenexr.h"
+#include "gstopenexrdec.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    openexr,
+    "OpenEXR image plugin",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/openexr/gstopenexr.h b/ext/openexr/gstopenexr.h
new file mode 100644 (file)
index 0000000..f1d1137
--- /dev/null
@@ -0,0 +1,24 @@
+/* 
+ * Copyright (C) 2013 Sebastian Dröge <sebastian@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __GST_OPENEXR_H__
+#define __GST_OPENEXR_H__
+
+#endif /* __GST_OPENEXR_H__ */
diff --git a/ext/openexr/gstopenexrdec.cpp b/ext/openexr/gstopenexrdec.cpp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/ext/openexr/gstopenexrdec.h b/ext/openexr/gstopenexrdec.h
new file mode 100644 (file)
index 0000000..e69de29