gst/gst-types.defs: Added GstStaticCaps and GstStaticPadTemplate, using the new GType.

Original commit message from CVS:
* gst/gst-types.defs:
Added GstStaticCaps and GstStaticPadTemplate, using the new GType.
* gst/gst.defs:
Doesn't return a const anymore.
* gst/gstelementfactory.override:
Wrapped gst_element_factory_get_static_pad_templates()
This commit is contained in:
Edward Hervey 2005-12-20 11:15:50 +00:00
parent d3b9836bbd
commit 1170d64e5f
4 changed files with 52 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2005-12-20 Edward Hervey <edward@fluendo.com>
* gst/gst-types.defs:
Added GstStaticCaps and GstStaticPadTemplate, using the new GType.
* gst/gst.defs:
Doesn't return a const anymore.
* gst/gstelementfactory.override:
Wrapped gst_element_factory_get_static_pad_templates()
2005-12-19 Martin Soto <martinsoto@users.sourceforge.net>
* gst/gstbus.override (_wrap_gst_bus_add_watch): This function

View file

@ -277,6 +277,28 @@
)
)
(define-pointer StaticPadTemplate
(in-module "Gst")
(c-name "GstStaticPadTemplate")
(gtype-id "GST_TYPE_STATIC_PAD_TEMPLATE")
(fields
'("gchar*" "name_template")
'("GstPadDirection" "direction")
'("GstPadPresence" "presence")
'("GstStaticCaps" "static_caps")
)
)
(define-pointer StaticCaps
(in-module "Gst")
(c-name "GstStaticCaps")
(gtype-id "GST_TYPE_STATIC_CAPS")
(fields
'("GstCaps" "caps")
'("const-gchar*" "string")
)
)
;; Enumerations and flags ...
(define-flags BinFlags

View file

@ -488,7 +488,7 @@
(define-method get
(of-object "GstStaticCaps")
(c-name "gst_static_caps_get")
(return-type "const-GstCaps*")
(return-type "GstCaps*")
)
(define-method append

View file

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset: 4 -*- */
/*
* gstelementfactory.override - gstreamer element factory override
* Copyright (C) 2005 Alessandro Decina
@ -41,4 +42,23 @@ _wrap_gst_element_factory_make(PyObject *self, PyObject *args, PyObject *kwargs)
pygst_object_unref((GObject *)ret);
return py_ret;
}
%%
override gst_element_factory_get_static_pad_templates noargs
static PyObject *
_wrap_gst_element_factory_get_static_pad_templates(PyGObject *self)
{
const GList *list;
GList *l;
PyObject *py_list;
int i = 0;
list = gst_element_factory_get_static_pad_templates (GST_ELEMENT_FACTORY (self->obj));
py_list = PyList_New(g_list_length ((GList*) list));
for (l = (GList*) list; l ; l = g_list_next(l), i++) {
GstStaticPadTemplate *templ = (GstStaticPadTemplate*) l->data;
PyList_SetItem(py_list, i, pyg_pointer_new(GST_TYPE_STATIC_PAD_TEMPLATE, (gpointer) templ));
}
return py_list;
}