From: David I. L. <dl...@pd...> - 2004-02-24 18:48:35
|
CVS Root: /cvs/gstreamer Module: gst-python Changes by: dlehn Date: Tue Feb 24 2004 10:47:44 PST Log message: * gstreamer/common.override: Attempt to handle GstBuffer vs GstData better Modified files: . : ChangeLog gstreamer : common.override Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.52&r2=1.53 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/common.override.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-python/ChangeLog,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- a/ChangeLog 24 Feb 2004 18:40:20 -0000 1.52 +++ b/ChangeLog 24 Feb 2004 18:47:32 -0000 1.53 @@ -1,3 +1,8 @@ +2004-02-24 David I. Lehn <dl...@us...> + + * gstreamer/common.override: + Attempt to handle GstBuffer vs GstData better 2004-02-24 Johan Dahlin <jo...@gn...> * gstreamer/gstreamer.defs: rename all functions, remove Index: common.override RCS file: /cvs/gstreamer/gst-python/gstreamer/common.override,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- a/common.override 23 Feb 2004 20:24:53 -0000 1.5 +++ b/common.override 24 Feb 2004 18:47:32 -0000 1.6 @@ -132,7 +132,7 @@ 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 @@ 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)) { + pyg_boxed_new(GST_TYPE_EVENT, data, TRUE, TRUE)); + } if (PyErr_Occurred ()) { PyErr_Print (); |