List Info

Thread: ensonic gstreamer: gstreamer/ gstreamer/gst/ gstreamer/plugins/elements/




ensonic gstreamer: gstreamer/ gstreamer/gst/ gstreamer/plugins/elements/
user name
2006-04-28 19:46:40
On Fri, 2006-04-28 at 18:55 +0000, Stefan Kost wrote:

Hi Stefan,

> Log message:
> * plugins/elements/gsttypefindelement.c:
> (gst_type_find_element_handle_event):
> make GstElementDetails const

  ...

> diff -u -d -r1.78 -r1.79
> --- gsttypefindelement.c	28 Apr 2006 13:43:03
-0000	1.78
> +++ gsttypefindelement.c	28 Apr 2006 18:55:17
-0000	1.79
>  -63,7 +63,7 
>  GST_DEBUG_CATEGORY_STATIC
(gst_type_find_element_debug);
>  #define GST_CAT_DEFAULT gst_type_find_element_debug
> -static GstElementDetails gst_type_find_element_details
=
> +static const GstElementDetails
gst_type_find_element_details =
>  GST_ELEMENT_DETAILS ("TypeFind",
>      "Finds the media type of a stream",
>  -476,16 +476,17 
>            if (typefind->store) {
>              caps = gst_type_find_helper_for_buffer
(GST_OBJECT (typefind),
>                  typefind->store, &prob);
> -          }
> -          if (caps && prob >=
typefind->min_probability) {
> -            g_signal_emit (typefind,
gst_type_find_element_signals[HAVE_TYPE],
> -                0, prob, caps);
> -          } else {
> -            GST_ELEMENT_ERROR (typefind, STREAM,
TYPE_NOT_FOUND,
> -                (NULL), (NULL));
> +            if (caps && prob >=
typefind->min_probability) {
> +              g_signal_emit (typefind,
gst_type_find_element_signals[HAVE_TYPE],
> +                  0, prob, caps);
> +            } else {
> +              GST_ELEMENT_ERROR (typefind, STREAM,
TYPE_NOT_FOUND,
> +                  (NULL), (NULL));
> +            }
> +            gst_caps_replace (&caps, NULL);
>            }
> -          gst_caps_replace (&caps, NULL);
>            stop_typefinding (typefind);
>            res = gst_pad_event_default (pad, event);
>            break;
> 

The last change isn't mentioned in the ChangeLog - did you
really mean
to commit that?

(I hope not, because it doesn't seem entirely correct, as
with it
typefind won't throw a TYPE_NOT_FOUND error message any
longer when an
EOS is received but no data has been received so far. Mike
has already
fixed the issue of initializing caps to NULL here earlier in
case your
fix was supposed to be for the same issue).

Cheers
 -Tim




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
ensonic gstreamer: gstreamer/ gstreamer/gst/ gstreamer/plugins/elements/
user name
2006-04-28 22:47:34
hi tim,

oh yes, this was found by the coverty checker. Mike and I
fixed the same
issues. I've changed it back. Still this looks confusing,
as with this
way we kindof know that if(!typefind->store) we need to
do the
GST_ELEMENT_ERROR anyway. I reflowed the section to make it
a bit more
obvious.

Stefan

Am Freitag, den 28.04.2006, 20:46 +0100 schrieb Tim Müller:
> On Fri, 2006-04-28 at 18:55 +0000, Stefan Kost wrote:
> 
> Hi Stefan,
> 
> > Log message:
> > * plugins/elements/gsttypefindelement.c:
> > (gst_type_find_element_handle_event):
> > make GstElementDetails const
> 
>   ...
> 
> > diff -u -d -r1.78 -r1.79
> > --- gsttypefindelement.c	28 Apr 2006 13:43:03
-0000	1.78
> > +++ gsttypefindelement.c	28 Apr 2006 18:55:17
-0000	1.79
> >  -63,7 +63,7 
> >  GST_DEBUG_CATEGORY_STATIC
(gst_type_find_element_debug);
> >  #define GST_CAT_DEFAULT
gst_type_find_element_debug
> > -static GstElementDetails
gst_type_find_element_details =
> > +static const GstElementDetails
gst_type_find_element_details =
> >  GST_ELEMENT_DETAILS ("TypeFind",
> >      "Finds the media type of a
stream",
> >  -476,16 +476,17 
> >            if (typefind->store) {
> >              caps =
gst_type_find_helper_for_buffer (GST_OBJECT (typefind),
> >                  typefind->store, &prob);
> > -          }
> > -          if (caps && prob >=
typefind->min_probability) {
> > -            g_signal_emit (typefind,
gst_type_find_element_signals[HAVE_TYPE],
> > -                0, prob, caps);
> > -          } else {
> > -            GST_ELEMENT_ERROR (typefind, STREAM,
TYPE_NOT_FOUND,
> > -                (NULL), (NULL));
> > +            if (caps && prob >=
typefind->min_probability) {
> > +              g_signal_emit (typefind,
gst_type_find_element_signals[HAVE_TYPE],
> > +                  0, prob, caps);
> > +            } else {
> > +              GST_ELEMENT_ERROR (typefind,
STREAM, TYPE_NOT_FOUND,
> > +                  (NULL), (NULL));
> > +            }
> > +            gst_caps_replace (&caps, NULL);
> >            }
> > -          gst_caps_replace (&caps, NULL);
> >            stop_typefinding (typefind);
> >            res = gst_pad_event_default (pad,
event);
> >            break;
> > 
> 
> The last change isn't mentioned in the ChangeLog - did
you really mean
> to commit that?
> 
> (I hope not, because it doesn't seem entirely correct,
as with it
> typefind won't throw a TYPE_NOT_FOUND error message
any longer when an
> EOS is received but no data has been received so far.
Mike has already
> fixed the issue of initializing caps to NULL here
earlier in case your
> fix was supposed to be for the same issue).
> 
> Cheers
>  -Tim
> 
> 
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web
services, security?
> Get stuff done quickly with pre-integrated technology
to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based
on Apache Geronimo
> http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devellists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstream
er-devel



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )