[gst-devel] Re: thomasvs gstreamer: gstreamer/ gstreamer/docs/gst/tmpl/ gstreamer/gst/

Benjamin Otte otte at gnome.org
Wed Feb 25 10:23:17 CET 2004


I don't think this commit is correct. A bin that doesn't have an add_element 
function is a programming error and should be signalled as such.
The correct way to signal it would be via g_return_if_fail (bin_class-
>add_element) I think.

Benjamin



Thomas Vander Stichele <thomasvs <at> pdx.freedesktop.org> writes:

> 
> CVS Root:       /cvs/gstreamer
> Module:         gstreamer
> Changes by:     thomasvs
> Date:           Tue Feb 24 2004  04:41:31 PST
> 
> Log message:
> adding error to gstbin.c
> 
> Modified files:
>     .               : ChangeLog
>     docs/gst/tmpl   : gstxml.sgml
>     gst             : gstbin.c
> 
> Links:
> http://freedesktop.org/cgi-
bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.265&r2=1.266
> http://freedesktop.org/cgi-
bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/tmpl/gstxml.sgml.diff?
r1=1.43&r2=1.44
> http://freedesktop.org/cgi-
bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbin.c.diff?r1=1.173&r2=1.174
> 
> ====Begin Diffs====
> Index: gstbin.c
> RCS file: /cvs/gstreamer/gstreamer/gst/gstbin.c,v
> retrieving revision 1.173
> retrieving revision 1.174
> diff -u -d -r1.173 -r1.174
> --- a/gstbin.c	20 Feb 2004 13:18:31 -0000	1.173
> +++ b/gstbin.c	24 Feb 2004 12:41:19 -0000	1.174
>  <at>  <at>  -28,6 +28,7  <at>  <at> 
>  #include "gstmarshal.h"
>  #include "gstxml.h"
>  #include "gstinfo.h"
> +#include "gsterror.h"
>  #include "gstscheduler.h"
>  #include "gstindex.h"
>  <at>  <at>  -495,7 +496,9  <at>  <at> 
>      bclass->add_element (bin, element);
>    }
>    else {
> -    g_warning ("cannot add elements to bin %s\n", GST_ELEMENT_NAME (bin));
> +    GST_ELEMENT_ERROR (bin, CORE, FAILED, (NULL),
> +                       ("cannot add element %s to bin %s",
> +	                GST_ELEMENT_NAME (element), GST_ELEMENT_NAME (bin)));
>  }




More information about the gstreamer-devel mailing list