From 96b958291438f86516c7fa45c82d0804e91d35e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 15 Jun 2012 11:41:26 +0200 Subject: [PATCH] jasper: Rename from jp2k to jasper Jasper is not the only JPEG2000 library out there and we might want to add encoders/decoders based on OpenJPEG for example. --- configure.ac | 18 +++++++++--------- ext/Makefile.am | 10 +++++----- ext/jasper/Makefile.am | 14 ++++++++++++++ ext/{jp2k/gstjp2k.c => jasper/gstjasper.c} | 6 +++--- ext/{jp2k => jasper}/gstjasperdec.c | 7 ++----- ext/{jp2k => jasper}/gstjasperdec.h | 0 ext/{jp2k => jasper}/gstjasperenc.c | 9 +++------ ext/{jp2k => jasper}/gstjasperenc.h | 0 ext/jp2k/Makefile.am | 14 -------------- 9 files changed, 36 insertions(+), 42 deletions(-) create mode 100644 ext/jasper/Makefile.am rename ext/{jp2k/gstjp2k.c => jasper/gstjasper.c} (91%) rename ext/{jp2k => jasper}/gstjasperdec.c (99%) rename ext/{jp2k => jasper}/gstjasperdec.h (100%) rename ext/{jp2k => jasper}/gstjasperenc.c (98%) rename ext/{jp2k => jasper}/gstjasperenc.h (100%) delete mode 100644 ext/jp2k/Makefile.am diff --git a/configure.ac b/configure.ac index 895605488f..917b1cd3dd 100644 --- a/configure.ac +++ b/configure.ac @@ -322,7 +322,7 @@ GST_PLUGINS_NONPORTED=" aiff \ videomeasure videosignal vmnc \ decklink fbdev linsys vcd \ apexsink cdaudio cog dc1394 dirac directfb resindvd \ - gsettings jp2k ladspa mimic \ + gsettings jasper ladspa mimic \ musepack musicbrainz nas neon ofa openal opencv rsvg sdl sndfile soundtouch spandsp spc timidity \ directsound directdraw direct3d9 acm wininet \ wildmidi xvid lv2 teletextdec dvb sndio" @@ -1006,12 +1006,12 @@ AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [ AC_SUBST(GSM_LIBS) ]) -dnl *** jp2k *** -translit(dnm, m, l) AM_CONDITIONAL(USE_JP2K, true) -AG_GST_CHECK_FEATURE(JP2K, [jp2k], jp2kdec jp2kenc, [ - AG_GST_CHECK_LIBHEADER(JP2K, jasper, jas_stream_fopen, , jasper/jasper.h, - JP2K_LIBS="-ljasper") - AC_SUBST(JP2K_LIBS) +dnl *** jasper *** +translit(dnm, m, l) AM_CONDITIONAL(USE_JASPER, true) +AG_GST_CHECK_FEATURE(JASPER, [jasper], jasperdec jasperenc, [ + AG_GST_CHECK_LIBHEADER(JASPER, jasper, jas_stream_fopen, , jasper/jasper.h, + JASPER_LIBS="-ljasper") + AC_SUBST(JASPER_LIBS) ]) dnl *** kate *** @@ -1816,7 +1816,7 @@ AM_CONDITIONAL(USE_FAAD, false) AM_CONDITIONAL(USE_FBDEV, false) AM_CONDITIONAL(USE_FLITE, false) AM_CONDITIONAL(USE_GSM, false) -AM_CONDITIONAL(USE_JP2K, false) +AM_CONDITIONAL(USE_JASPER, false) AM_CONDITIONAL(USE_KATE, false) AM_CONDITIONAL(USE_TIGER, false) AM_CONDITIONAL(USE_LADSPA, false) @@ -2071,7 +2071,7 @@ ext/faac/Makefile ext/faad/Makefile ext/flite/Makefile ext/gsm/Makefile -ext/jp2k/Makefile +ext/jasper/Makefile ext/kate/Makefile ext/ladspa/Makefile ext/lv2/Makefile diff --git a/ext/Makefile.am b/ext/Makefile.am index bec8d861c1..98809be36d 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -130,10 +130,10 @@ else GSM_DIR= endif -if USE_JP2K -JP2K_DIR = jp2k +if USE_JASPER +JASPER_DIR = jasper else -JP2K_DIR = +JASPER_DIR = endif if USE_KATE @@ -385,7 +385,7 @@ SUBDIRS=\ $(GSETTINGS_DIR) \ $(GSM_DIR) \ $(G729_DIR) \ - $(JP2K_DIR) \ + $(JASPER_DIR) \ $(KATE_DIR) \ $(LADSPA_DIR) \ $(LV2_DIR) \ @@ -441,7 +441,7 @@ DIST_SUBDIRS = \ gsettings \ gsm \ ladspa \ - jp2k \ + jasper \ kate \ libmms \ lv2 \ diff --git a/ext/jasper/Makefile.am b/ext/jasper/Makefile.am new file mode 100644 index 0000000000..2be4c4bcd2 --- /dev/null +++ b/ext/jasper/Makefile.am @@ -0,0 +1,14 @@ +plugin_LTLIBRARIES = libgstjasper.la + +libgstjasper_la_SOURCES = gstjasperdec.c gstjasperenc.c gstjasper.c +libgstjasper_la_CFLAGS = \ + $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(JASPER_CFLAGS) +libgstjasper_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \ + $(GST_LIBS) $(JASPER_LIBS) +libgstjasper_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstjasper_la_LIBTOOLFLAGS = --tag=disable-static + +noinst_HEADERS = \ + gstjasperdec.h \ + gstjasperenc.h diff --git a/ext/jp2k/gstjp2k.c b/ext/jasper/gstjasper.c similarity index 91% rename from ext/jp2k/gstjp2k.c rename to ext/jasper/gstjasper.c index 5500aa91be..14dbf4dbf7 100644 --- a/ext/jp2k/gstjp2k.c +++ b/ext/jasper/gstjasper.c @@ -32,11 +32,11 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "jp2kdec", GST_RANK_MARGINAL, + if (!gst_element_register (plugin, "jasperdec", GST_RANK_MARGINAL, GST_TYPE_JASPER_DEC)) return FALSE; - if (!gst_element_register (plugin, "jp2kenc", GST_RANK_MARGINAL, + if (!gst_element_register (plugin, "jasperenc", GST_RANK_MARGINAL, GST_TYPE_JASPER_ENC)) return FALSE; @@ -49,6 +49,6 @@ plugin_init (GstPlugin * plugin) * so keep the name plugin_desc, or you cannot get your plug-in registered */ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, - jp2k, + jasper, "Jasper-based JPEG2000 image decoder/encoder", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/ext/jp2k/gstjasperdec.c b/ext/jasper/gstjasperdec.c similarity index 99% rename from ext/jp2k/gstjasperdec.c rename to ext/jasper/gstjasperdec.c index 84de1d9fce..4435077d7a 100644 --- a/ext/jp2k/gstjasperdec.c +++ b/ext/jasper/gstjasperdec.c @@ -85,10 +85,7 @@ static void gst_jasper_dec_read_qos (GstJasperDec * dec, gdouble * proportion, * keep original naming but use unique name here for a happy type system */ -typedef GstJasperDec GstJp2kDec; -typedef GstJasperDecClass GstJp2kDecClass; - -GST_BOILERPLATE (GstJp2kDec, gst_jasper_dec, GstElement, GST_TYPE_ELEMENT); +GST_BOILERPLATE (GstJasperDec, gst_jasper_dec, GstElement, GST_TYPE_ELEMENT); static void gst_jasper_dec_base_init (gpointer g_class) @@ -113,7 +110,7 @@ gst_jasper_dec_class_init (GstJasperDecClass * klass) gstelement_class = (GstElementClass *) klass; - GST_DEBUG_CATEGORY_INIT (gst_jasper_dec_debug, "jp2kdec", 0, + GST_DEBUG_CATEGORY_INIT (gst_jasper_dec_debug, "jasperdec", 0, "Jasper JPEG2000 decoder"); gstelement_class->change_state = diff --git a/ext/jp2k/gstjasperdec.h b/ext/jasper/gstjasperdec.h similarity index 100% rename from ext/jp2k/gstjasperdec.h rename to ext/jasper/gstjasperdec.h diff --git a/ext/jp2k/gstjasperenc.c b/ext/jasper/gstjasperenc.c similarity index 98% rename from ext/jp2k/gstjasperenc.c rename to ext/jasper/gstjasperenc.c index ae7b92567c..13eb7ab888 100644 --- a/ext/jp2k/gstjasperenc.c +++ b/ext/jasper/gstjasperenc.c @@ -75,9 +75,6 @@ static GstFlowReturn gst_jasper_enc_chain (GstPad * pad, GstBuffer * buffer); * keep original naming but use unique name here for a happy type system */ -typedef GstJasperEnc GstJp2kEnc; -typedef GstJasperEncClass GstJp2kEncClass; - static void _do_init (GType object_type) { @@ -91,8 +88,8 @@ _do_init (GType object_type) &preset_interface_info); } -GST_BOILERPLATE_FULL (GstJp2kEnc, gst_jasper_enc, GstElement, GST_TYPE_ELEMENT, - _do_init); +GST_BOILERPLATE_FULL (GstJasperEnc, gst_jasper_enc, GstElement, + GST_TYPE_ELEMENT, _do_init); static void gst_jasper_enc_base_init (gpointer g_class) @@ -117,7 +114,7 @@ gst_jasper_enc_class_init (GstJasperEncClass * klass) gstelement_class = (GstElementClass *) klass; - GST_DEBUG_CATEGORY_INIT (gst_jasper_enc_debug, "jp2kenc", 0, + GST_DEBUG_CATEGORY_INIT (gst_jasper_enc_debug, "jasperenc", 0, "Jasper JPEG2000 encoder"); /* FIXME add some encoder properties */ diff --git a/ext/jp2k/gstjasperenc.h b/ext/jasper/gstjasperenc.h similarity index 100% rename from ext/jp2k/gstjasperenc.h rename to ext/jasper/gstjasperenc.h diff --git a/ext/jp2k/Makefile.am b/ext/jp2k/Makefile.am deleted file mode 100644 index c5a9dc68c3..0000000000 --- a/ext/jp2k/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -plugin_LTLIBRARIES = libgstjp2k.la - -libgstjp2k_la_SOURCES = gstjasperdec.c gstjasperenc.c gstjp2k.c -libgstjp2k_la_CFLAGS = \ - $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(JP2K_CFLAGS) -libgstjp2k_la_LIBADD = \ - $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \ - $(GST_LIBS) $(JP2K_LIBS) -libgstjp2k_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstjp2k_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = \ - gstjasperdec.h \ - gstjasperenc.h \ No newline at end of file