From: <co...@fr...> - 2004-07-15 20:32:54
|
CVS Root: /home/cvs/gstreamer Module: gst-plugins Changes by: company Date: Fri Jul 16 2004 06:32:53 EST Log message: * ext/alsa/gstalsa.c: (gst_alsa_open_audio), (gst_alsa_sw_params_dump), (gst_alsa_hw_params_dump), (gst_alsa_close_audio): disable some of the debugging code for now. Writing debugging to a buffer is broken in current alsalib releases. Modified files: . : ChangeLog ext/alsa : gstalsa.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.872&r2=1.873 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/alsa/gstalsa.c.diff?r1=1.119&r2=1.120 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.872 retrieving revision 1.873 diff -u -d -r1.872 -r1.873 --- ChangeLog 15 Jul 2004 19:02:13 -0000 1.872 +++ ChangeLog 15 Jul 2004 20:32:41 -0000 1.873 @@ -1,3 +1,11 @@ +2004-07-15 Benjamin Otte <ot...@gn...> + + * ext/alsa/gstalsa.c: (gst_alsa_open_audio), + (gst_alsa_sw_params_dump), (gst_alsa_hw_params_dump), + (gst_alsa_close_audio): + disable some of the debugging code for now. Writing debugging to a + buffer is broken in current alsalib releases. 2004-07-12 Benjamin Otte <ot...@gn...> * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_buffer): Index: gstalsa.c RCS file: /home/cvs/gstreamer/gst-plugins/ext/alsa/gstalsa.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- gstalsa.c 9 Jul 2004 10:56:48 -0000 1.119 +++ gstalsa.c 15 Jul 2004 20:32:41 -0000 1.120 @@ -31,9 +31,13 @@ #include "gstalsaclock.h" #include "gstalsamixer.h" +/* all this ifdef'ed stuff causes segfaults because of alsa bug 389, see + * https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000389 + */ +#ifdef ALSA_BUG_389_FIXED #define ALSA_DEBUG_FLUSH(this) G_STMT_START{ \ gchar *__str; \ - ssize_t __size; \ + size_t __size; \ __size = snd_output_buffer_string (this->out, &__str); \ if (__size > 0) { \ GST_DEBUG_OBJECT (this, "%*s", __size, __str); \ @@ -41,6 +45,7 @@ GST_ERROR_OBJECT (this, "error flushing output buffer"); \ } \ }G_STMT_END +#endif /* GObject functions */ static void gst_alsa_class_init (gpointer g_class, gpointer class_data); @@ -1299,8 +1304,10 @@ GST_INFO ("Opening alsa device \"%s\"...", this->device); ERROR_CHECK (snd_output_buffer_open (&this->out), "error opening log output: %s"); if ((ret = snd_pcm_open (&this->handle, this->device, GST_ALSA_GET_CLASS (this)->stream, SND_PCM_NONBLOCK)) < 0) { @@ -1345,15 +1352,19 @@ void gst_alsa_sw_params_dump (GstAlsa * this, snd_pcm_sw_params_t * sw_params) { snd_pcm_sw_params_dump (sw_params, this->out); ALSA_DEBUG_FLUSH (this); } gst_alsa_hw_params_dump (GstAlsa * this, snd_pcm_hw_params_t * hw_params) snd_pcm_hw_params_dump (hw_params, this->out); /* if someone finds an easy way to merge this with _set_hw_params, go ahead */ @@ -1611,7 +1622,9 @@ static gboolean gst_alsa_close_audio (GstAlsa * this) gint err; /* if there's no pads, we never open. So we don't close either. */ if (!gst_element_get_pad_list (GST_ELEMENT (this))) @@ -1620,11 +1633,13 @@ g_return_val_if_fail (this != NULL, FALSE); g_return_val_if_fail (this->handle != NULL, FALSE); err = snd_output_close (this->out); if (err != 0) GST_ERROR_OBJECT (this, "failed to close debugging output: %s", snd_strerror (err)); ERROR_CHECK (snd_pcm_close (this->handle), "Error closing device: %s"); this->handle = NULL; |