From: <za...@fr...> - 2004-08-19 22:45:06
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: zaheer Date: Thu Aug 19 2004 15:45:02 PDT Log message: 2004-08-19 Zaheer Abbas Merali <zaheerabbas at merali dot org> * configure.ac: * ext/lame/Makefile.am: * ext/lame/gstlame.c: (gst_lame_class_init), (gst_lame_set_property), (gst_lame_get_property), (gst_lame_setup): Only enable lame presets if version of lame has presets in API Modified files: . : ChangeLog configure.ac ext/lame : Makefile.am gstlame.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1014&r2=1.1015 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/configure.ac.diff?r1=1.451&r2=1.452 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/lame/Makefile.am.diff?r1=1.10&r2=1.11 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/lame/gstlame.c.diff?r1=1.71&r2=1.72 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1014 retrieving revision 1.1015 diff -u -d -r1.1014 -r1.1015 --- ChangeLog 19 Aug 2004 13:33:45 -0000 1.1014 +++ ChangeLog 19 Aug 2004 22:44:49 -0000 1.1015 @@ -1,3 +1,11 @@ +2004-08-19 Zaheer Abbas Merali <zaheerabbas at merali dot org> + + * configure.ac: + * ext/lame/Makefile.am: + * ext/lame/gstlame.c: (gst_lame_class_init), + (gst_lame_set_property), (gst_lame_get_property), (gst_lame_setup): + Only enable lame presets if version of lame has presets in API 2004-08-19 Jan Schmidt <th...@ma...> * gst/udp/gstudpsrc.c: (gst_udpsrc_init), (gst_udpsrc_get): * gst/udp/gstudpsrc.h: Index: configure.ac RCS file: /cvs/gstreamer/gst-plugins/configure.ac,v retrieving revision 1.451 retrieving revision 1.452 diff -u -d -r1.451 -r1.452 --- configure.ac 12 Aug 2004 12:00:31 -0000 1.451 +++ configure.ac 19 Aug 2004 22:44:50 -0000 1.452 @@ -1193,8 +1193,15 @@ dnl *** lame *** translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true) GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [ - GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame") + GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame -lm") ]) +dnl is lame presets available +ac_save_LIBS="$LIBS" +LIBS="$LAME_LIBS" +LAME_CFLAGS="" +AC_CHECK_FUNC(lame_set_preset, LAME_CFLAGS="-DGSTLAME_PRESET",) +LIBS="$ac_save_LIBS" +AC_SUBST(LAME_CFLAGS) AC_SUBST(LAME_LIBS) dnl *** libcaca *** Index: Makefile.am RCS file: /cvs/gstreamer/gst-plugins/ext/lame/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.am 9 Aug 2003 23:56:35 -0000 1.10 +++ Makefile.am 19 Aug 2004 22:44:50 -0000 1.11 @@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstlame.la libgstlame_la_SOURCES = gstlame.c -libgstlame_la_CFLAGS = $(GST_CFLAGS) +libgstlame_la_CFLAGS = $(GST_CFLAGS) $(LAME_CFLAGS) libgstlame_la_LIBADD = $(LAME_LIBS) libgstlame_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) Index: gstlame.c RCS file: /cvs/gstreamer/gst-plugins/ext/lame/gstlame.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- gstlame.c 15 Aug 2004 13:47:00 -0000 1.71 +++ gstlame.c 19 Aug 2004 22:44:50 -0000 1.72 @@ -23,6 +23,10 @@ #include "string.h" #include "gstlame.h" +#ifdef lame_set_preset +#define GST_LAME_PRESET +#endif GST_DEBUG_CATEGORY_STATIC (debug); #define GST_CAT_DEFAULT debug @@ -144,6 +148,7 @@ return lame_vbrmode_type; } +#ifdef GSTLAME_PRESET #define GST_TYPE_LAME_PRESET (gst_lame_preset_get_type()) static GType gst_lame_preset_get_type (void) @@ -165,6 +170,7 @@ return gst_lame_preset; /********** Standard stuff for signals and arguments **********/ /* GstLame signals and args */ @@ -208,8 +214,12 @@ ARG_NO_SHORT_BLOCKS, ARG_EMPHASIS, ARG_VBR_QUALITY, ARG_XINGHEADER, ARG_PRESET +#else + ARG_XINGHEADER }; static void gst_lame_base_init (gpointer g_class); @@ -392,9 +402,11 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_XINGHEADER, g_param_spec_boolean ("xingheader", "Output Xing Header", "Output Xing Header", FALSE, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PRESET, g_param_spec_enum ("preset", "Lame Preset", "Lame Preset", GST_TYPE_LAME_PRESET, 0, G_PARAM_READWRITE)); gobject_class->set_property = gst_lame_set_property; gobject_class->get_property = gst_lame_get_property; @@ -771,9 +783,11 @@ case ARG_XINGHEADER: lame->xingheader = g_value_get_boolean (value); break; case ARG_PRESET: lame->preset = g_value_get_enum (value); default: } @@ -888,9 +902,11 @@ g_value_set_boolean (value, lame->xingheader); g_value_set_enum (value, lame->preset); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1077,9 +1093,11 @@ CHECK_ERROR (lame_set_no_short_blocks (lame->lgf, lame->no_short_blocks)); CHECK_ERROR (lame_set_emphasis (lame->lgf, lame->emphasis)); CHECK_ERROR (lame_set_bWriteVbrTag (lame->lgf, lame->xingheader ? 1 : 0)); if (lame->preset > 0) { CHECK_ERROR (lame_set_preset (lame->lgf, lame->preset)); gst_lame_set_metadata (lame); /* initialize the lame encoder */ |