mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 21:01:14 +00:00
gst/gsttaglist.override: put the gst.TagList.keys() method back.
Original commit message from CVS: * gst/gsttaglist.override: put the gst.TagList.keys() method back.
This commit is contained in:
parent
e3beb3ed78
commit
3076c7c22e
2 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-10 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gsttaglist.override:
|
||||||
|
put the gst.TagList.keys() method back.
|
||||||
|
|
||||||
2005-11-10 Edward Hervey <edward@fluendo.com>
|
2005-11-10 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gstmodule.c: (init_gst):
|
* gst/gstmodule.c: (init_gst):
|
||||||
|
|
|
@ -33,6 +33,34 @@ ignore
|
||||||
gst_tag_list_remove_tag
|
gst_tag_list_remove_tag
|
||||||
gst_tag_list_foreach
|
gst_tag_list_foreach
|
||||||
%%
|
%%
|
||||||
|
define GstTagList.keys noargs
|
||||||
|
static void
|
||||||
|
tag_foreach_func_list (const GstTagList *list,
|
||||||
|
const gchar *tag,
|
||||||
|
PyObject *py_list)
|
||||||
|
{
|
||||||
|
int count;
|
||||||
|
|
||||||
|
count = gst_tag_list_get_tag_size(GST_TAG_LIST(list), tag);
|
||||||
|
if (count == 0)
|
||||||
|
PyErr_SetString(PyExc_KeyError, tag);
|
||||||
|
else if (count == 1)
|
||||||
|
PyList_Append(py_list, PyString_FromString(tag));
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject*
|
||||||
|
_wrap_gst_tag_list_keys(PyGObject *self)
|
||||||
|
{
|
||||||
|
PyObject *dict;
|
||||||
|
|
||||||
|
dict = PyList_New(0);
|
||||||
|
|
||||||
|
gst_tag_list_foreach(GST_TAG_LIST(self->obj),
|
||||||
|
(GstTagForeachFunc)tag_foreach_func_list,
|
||||||
|
(gpointer)dict);
|
||||||
|
return dict;
|
||||||
|
}
|
||||||
|
%%
|
||||||
override-slot GstTagList.tp_as_mapping
|
override-slot GstTagList.tp_as_mapping
|
||||||
static int
|
static int
|
||||||
_wrap_gst_tag_list_length(PyGObject *self)
|
_wrap_gst_tag_list_length(PyGObject *self)
|
||||||
|
|
Loading…
Reference in a new issue