[gstreamer-bugs] [Bug 320357] element_query_duration not wrapped
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Nov 1 09:29:55 PST 2005
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=320357
GStreamer | gst-python | Ver: HEAD CVS
------- Additional Comments From Johan Dahlin 2005-11-01 17:29 -------
(From update of attachment 54163)
>Index: gst/gstelement.override
> %%
>+override gst_element_query_duration args
>+static PyObject *
>+_wrap_gst_element_query_duration (PyGObject *self, PyObject *args)
>+{
[..]
>+ ret = PyList_New(0);
The length of the list is always constant, set it to two...
>+ if (!(gst_element_query_duration(GST_ELEMENT (self->obj), (GstFormat*) &format, &cur))) {
>+ PyErr_Format(PyGstExc_QueryError,
>+ "query failed");
>+ return NULL;
>+ }
>+ PyList_Append(ret, PyLong_FromLongLong(cur));
>+ PyList_Append(ret, pyg_enum_from_gtype (GST_TYPE_FORMAT, format ));
And use PyList_SetItem 0/1 here.
You also got the argument in the wrong order, format should come before cur.
>Index: gst/gstquery.override
> %%
>+override gst_query_parse_duration noargs
>+static PyObject *
>+_wrap_gst_query_parse_duration (PyGstMiniObject *self)
This part looks good, apart from inconsistent indentation
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list