GNOME Bugzilla – Bug 320357
element_query_duration not wrapped
Last modified: 2005-11-01 18:19:35 UTC
Please describe the problem: Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 54163 [details] [review] Wraps the needed functions
Comment on attachment 54163 [details] [review] Wraps the needed functions >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
fixed in cvs, closing bug