gst/gst.defs: Update for probe removal api gst/gstpad.override (_wrap_gst_pad_remove_data_probe) (_wrap_gst_pad_remov...

Original commit message from CVS:
2005-09-21  Andy Wingo  <wingo@pobox.com>

* gst/gst.defs: Update for probe removal api

* gst/gstpad.override (_wrap_gst_pad_remove_data_probe)
(_wrap_gst_pad_remove_event_probe)
(_wrap_gst_pad_remove_buffer_probe): Removed, upstream does the
right thing now.
(_wrap_gst_pad_add_data_probe, _wrap_gst_pad_add_event_probe)
(_wrap_gst_pad_add_buffer_probe): Indent.
This commit is contained in:
Andy Wingo 2005-09-21 13:36:45 +00:00
parent 4a13efde8d
commit 14856cf85c
3 changed files with 32 additions and 103 deletions

View file

@ -1,3 +1,14 @@
2005-09-21 Andy Wingo <wingo@pobox.com>
* gst/gst.defs: Update for probe removal api
* gst/gstpad.override (_wrap_gst_pad_remove_data_probe)
(_wrap_gst_pad_remove_event_probe)
(_wrap_gst_pad_remove_buffer_probe): Removed, upstream does the
right thing now.
(_wrap_gst_pad_add_data_probe, _wrap_gst_pad_add_event_probe)
(_wrap_gst_pad_add_buffer_probe): Indent.
2005-09-20 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gst.defs:

View file

@ -3497,8 +3497,7 @@
(c-name "gst_pad_remove_data_probe")
(return-type "none")
(parameters
'("GCallback" "handler")
'("gpointer" "data")
'("guint" "handler_id")
)
)
@ -3517,8 +3516,7 @@
(c-name "gst_pad_remove_event_probe")
(return-type "none")
(parameters
'("GCallback" "handler")
'("gpointer" "data")
'("guint" "handler_id")
)
)
@ -3537,8 +3535,7 @@
(c-name "gst_pad_remove_buffer_probe")
(return-type "none")
(parameters
'("GCallback" "handler")
'("gpointer" "data")
'("guint" "handler_id")
)
)

View file

@ -598,20 +598,20 @@ _wrap_gst_pad_add_data_probe(PyGObject *self, PyObject *args)
len = PyTuple_Size(args);
if (len < 1) {
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
}
callback = PySequence_GetItem(args, 0);
if (!PyCallable_Check(callback)) {
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
}
cbargs = PySequence_GetSlice(args, 1, len);
if (cbargs == NULL)
return NULL;
return NULL;
data = Py_BuildValue("(ON)", callback, cbargs);
if (data == NULL)
return NULL;
return NULL;
sigid = gst_pad_add_data_probe (GST_PAD (self->obj), (GCallback) probe_handler_marshal, data);
return PyLong_FromUnsignedLong(sigid);
@ -628,20 +628,20 @@ _wrap_gst_pad_add_event_probe(PyGObject *self, PyObject *args)
len = PyTuple_Size(args);
if (len < 1) {
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
}
callback = PySequence_GetItem(args, 0);
if (!PyCallable_Check(callback)) {
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
}
cbargs = PySequence_GetSlice(args, 1, len);
if (cbargs == NULL)
return NULL;
return NULL;
data = Py_BuildValue("(ON)", callback, cbargs);
if (data == NULL)
return NULL;
return NULL;
sigid = gst_pad_add_event_probe (GST_PAD (self->obj), (GCallback) probe_handler_marshal, data);
return PyLong_FromUnsignedLong(sigid);
@ -658,104 +658,25 @@ _wrap_gst_pad_add_buffer_probe(PyGObject *self, PyObject *args)
len = PyTuple_Size(args);
if (len < 1) {
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
PyErr_SetString(PyExc_TypeError, "Probe requires at least 1 arg");
return NULL;
}
callback = PySequence_GetItem(args, 0);
if (!PyCallable_Check(callback)) {
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
PyErr_SetString(PyExc_TypeError, "callback is not callable");
return NULL;
}
cbargs = PySequence_GetSlice(args, 1, len);
if (cbargs == NULL)
return NULL;
return NULL;
data = Py_BuildValue("(ON)", callback, cbargs);
if (data == NULL)
return NULL;
return NULL;
sigid = gst_pad_add_buffer_probe (GST_PAD (self->obj), (GCallback) probe_handler_marshal, data);
return PyLong_FromUnsignedLong(sigid);
}
%%
override gst_pad_remove_data_probe kwargs
static PyObject *
_wrap_gst_pad_remove_data_probe(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "signalid", NULL };
gulong signalid;
GstPad *pad = GST_PAD (self->obj);
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"k:GstPad.remove_data_probe",
kwlist, &signalid))
return NULL;
GST_LOCK (pad);
if (!g_signal_handler_is_connected ((gpointer) pad, signalid)) {
GST_UNLOCK (pad);
Py_INCREF (Py_False);
return Py_False;
}
g_signal_handler_disconnect ((gpointer) pad, signalid);
GST_PAD_DO_BUFFER_SIGNALS (pad) -= 1;
GST_PAD_DO_EVENT_SIGNALS (pad) -= 1;
GST_UNLOCK (pad);
Py_INCREF (Py_True);
return Py_True;
}
%%
override gst_pad_remove_event_probe kwargs
static PyObject *
_wrap_gst_pad_remove_event_probe(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "signalid", NULL };
gulong signalid;
GstPad *pad = GST_PAD (self->obj);
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"k:GstPad.remove_event_probe",
kwlist, &signalid))
return NULL;
GST_LOCK (pad);
if (!g_signal_handler_is_connected ((gpointer) pad, signalid)) {
GST_UNLOCK (pad);
Py_INCREF (Py_False);
return Py_False;
}
g_signal_handler_disconnect ((gpointer) pad, signalid);
GST_PAD_DO_EVENT_SIGNALS (pad) -= 1;
GST_UNLOCK (pad);
Py_INCREF (Py_True);
return Py_True;
}
%%
override gst_pad_remove_buffer_probe kwargs
static PyObject *
_wrap_gst_pad_remove_buffer_probe(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "signalid", NULL };
gulong signalid;
GstPad *pad = GST_PAD (self->obj);
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"k:GstPad.remove_buffer_probe",
kwlist, &signalid))
return NULL;
GST_LOCK (pad);
if (!g_signal_handler_is_connected ((gpointer) pad, signalid)) {
GST_UNLOCK (pad);
Py_INCREF (Py_False);
return Py_False;
}
g_signal_handler_disconnect ((gpointer) pad, signalid);
GST_PAD_DO_BUFFER_SIGNALS (pad) -= 1;
GST_UNLOCK (pad);
Py_INCREF (Py_True);
return Py_True;
}
%%
override-slot GstPadTemplate.tp_getattr
#define IS_ATTR(name) (strcmp (name, attr) == 0)
PyObject *