mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
gst/gstelement.override (_wrap_gst_element_get_state): Set the timeout to 0 as default
Original commit message from CVS: * gst/gstelement.override (_wrap_gst_element_get_state): Set the timeout to 0 as default
This commit is contained in:
parent
2d13103ff7
commit
e07e65d842
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-09-28 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/gstelement.override (_wrap_gst_element_get_state): Set the
|
||||||
|
timeout to 0 as default
|
||||||
|
|
||||||
2005-09-28 Edward Hervey <edward@fluendo.com>
|
2005-09-28 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gst.defs:
|
* gst/gst.defs:
|
||||||
|
|
|
@ -81,13 +81,13 @@ _wrap_gst_element_get_state(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||||
GstState state;
|
GstState state;
|
||||||
GstState pending;
|
GstState pending;
|
||||||
GstStateChangeReturn ret;
|
GstStateChangeReturn ret;
|
||||||
PyObject *timeout;
|
PyObject *timeout = Py_None;
|
||||||
GTimeVal *timevalp = NULL;
|
GTimeVal *timevalp = NULL;
|
||||||
GTimeVal timeval;
|
GTimeVal timeval;
|
||||||
PyObject *tuple;
|
PyObject *tuple;
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||||
"O:GstElement.get_state", kwlist,
|
"|O:GstElement.get_state", kwlist,
|
||||||
&timeout)) {
|
&timeout)) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Timeout not specified correctly");
|
PyErr_SetString(PyExc_RuntimeError, "Timeout not specified correctly");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -105,6 +105,8 @@ _wrap_gst_element_get_state(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||||
timeval.tv_usec = (glong) ((timeoutd - (gdouble) timeval.tv_sec)
|
timeval.tv_usec = (glong) ((timeoutd - (gdouble) timeval.tv_sec)
|
||||||
* 1000.0 * 1000.0);
|
* 1000.0 * 1000.0);
|
||||||
timevalp = &timeval;
|
timevalp = &timeval;
|
||||||
|
} else {
|
||||||
|
GST_TIME_TO_TIMEVAL (0, timeval);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = gst_element_get_state(GST_ELEMENT (self->obj), &state, &pending,
|
ret = gst_element_get_state(GST_ELEMENT (self->obj), &state, &pending,
|
||||||
|
|
Loading…
Reference in a new issue