From: <bi...@ke...> - 2006-03-10 11:22:45
|
CVS Root: /cvs/gstreamer Module: gst-python Changes by: bilboed Date: Fri Mar 10 2006 11:22:43 UTC Log message: * gst/base.defs: typo fix for gst_type_find_helper() Added new API : gst_type_find_helper_for_buffer() * gst/gst.override: override for gst.type_find_helper_for_buffer() Modified files: . : ChangeLog gst : base.defs gst.override Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.418&r2=1.419 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/base.defs.diff?r1=1.4&r2=1.5 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/gst.override.diff?r1=1.97&r2=1.98 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-python/ChangeLog,v retrieving revision 1.418 retrieving revision 1.419 diff -u -d -r1.418 -r1.419 --- ChangeLog 10 Mar 2006 10:54:40 -0000 1.418 +++ ChangeLog 10 Mar 2006 11:22:31 -0000 1.419 @@ -1,5 +1,13 @@ 2006-03-10 Edward Hervey <ed...@fl...> + * gst/base.defs: + typo fix for gst_type_find_helper() + Added new API : gst_type_find_helper_for_buffer() + * gst/gst.override: + override for gst.type_find_helper_for_buffer() + +2006-03-10 Edward Hervey <ed...@fl...> * gst/gst-types.defs: * gst/gst.defs: Added new API: Index: base.defs RCS file: /cvs/gstreamer/gst-python/gst/base.defs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- base.defs 7 Mar 2006 19:08:43 -0000 1.4 +++ base.defs 10 Mar 2006 11:22:31 -0000 1.5 @@ -613,7 +613,7 @@ ;; From ../gstreamer/libs/gst/base/gsttypefindhelper.h -(define-function gst_type_find_helper +(define-function type_find_helper (c-name "gst_type_find_helper") (return-type "GstCaps*") (parameters @@ -622,4 +622,12 @@ ) ) - +(define-function type_find_helper_for_buffer + (c-name "gst_type_find_helper_for_buffer") + (return-type "GstCaps*") + (parameters + '("GstObject*" "obj") + '("GstBuffer*" "buf") + '("GstTypeFindProbability*" "prob") + ) +) Index: gst.override RCS file: /cvs/gstreamer/gst-python/gst/gst.override,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- gst.override 7 Feb 2006 18:54:52 -0000 1.97 +++ gst.override 10 Mar 2006 11:22:31 -0000 1.98 @@ -180,6 +180,8 @@ { PyObject *templates, *details; + GST_DEBUG ("gclass %p", gclass); templates = PyDict_GetItemString(pyclass->tp_dict, "__gsttemplates__"); if (templates) { if (add_templates(gclass, templates) != 0) @@ -246,6 +248,7 @@ gststructure.override gsttaglist.override gstlibs.override + gstbase.override %% init @@ -347,14 +350,6 @@ return pyg_boxed_new(GST_TYPE_CAPS, ret, TRUE, TRUE); } -override gst_type_find_factory_get_caps noargs -static PyObject * -_wrap_gst_type_find_factory_get_caps(PyGObject *self) -{ - GstCaps *ret = (GstCaps*)gst_type_find_factory_get_caps(GST_TYPE_FIND_FACTORY(self->obj)); - return pyg_boxed_new(GST_TYPE_CAPS, ret, TRUE, TRUE); -} -%% override-attr GError.domain static PyObject * _wrap_gst_g_error__get_domain(PyGObject *self, void *closure) @@ -646,7 +641,6 @@ /* pyg_boxed_new handles NULL checking */ return pyg_boxed_new(GST_TYPE_TAG_LIST, ret, TRUE, TRUE); override gst_element_register kwargs @@ -922,3 +916,40 @@ return ret; +%% +override gst_type_find_helper_for_buffer kwargs +static PyObject * +_wrap_gst_type_find_helper_for_buffer (PyObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "object", "buffer", NULL }; + PyGObject *py_object; + PyGstMiniObject *py_buffer; + PyObject *py_ret; + GstTypeFindProbability prob = 0; + GstCaps *caps = NULL; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!:type_find_helper_for_buffer", + kwlist, &PyGstObject_Type, &py_object, + &PyGstBuffer_Type, &py_buffer)) + return NULL; + + caps = gst_type_find_helper_for_buffer (GST_OBJECT (py_object->obj), + GST_BUFFER (py_buffer->obj), + &prob); + py_ret = PyTuple_New(2); + if (caps) + PyTuple_SetItem(py_ret, 0, pyg_boxed_new (GST_TYPE_CAPS, caps, FALSE, TRUE)); + else { + Py_INCREF(Py_None); + PyTuple_SetItem(py_ret, 0, Py_None); + } + if (prob) + PyTuple_SetItem(py_ret, 1, pyg_enum_from_gtype(GST_TYPE_TYPE_FIND_PROBABILITY, prob)); + PyTuple_SetItem(py_ret, 1, Py_None); + return py_ret; +} |