After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320357 - element_query_duration not wrapped
element_query_duration not wrapped
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other All
: Normal normal
: 0.9.5
Assigned To: GStreamer Maintainers
Johan (not receiving bugmail) Dahlin
Depends on:
Blocks:
 
 
Reported: 2005-10-31 22:33 UTC by Jason Kivlighn
Modified: 2005-11-01 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Wraps the needed functions (2.43 KB, patch)
2005-10-31 22:34 UTC, Jason Kivlighn
none Details | Review

Description Jason Kivlighn 2005-10-31 22:33:21 UTC
Please describe the problem:


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Jason Kivlighn 2005-10-31 22:34:06 UTC
Created attachment 54163 [details] [review]
Wraps the needed functions
Comment 2 Johan (not receiving bugmail) Dahlin 2005-11-01 17:29:54 UTC
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
Comment 3 Edward Hervey 2005-11-01 18:19:35 UTC
fixed in cvs, closing bug