mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/gst-types.defs: Added fields for GstPadTemplate.
Original commit message from CVS: * gst/gst-types.defs: Added fields for GstPadTemplate. * gst/gst.defs: Made gst_element_class_get_template_list a GstElement method. * gst/gstelement.override: Override for gst.Element.get_template_list() * gst/gstpad.override: Override getter for GstStaticPadTemplate.static_caps so that it uses the correct pointer.
This commit is contained in:
parent
90340f1908
commit
a48e8b6e6b
5 changed files with 60 additions and 2 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2006-06-14 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* gst/gst-types.defs:
|
||||
Added fields for GstPadTemplate.
|
||||
* gst/gst.defs:
|
||||
Made gst_element_class_get_template_list a GstElement method.
|
||||
* gst/gstelement.override:
|
||||
Override for gst.Element.get_template_list()
|
||||
* gst/gstpad.override:
|
||||
Override getter for GstStaticPadTemplate.static_caps so that it uses
|
||||
the correct pointer.
|
||||
|
||||
2006-06-13 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* testsuite/gstpython.supp:
|
||||
|
|
|
@ -66,6 +66,12 @@
|
|||
(parent "GstObject")
|
||||
(c-name "GstPadTemplate")
|
||||
(gtype-id "GST_TYPE_PAD_TEMPLATE")
|
||||
(fields
|
||||
'("const-gchar*" "name_template")
|
||||
'("GstPadDirection" "direction")
|
||||
'("GstPadPresence" "presence")
|
||||
'("GstCaps*" "caps")
|
||||
)
|
||||
)
|
||||
|
||||
(define-object Pipeline
|
||||
|
|
|
@ -968,9 +968,10 @@
|
|||
)
|
||||
)
|
||||
|
||||
; 14 Jun 06 - Changed to be a method on elements and not classes - bilboed
|
||||
(define-method get_pad_template_list
|
||||
(of-object "GstElementClass")
|
||||
(c-name "gst_element_class_get_pad_template_list")
|
||||
(of-object "GstElement")
|
||||
(c-name "gst_element_get_pad_template_list")
|
||||
(return-type "GList*")
|
||||
)
|
||||
|
||||
|
|
|
@ -490,3 +490,29 @@ _wrap_gst_element_tp_iter(PyGObject *self)
|
|||
{
|
||||
return _wrap_gst_element_iterate_pads(self);
|
||||
}
|
||||
%%
|
||||
override gst_element_get_pad_template_list noargs
|
||||
static PyObject *
|
||||
_wrap_gst_element_get_pad_template_list(PyGObject *self)
|
||||
{
|
||||
PyObject *ret;
|
||||
GList *res = NULL;
|
||||
guint i;
|
||||
|
||||
res = gst_element_class_get_pad_template_list
|
||||
(GST_ELEMENT_GET_CLASS (self->obj));
|
||||
|
||||
if (res) {
|
||||
i = g_list_length (res);
|
||||
ret = PyList_New (i);
|
||||
for (i = 0 ; res ; res = g_list_next (res), i++) {
|
||||
GstPadTemplate * tmpl = (GstPadTemplate *) res->data;
|
||||
PyList_SetItem (ret, i, pygstobject_new (G_OBJECT (tmpl)));
|
||||
}
|
||||
} else {
|
||||
ret = Py_None;
|
||||
Py_INCREF (ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -143,6 +143,7 @@ probe_handler_marshal(GstPad *pad, GstMiniObject *data, gpointer user_data)
|
|||
repr = PyObject_Repr (callback);
|
||||
GST_LOG_OBJECT (pad, "calling callback %s", PyString_AsString (repr));
|
||||
Py_DECREF (repr);
|
||||
|
||||
ret = PyObject_CallObject(callback, args);
|
||||
|
||||
if (!ret) {
|
||||
|
@ -1151,3 +1152,15 @@ _wrap_gst_pad_query_peer_convert (PyGObject *self, PyObject *args, PyObject *kwa
|
|||
|
||||
return ret;
|
||||
}
|
||||
%%
|
||||
override-attr GstStaticPadTemplate.static_caps
|
||||
static PyObject *
|
||||
_wrap_gst_static_pad_template__get_static_caps(PyObject *self, void *closure)
|
||||
{
|
||||
GstStaticPadTemplate *templ;
|
||||
|
||||
|
||||
templ = pyg_pointer_get(self, GstStaticPadTemplate);
|
||||
return pyg_pointer_new(GST_TYPE_STATIC_CAPS, &(templ->static_caps));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue