[gst-devel] bilboed gst-python: gst-python/ gst-python/gst/ gst-python/testsuite/

Edward Hervey bilboed at gmail.com
Mon Jul 3 14:08:48 CEST 2006


Johan,

  This is the last time I'm commiting a patch from you without a unit
test that goes with it. I trusted a pygtk maintainer to actually not
propose random garbage.

  Edward

On 7/3/06, Johan Dahlin <jdahlin at async.com.br> wrote:
> > +++ gstelement.override       3 Jul 2006 09:01:18 -0000       1.32
>
> > -    ret = PyList_New(2);
> > -    PyList_SetItem(ret, 0, PyLong_FromLongLong(cur));
> > -    PyList_SetItem(ret, 1, pyg_enum_from_gtype (GST_TYPE_FORMAT, format ));
> > -
> > -    return ret;
> > +    return Py_BuildValue("(OO)",
> > +                      PyLong_FromLongLong(cur),
> > +                      pyg_enum_from_gtype(GST_TYPE_FORMAT, format));
>
> (LO) ?
>
> > Index: gstquery.override
>
> >       gst_query_parse_position (GST_QUERY(self->obj), &format, &cur);
> > -     ret = PyList_New(2);
> > -     PyList_SetItem(ret, 0, pyg_enum_from_gtype(GST_TYPE_FORMAT, format));
> > -     PyList_SetItem(ret, 1, PyLong_FromLongLong(cur));
> > +     return Py_BuildValue("(LO)", cur,
> > +                          pyg_enum_from_gtype (GST_TYPE_FORMAT, format));
>
> You swapped the order.
>
> >  override gst_query_parse_seeking noargs
>
> > -     PyList_SetItem (ret, 0, pyg_enum_from_gtype (GST_TYPE_FORMAT, format));
> > -     PyList_SetItem (ret, 1, PyBool_FromLong (seekable));
> > -     PyList_SetItem (ret, 2, PyLong_FromLongLong(segment_start));
> > -     PyList_SetItem (ret, 3, PyLong_FromLongLong(segment_end));
> > +     return Py_BuildValue("(OLKK)",
> > +                          seekable,
> > +                          segment_start,
> > +                          segment_end);
>
> What happened to the first argument, the enum?
>
> This part of the code should really be tested better...
>
> Johan
>


-- 
Edward Hervey
Junior developer / Fluendo S.L.
http://www.pitivi.org/




More information about the gstreamer-devel mailing list