gstreamer/common.override: Attempt to handle GstBuffer vs GstData better

Original commit message from CVS:
* gstreamer/common.override:
Attempt to handle GstBuffer vs GstData better
This commit is contained in:
David I. Lehn 2004-02-24 18:47:32 +00:00
parent ad4e6fd770
commit f44fd3f602
3 changed files with 29 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2004-02-24 David I. Lehn <dlehn@users.sourceforge.net>
* gstreamer/common.override:
Attempt to handle GstBuffer vs GstData better
2004-02-24 Johan Dahlin <johan@gnome.org>
* gstreamer/gstreamer.defs: rename all functions, remove

View file

@ -132,7 +132,7 @@ _wrap_gst_pad_set_link_function (PyGObject *self,
override gst_pad_set_chain_function kwargs
static void
call_chain_function(GstPad *pad, GstBuffer *buf)
call_chain_function(GstPad *pad, GstData *data)
{
PyObject *function;
@ -140,10 +140,17 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
pyg_block_threads();
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_BUFFER, buf, TRUE, TRUE));
if (GST_IS_BUFFER(data)) {
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_BUFFER, data, TRUE, TRUE));
} else if (GST_IS_EVENT(data)) {
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_EVENT, data, TRUE, TRUE));
}
if (PyErr_Occurred ()) {
PyErr_Print ();

View file

@ -132,7 +132,7 @@ _wrap_gst_pad_set_link_function (PyGObject *self,
override gst_pad_set_chain_function kwargs
static void
call_chain_function(GstPad *pad, GstBuffer *buf)
call_chain_function(GstPad *pad, GstData *data)
{
PyObject *function;
@ -140,10 +140,17 @@ call_chain_function(GstPad *pad, GstBuffer *buf)
pyg_block_threads();
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_BUFFER, buf, TRUE, TRUE));
if (GST_IS_BUFFER(data)) {
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_BUFFER, data, TRUE, TRUE));
} else if (GST_IS_EVENT(data)) {
PyObject_CallFunction (function,
"OO",
pad_private(pad)->pad,
pyg_boxed_new(GST_TYPE_EVENT, data, TRUE, TRUE));
}
if (PyErr_Occurred ()) {
PyErr_Print ();