From ba820cdc34f397f6afd2b1b1181672ba7b66bc0b Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Sun, 11 Feb 2007 15:46:24 +0000 Subject: Add second midi renderer. Fix some double frees and leaks. Clean up logging. Original commit message from CVS: * configure.ac: * ext/timidity/Makefile.am: * ext/timidity/gsttimidity.c: (plugin_init): * ext/timidity/gstwildmidi.c: (gst_wildmidi_base_init), (gst_wildmidi_class_init), (gst_wildmidi_init), (gst_wildmidi_src_convert), (gst_wildmidi_src_query), (gst_wildmidi_get_upstream_size), (gst_wildmidi_get_segment), (gst_wildmidi_get_new_segment_event), (gst_wildmidi_src_event), (gst_wildmidi_activate), (gst_wildmidi_activatepull), (gst_wildmidi_allocate_buffer), (gst_wildmidi_clip_buffer), (gst_wildmidi_fill_buffer), (gst_wildmidi_get_buffer), (gst_wildmidi_loop), (gst_wildmidi_change_state), (gst_wildmidi_set_property), (gst_wildmidi_get_property), (gst_wildmidi_typefind), (wildmidi_open_config), (plugin_init): * ext/timidity/gstwildmidi.h: Add second midi renderer. Fix some double frees and leaks. Clean up logging. --- ext/timidity/gsttimidity.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/timidity/gsttimidity.c') diff --git a/ext/timidity/gsttimidity.c b/ext/timidity/gsttimidity.c index f8cc0af9..16e7de98 100644 --- a/ext/timidity/gsttimidity.c +++ b/ext/timidity/gsttimidity.c @@ -784,15 +784,17 @@ plugin_init (GstPlugin * plugin) /* initialise timidity library, fail loading the plugin if this fails * FIXME: check for config location during configure */ - if (mid_init ("/etc/timidity/timidity.cfg") != 0) { - GST_WARNING ("can't initialize timidity, is it configured?"); + if (mid_init (TIMIDITY_CFG) != 0) { + GST_WARNING ("can't initialize timidity with config: " TIMIDITY_CFG); return FALSE; } if (!gst_type_find_register (plugin, "audio/midi", GST_RANK_PRIMARY, gst_timidity_typefind, exts, - gst_caps_new_simple ("audio/midi", NULL), NULL, NULL)) + gst_caps_new_simple ("audio/midi", NULL), NULL, NULL)) { + GST_WARNING ("can't register typefind"); return FALSE; + } return gst_element_register (plugin, "timidity", GST_RANK_PRIMARY, GST_TYPE_TIMIDITY); -- cgit v1.2.1