Commit 3b20dd08 authored by Edward Hervey's avatar Edward Hervey 🤘

gst/gstcaps.override: Override gst_caps_append_structure() and make a copy of...

gst/gstcaps.override: Override gst_caps_append_structure() and make a copy of the structure given as argument.

Original commit message from CVS:
* gst/gstcaps.override:
Override gst_caps_append_structure() and make a copy of the structure
given as argument.
Fixes #549450
parent d17feec2
2008-08-26 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/gstcaps.override:
Override gst_caps_append_structure() and make a copy of the structure
given as argument.
Fixes #549450
2008-08-11 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/gst-0.10.15.ignore:
......
common @ 8d494854
Subproject commit d70ca17ae6fbe6020996e4567275d5e14972ed45
Subproject commit 8d494854a6018336a80ece82ceb3df0033e2da9c
......@@ -451,3 +451,26 @@ _wrap_gst_caps__get___refcount__(PyGObject *self, void *closure)
return PyInt_FromLong(GST_CAPS_REFCOUNT(self->obj));
}
%%
override gst_caps_append_structure kwargs
static PyObject *
_wrap_gst_caps_append_structure(PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "structure", NULL };
PyObject *py_structure;
GstStructure *structure = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:GstCaps.append_structure", kwlist, &py_structure))
return NULL;
if (pyg_boxed_check(py_structure, GST_TYPE_STRUCTURE))
structure = gst_structure_copy(pyg_boxed_get(py_structure, GstStructure));
else {
PyErr_SetString(PyExc_TypeError, "structure should be a GstStructure");
return NULL;
}
pyg_begin_allow_threads;
gst_caps_append_structure(pyg_boxed_get(self, GstCaps), structure);
pyg_end_allow_threads;
Py_INCREF(Py_None);
return Py_None;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment