summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
-rw-r--r--configure.ac4
-rw-r--r--ext/alsaspdif/alsaspdifsink.c40
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc13
-rw-r--r--ext/soundtouch/gstpitch.cc17
-rw-r--r--gst/modplug/gstmodplug.cc13
6 files changed, 67 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index d3433507..d082c52b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2007-10-10 Tim-Philipp Müller <tim at centricular dot net>
+
+ * configure.ac:
+ Require core CVS. This is implicit in the -base CVS
+ requirement already, so we might just well spell it
+ out. Also, we do need at least 0.10.14 for
+ gst_element_class_set_details_simple(). Make check
+ for gmyth a bit more restrictive so things don't break
+ if the next version changes API.
+
+ * ext/alsaspdif/alsaspdifsink.c:
+ Work around alsa alloca macros triggering 'always evaluates to
+ true' warnings with gcc-4.2 and fix compilation with gcc-4.2.
+ Also don't leak the device string.
+
+ * ext/mpeg2enc/gstmpeg2enc.cc:
+ * ext/soundtouch/gstpitch.cc:
+ * gst/modplug/gstmodplug.cc:
+ Fix compilation with g++4.2 and -Wall -Werror (also needs plugin
+ define fix from core CVS). Fixes #462737.
+
2007-10-09 Wim Taymans <wim.taymans@gmail.com>
Patch by: Laurent Glayal <spglegle at yahoo dot fr>
diff --git a/configure.ac b/configure.ac
index 50ed0197..47a56cfd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ AM_PROG_LIBTOOL
dnl *** required versions of GStreamer stuff ***
dnl *** remove rtpmanager/equalizer stuff below when this is updated
-GST_REQ=0.10.13
+GST_REQ=0.10.14.1
GSTPB_REQ=0.10.14.1
dnl *** autotools stuff ****
@@ -701,7 +701,7 @@ AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
dnl *** MythTV ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
- PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4, HAVE_MYTHTV="yes", [
+ PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
HAVE_MYTHTV="no"
AC_MSG_RESULT(no)
])
diff --git a/ext/alsaspdif/alsaspdifsink.c b/ext/alsaspdif/alsaspdifsink.c
index bc1e2276..bea75bf9 100644
--- a/ext/alsaspdif/alsaspdifsink.c
+++ b/ext/alsaspdif/alsaspdifsink.c
@@ -122,6 +122,7 @@ static GstClock *alsaspdifsink_provide_clock (GstElement * elem);
static GstClockTime alsaspdifsink_get_time (GstClock * clock,
gpointer user_data);
static void alsaspdifsink_dispose (GObject * object);
+static void alsaspdifsink_finalize (GObject * object);
static GstStateChangeReturn alsaspdifsink_change_state (GstElement * element,
GstStateChange transition);
@@ -155,6 +156,7 @@ alsaspdifsink_class_init (AlsaSPDIFSinkClass * klass)
gobject_class->set_property = alsaspdifsink_set_property;
gobject_class->get_property = alsaspdifsink_get_property;
gobject_class->dispose = alsaspdifsink_dispose;
+ gobject_class->finalize = alsaspdifsink_finalize;
gstelement_class->change_state = alsaspdifsink_change_state;
gstelement_class->provide_clock = alsaspdifsink_provide_clock;
@@ -205,6 +207,17 @@ alsaspdifsink_dispose (GObject * object)
}
static void
+alsaspdifsink_finalize (GObject * object)
+{
+ AlsaSPDIFSink *sink = ALSASPDIFSINK (object);
+
+ g_free (sink->device);
+ sink->device = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
alsaspdifsink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
@@ -293,9 +306,6 @@ alsaspdifsink_open (AlsaSPDIFSink * sink)
char devstr[256]; /* Storage for local 'default' device string */
GstClockTime time;
- snd_pcm_hw_params_alloca (&params);
- snd_pcm_sw_params_alloca (&sw_params);
-
/*
* Try and open our default iec958 device. Fall back to searching on card x
* if this fails, which should only happen on older alsa setups
@@ -336,6 +346,9 @@ alsaspdifsink_open (AlsaSPDIFSink * sink)
return FALSE;
}
+ snd_pcm_hw_params_malloc (&params);
+ snd_pcm_sw_params_malloc (&sw_params);
+
err = snd_pcm_hw_params_any (sink->pcm, params);
if (err < 0) {
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
@@ -447,9 +460,13 @@ alsaspdifsink_open (AlsaSPDIFSink * sink)
snd_pcm_sw_params_get_avail_min (sw_params, &avail_min);
GST_DEBUG_OBJECT (sink, "Avail min set to:%lu frames", avail_min);
+ snd_pcm_hw_params_free (params);
+ snd_pcm_sw_params_free (sw_params);
return TRUE;
__close:
+ snd_pcm_hw_params_free (params);
+ snd_pcm_sw_params_free (sw_params);
snd_pcm_close (sink->pcm);
sink->pcm = NULL;
return FALSE;
@@ -488,14 +505,14 @@ alsaspdifsink_find_pcm_device (AlsaSPDIFSink * sink)
GST_WARNING ("Opening IEC958 named device failed. Trying to autodetect");
- snd_ctl_card_info_alloca (&info);
- snd_pcm_info_alloca (&pinfo);
-
if ((err = snd_ctl_open (&ctl, ctl_name, card)) < 0)
return err;
+ snd_ctl_card_info_malloc (&info);
+ snd_pcm_info_malloc (&pinfo);
+
/* Find a mixer for IEC958 settings */
- snd_ctl_elem_list_alloca (&clist);
+ snd_ctl_elem_list_malloc (&clist);
if ((err = snd_ctl_elem_list (ctl, clist)) < 0)
goto beach;
@@ -516,7 +533,7 @@ alsaspdifsink_find_pcm_device (AlsaSPDIFSink * sink)
err = 0;
goto beach;
}
- snd_ctl_elem_id_alloca (&cid);
+ snd_ctl_elem_id_malloc (&cid);
snd_ctl_elem_list_get_id (clist, idx, cid);
/* Now find a PCM device for IEC 958 */
@@ -572,7 +589,7 @@ alsaspdifsink_find_pcm_device (AlsaSPDIFSink * sink)
snd_aes_iec958_t iec958;
/* Have a PCM device and a mixer, set things up */
- snd_ctl_elem_value_alloca (&cval);
+ snd_ctl_elem_value_malloc (&cval);
snd_ctl_elem_value_set_id (cval, cid);
snd_ctl_elem_value_get_iec958 (cval, &iec958);
iec958.status[0] = IEC958_AES0_NONAUDIO;
@@ -580,6 +597,7 @@ alsaspdifsink_find_pcm_device (AlsaSPDIFSink * sink)
iec958.status[2] = 0;
iec958.status[3] = IEC958_AES3_CON_FS_48000;
snd_ctl_elem_value_set_iec958 (cval, &iec958);
+ snd_ctl_elem_value_free (cval);
sink->pcm = pcm;
pcm = NULL;
@@ -591,6 +609,10 @@ beach:
snd_pcm_close (pcm);
snd_ctl_elem_list_clear (clist);
snd_ctl_close (ctl);
+ snd_ctl_elem_list_free (clist);
+ snd_ctl_elem_id_free (cid);
+ snd_ctl_card_info_free (info);
+ snd_pcm_info_free (pinfo);
return err;
}
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index b91d9426..6ba9cde9 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -69,13 +69,6 @@
GST_DEBUG_CATEGORY (mpeg2enc_debug);
-static GstElementDetails gst_mpeg2enc_details =
-GST_ELEMENT_DETAILS ("mpeg2enc video encoder",
- "Codec/Encoder/Video",
- "High-quality MPEG-1/2 video encoder",
- "Andrew Stevens <andrew.stevens@nexgo.de>\n"
- "Ronald Bultje <rbultje@ronald.bitfreak.net>");
-
#define COMMON_VIDEO_CAPS \
"width = (int) [ 16, 4096 ], " \
"height = (int) [ 16, 4096 ], " \
@@ -121,7 +114,11 @@ gst_mpeg2enc_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_set_details (element_class, &gst_mpeg2enc_details);
+ gst_element_class_set_details_simple (element_class,
+ "mpeg2enc video encoder", "Codec/Encoder/Video",
+ "High-quality MPEG-1/2 video encoder",
+ "Andrew Stevens <andrew.stevens@nexgo.de>\n"
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_template));
diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc
index da90c513..b1a019f2 100644
--- a/ext/soundtouch/gstpitch.cc
+++ b/ext/soundtouch/gstpitch.cc
@@ -47,23 +47,12 @@ struct _GstPitchPrivate
soundtouch::SoundTouch * st;
};
-static GstElementDetails gst_pitch_details =
-GST_ELEMENT_DETAILS ("Pitch controller",
- "Filter/Converter/Audio",
- "Control the pitch of an audio stream",
- "Wouter Paesen <wouter@kangaroot.net>");
-
-enum
-{
- LAST_SIGNAL
-};
-
enum
{
ARG_0,
ARG_RATE,
ARG_TEMPO,
- ARG_PITCH,
+ ARG_PITCH
};
#define SUPPORTED_CAPS \
@@ -117,7 +106,9 @@ gst_pitch_base_init (gpointer g_class)
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_pitch_sink_template));
- gst_element_class_set_details (gstelement_class, &gst_pitch_details);
+ gst_element_class_set_details_simple (gstelement_class, "Pitch controller",
+ "Filter/Converter/Audio", "Control the pitch of an audio stream",
+ "Wouter Paesen <wouter@kangaroot.net>");
}
static void
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 1b7bf936..fea87230 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -56,14 +56,6 @@
GST_DEBUG_CATEGORY_STATIC (modplug_debug);
#define GST_CAT_DEFAULT modplug_debug
-/* elementfactory information */
-GstElementDetails modplug_details = {
- "ModPlug",
- "Codec/Decoder/Audio",
- "Module decoder based on modplug engine",
- "Jeremy SIMON <jsimon13@yahoo.fr>"
-};
-
enum
{
ARG_0,
@@ -148,7 +140,10 @@ gst_modplug_base_init (gpointer g_class)
gst_static_pad_template_get (&modplug_sink_template_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&modplug_src_template_factory));
- gst_element_class_set_details (element_class, &modplug_details);
+
+ gst_element_class_set_details_simple (element_class, "ModPlug",
+ "Codec/Decoder/Audio", "Module decoder based on modplug engine",
+ "Jeremy SIMON <jsimon13@yahoo.fr>");
GST_DEBUG_CATEGORY_INIT (modplug_debug, "modplug", 0, "ModPlug element");
}