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.
This commit is contained in:
Sebastian Dröge 2012-06-15 11:41:26 +02:00
parent 742f26326f
commit 96b9582914
9 changed files with 36 additions and 42 deletions

View file

@ -322,7 +322,7 @@ GST_PLUGINS_NONPORTED=" aiff \
videomeasure videosignal vmnc \ videomeasure videosignal vmnc \
decklink fbdev linsys vcd \ decklink fbdev linsys vcd \
apexsink cdaudio cog dc1394 dirac directfb resindvd \ 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 \ musepack musicbrainz nas neon ofa openal opencv rsvg sdl sndfile soundtouch spandsp spc timidity \
directsound directdraw direct3d9 acm wininet \ directsound directdraw direct3d9 acm wininet \
wildmidi xvid lv2 teletextdec dvb sndio" wildmidi xvid lv2 teletextdec dvb sndio"
@ -1006,12 +1006,12 @@ AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
AC_SUBST(GSM_LIBS) AC_SUBST(GSM_LIBS)
]) ])
dnl *** jp2k *** dnl *** jasper ***
translit(dnm, m, l) AM_CONDITIONAL(USE_JP2K, true) translit(dnm, m, l) AM_CONDITIONAL(USE_JASPER, true)
AG_GST_CHECK_FEATURE(JP2K, [jp2k], jp2kdec jp2kenc, [ AG_GST_CHECK_FEATURE(JASPER, [jasper], jasperdec jasperenc, [
AG_GST_CHECK_LIBHEADER(JP2K, jasper, jas_stream_fopen, , jasper/jasper.h, AG_GST_CHECK_LIBHEADER(JASPER, jasper, jas_stream_fopen, , jasper/jasper.h,
JP2K_LIBS="-ljasper") JASPER_LIBS="-ljasper")
AC_SUBST(JP2K_LIBS) AC_SUBST(JASPER_LIBS)
]) ])
dnl *** kate *** dnl *** kate ***
@ -1816,7 +1816,7 @@ AM_CONDITIONAL(USE_FAAD, false)
AM_CONDITIONAL(USE_FBDEV, false) AM_CONDITIONAL(USE_FBDEV, false)
AM_CONDITIONAL(USE_FLITE, false) AM_CONDITIONAL(USE_FLITE, false)
AM_CONDITIONAL(USE_GSM, false) AM_CONDITIONAL(USE_GSM, false)
AM_CONDITIONAL(USE_JP2K, false) AM_CONDITIONAL(USE_JASPER, false)
AM_CONDITIONAL(USE_KATE, false) AM_CONDITIONAL(USE_KATE, false)
AM_CONDITIONAL(USE_TIGER, false) AM_CONDITIONAL(USE_TIGER, false)
AM_CONDITIONAL(USE_LADSPA, false) AM_CONDITIONAL(USE_LADSPA, false)
@ -2071,7 +2071,7 @@ ext/faac/Makefile
ext/faad/Makefile ext/faad/Makefile
ext/flite/Makefile ext/flite/Makefile
ext/gsm/Makefile ext/gsm/Makefile
ext/jp2k/Makefile ext/jasper/Makefile
ext/kate/Makefile ext/kate/Makefile
ext/ladspa/Makefile ext/ladspa/Makefile
ext/lv2/Makefile ext/lv2/Makefile

View file

@ -130,10 +130,10 @@ else
GSM_DIR= GSM_DIR=
endif endif
if USE_JP2K if USE_JASPER
JP2K_DIR = jp2k JASPER_DIR = jasper
else else
JP2K_DIR = JASPER_DIR =
endif endif
if USE_KATE if USE_KATE
@ -385,7 +385,7 @@ SUBDIRS=\
$(GSETTINGS_DIR) \ $(GSETTINGS_DIR) \
$(GSM_DIR) \ $(GSM_DIR) \
$(G729_DIR) \ $(G729_DIR) \
$(JP2K_DIR) \ $(JASPER_DIR) \
$(KATE_DIR) \ $(KATE_DIR) \
$(LADSPA_DIR) \ $(LADSPA_DIR) \
$(LV2_DIR) \ $(LV2_DIR) \
@ -441,7 +441,7 @@ DIST_SUBDIRS = \
gsettings \ gsettings \
gsm \ gsm \
ladspa \ ladspa \
jp2k \ jasper \
kate \ kate \
libmms \ libmms \
lv2 \ lv2 \

14
ext/jasper/Makefile.am Normal file
View file

@ -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

View file

@ -32,11 +32,11 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) 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)) GST_TYPE_JASPER_DEC))
return FALSE; return FALSE;
if (!gst_element_register (plugin, "jp2kenc", GST_RANK_MARGINAL, if (!gst_element_register (plugin, "jasperenc", GST_RANK_MARGINAL,
GST_TYPE_JASPER_ENC)) GST_TYPE_JASPER_ENC))
return FALSE; return FALSE;
@ -49,6 +49,6 @@ plugin_init (GstPlugin * plugin)
* so keep the name plugin_desc, or you cannot get your plug-in registered */ * so keep the name plugin_desc, or you cannot get your plug-in registered */
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
jp2k, jasper,
"Jasper-based JPEG2000 image decoder/encoder", "Jasper-based JPEG2000 image decoder/encoder",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)

View file

@ -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 * keep original naming but use unique name here for a happy type system
*/ */
typedef GstJasperDec GstJp2kDec; GST_BOILERPLATE (GstJasperDec, gst_jasper_dec, GstElement, GST_TYPE_ELEMENT);
typedef GstJasperDecClass GstJp2kDecClass;
GST_BOILERPLATE (GstJp2kDec, gst_jasper_dec, GstElement, GST_TYPE_ELEMENT);
static void static void
gst_jasper_dec_base_init (gpointer g_class) gst_jasper_dec_base_init (gpointer g_class)
@ -113,7 +110,7 @@ gst_jasper_dec_class_init (GstJasperDecClass * klass)
gstelement_class = (GstElementClass *) 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"); "Jasper JPEG2000 decoder");
gstelement_class->change_state = gstelement_class->change_state =

View file

@ -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 * keep original naming but use unique name here for a happy type system
*/ */
typedef GstJasperEnc GstJp2kEnc;
typedef GstJasperEncClass GstJp2kEncClass;
static void static void
_do_init (GType object_type) _do_init (GType object_type)
{ {
@ -91,8 +88,8 @@ _do_init (GType object_type)
&preset_interface_info); &preset_interface_info);
} }
GST_BOILERPLATE_FULL (GstJp2kEnc, gst_jasper_enc, GstElement, GST_TYPE_ELEMENT, GST_BOILERPLATE_FULL (GstJasperEnc, gst_jasper_enc, GstElement,
_do_init); GST_TYPE_ELEMENT, _do_init);
static void static void
gst_jasper_enc_base_init (gpointer g_class) gst_jasper_enc_base_init (gpointer g_class)
@ -117,7 +114,7 @@ gst_jasper_enc_class_init (GstJasperEncClass * klass)
gstelement_class = (GstElementClass *) 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"); "Jasper JPEG2000 encoder");
/* FIXME add some encoder properties */ /* FIXME add some encoder properties */

View file

@ -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