1
/* -*- Mode: C; c-basic-offset: 4 -*- */
3
* gstelementfactory.override - gstreamer element factory override
4
* Copyright (C) 2005 Alessandro Decina
7
* Alessandro Decina <alessandro@nnva.org>
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Library General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Library General Public License for more details.
19
* You should have received a copy of the GNU Library General Public
20
* License along with this library; if not, write to the
21
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
* Boston, MA 02111-1307, USA.
26
override gst_element_factory_make kwargs
28
_wrap_gst_element_factory_make(PyObject *self, PyObject *args, PyObject *kwargs){
29
static char *kwlist[] = { "factoryname", "name", NULL };
30
char *factoryname, *name = NULL;
34
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z:element_factory_make", kwlist, &factoryname, &name))
36
ret = gst_element_factory_make(factoryname, name);
38
PyErr_SetString(PyGstExc_PluginNotFoundError, factoryname);
41
py_ret = pygstobject_new((GObject *)ret);
42
pygst_object_unref((GObject *)ret);
46
override gst_element_factory_get_static_pad_templates noargs
48
_wrap_gst_element_factory_get_static_pad_templates(PyGObject *self)
55
list = gst_element_factory_get_static_pad_templates (GST_ELEMENT_FACTORY (self->obj));
57
py_list = PyList_New(g_list_length ((GList*) list));
59
for (l = (GList*) list; l ; l = g_list_next(l), i++) {
60
GstStaticPadTemplate *templ = (GstStaticPadTemplate*) l->data;
61
PyList_SetItem(py_list, i, pyg_pointer_new(GST_TYPE_STATIC_PAD_TEMPLATE, (gpointer) templ));