mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
d17feec22d
commit
3b20dd082d
3 changed files with 31 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
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:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue