mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
add wrapper for gst_element_set_state to unlock GIT
Original commit message from CVS: add wrapper for gst_element_set_state to unlock GIT
This commit is contained in:
parent
e1840c9e98
commit
f33a05d101
3 changed files with 43 additions and 3 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 1ca7d9a20180cab830f4383cde5ba932338e50b1
|
||||
Subproject commit 79e6940e7ff1a6cbf959a1f7a0a3d1ed3f90d3ee
|
|
@ -17,7 +17,7 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: David I. Lehn <dlehn@vt.edu>
|
||||
* Author: David I. Lehn <dlehn@users.sourceforge.net>
|
||||
*/
|
||||
%%
|
||||
headers
|
||||
|
@ -229,3 +229,23 @@ _wrap_gst_bin_iterate(PyGObject *self)
|
|||
pyg_block_threads();
|
||||
return PyInt_FromLong(ret);
|
||||
}
|
||||
%%
|
||||
override gst_element_set_state kwargs
|
||||
|
||||
static PyObject *
|
||||
_wrap_gst_element_set_state(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
static char *kwlist[] = { "state", NULL };
|
||||
PyObject *py_state = NULL;
|
||||
GstElementState state;
|
||||
gint ret;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GstElement.set_state", kwlist, &py_state))
|
||||
return NULL;
|
||||
if (pyg_flags_get_value(GST_TYPE_ELEMENT_STATE, py_state, (gint *)&state))
|
||||
return NULL;
|
||||
pyg_unblock_threads();
|
||||
ret = gst_element_set_state(GST_ELEMENT(self->obj), state);
|
||||
pyg_block_threads();
|
||||
return PyInt_FromLong(ret);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: David I. Lehn <dlehn@vt.edu>
|
||||
* Author: David I. Lehn <dlehn@users.sourceforge.net>
|
||||
*/
|
||||
%%
|
||||
headers
|
||||
|
@ -229,3 +229,23 @@ _wrap_gst_bin_iterate(PyGObject *self)
|
|||
pyg_block_threads();
|
||||
return PyInt_FromLong(ret);
|
||||
}
|
||||
%%
|
||||
override gst_element_set_state kwargs
|
||||
|
||||
static PyObject *
|
||||
_wrap_gst_element_set_state(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
static char *kwlist[] = { "state", NULL };
|
||||
PyObject *py_state = NULL;
|
||||
GstElementState state;
|
||||
gint ret;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GstElement.set_state", kwlist, &py_state))
|
||||
return NULL;
|
||||
if (pyg_flags_get_value(GST_TYPE_ELEMENT_STATE, py_state, (gint *)&state))
|
||||
return NULL;
|
||||
pyg_unblock_threads();
|
||||
ret = gst_element_set_state(GST_ELEMENT(self->obj), state);
|
||||
pyg_block_threads();
|
||||
return PyInt_FromLong(ret);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue