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

Johan Dahlin jdahlin at async.com.br
Mon Jul 3 13:02:05 CEST 2006


> +++ 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




More information about the gstreamer-devel mailing list