mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
thread block/unblock in callback functions indentation update
Original commit message from CVS: thread block/unblock in callback functions indentation update
This commit is contained in:
parent
b807857c46
commit
0b94dd64f0
3 changed files with 103 additions and 70 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-12-21 David I. Lehn <dlehn@users.sourceforge.net>
|
||||
|
||||
* gstreamer/gstreamer.override (call_connect_function,
|
||||
call_chain_function): block/unblock threads before entering Python
|
||||
interpreter
|
||||
* gstreamer/gstreamer.override: indent
|
||||
|
||||
2002-12-17 David I. Lehn <dlehn@users.sourceforge.net>
|
||||
|
||||
* gstreamer/gstreamer.override: add wrapper for gst_element_set_state
|
||||
|
|
|
@ -75,9 +75,12 @@ call_connect_function (GstPad *pad, GstCaps *caps)
|
|||
{
|
||||
PyObject *function;
|
||||
PyObject *retval;
|
||||
GstPadConnectReturn ret;
|
||||
|
||||
function = pad_private(pad)->connect_function;
|
||||
|
||||
pyg_block_threads();
|
||||
|
||||
retval = (PyObject*)PyObject_CallFunction (function,
|
||||
"OO",
|
||||
pad_private(pad)->pad,
|
||||
|
@ -85,10 +88,15 @@ call_connect_function (GstPad *pad, GstCaps *caps)
|
|||
|
||||
if (PyErr_Occurred ()) {
|
||||
PyErr_Print ();
|
||||
pyg_unblock_threads();
|
||||
return GST_PAD_CONNECT_REFUSED;
|
||||
}
|
||||
|
||||
return PyInt_AsLong(retval);
|
||||
ret = PyInt_AsLong(retval);
|
||||
|
||||
pyg_unblock_threads();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
|
@ -130,6 +138,8 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
|
|||
|
||||
function = pad_private(pad)->chain_function;
|
||||
|
||||
pyg_block_threads();
|
||||
|
||||
PyObject_CallFunction (function,
|
||||
"OO",
|
||||
pad_private(pad)->pad,
|
||||
|
@ -137,8 +147,11 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
|
|||
|
||||
if (PyErr_Occurred ()) {
|
||||
PyErr_Print ();
|
||||
pyg_unblock_threads();
|
||||
return;
|
||||
}
|
||||
|
||||
pyg_unblock_threads();
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
|
|
|
@ -75,9 +75,12 @@ call_connect_function (GstPad *pad, GstCaps *caps)
|
|||
{
|
||||
PyObject *function;
|
||||
PyObject *retval;
|
||||
GstPadConnectReturn ret;
|
||||
|
||||
function = pad_private(pad)->connect_function;
|
||||
|
||||
pyg_block_threads();
|
||||
|
||||
retval = (PyObject*)PyObject_CallFunction (function,
|
||||
"OO",
|
||||
pad_private(pad)->pad,
|
||||
|
@ -85,10 +88,15 @@ call_connect_function (GstPad *pad, GstCaps *caps)
|
|||
|
||||
if (PyErr_Occurred ()) {
|
||||
PyErr_Print ();
|
||||
pyg_unblock_threads();
|
||||
return GST_PAD_CONNECT_REFUSED;
|
||||
}
|
||||
|
||||
return PyInt_AsLong(retval);
|
||||
ret = PyInt_AsLong(retval);
|
||||
|
||||
pyg_unblock_threads();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
|
@ -130,6 +138,8 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
|
|||
|
||||
function = pad_private(pad)->chain_function;
|
||||
|
||||
pyg_block_threads();
|
||||
|
||||
PyObject_CallFunction (function,
|
||||
"OO",
|
||||
pad_private(pad)->pad,
|
||||
|
@ -137,8 +147,11 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
|
|||
|
||||
if (PyErr_Occurred ()) {
|
||||
PyErr_Print ();
|
||||
pyg_unblock_threads();
|
||||
return;
|
||||
}
|
||||
|
||||
pyg_unblock_threads();
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
|
|
Loading…
Reference in a new issue