mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
f50c30441c
Original commit message from CVS: * examples/gstfile.py: misc fixes * gst/Makefile.am: * gst/pygstexception.c: * gst/pygstexception.h: * gst/gstelementfactory.override: * gst/gst.override: * gst/gstpad.override: * gst/gstmodule.c: (init_gst): Added exceptions system by Alessandro Decina <alessandro@nnva.org> Closes bug #315433 * gst/gstbus.override: * gst/gstelement.override: Fix for _wrap_gst_element_get_state() * gst/gstobject.override: More debug
44 lines
1.6 KiB
Text
44 lines
1.6 KiB
Text
/*
|
|
* gstelementfactory.override - gstreamer element factory override
|
|
* Copyright (C) 2005 Alessandro Decina
|
|
*
|
|
* Authors:
|
|
* Alessandro Decina <alessandro@nnva.org>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
%%
|
|
override gst_element_factory_make kwargs
|
|
static PyObject *
|
|
_wrap_gst_element_factory_make(PyObject *self, PyObject *args, PyObject *kwargs){
|
|
static char *kwlist[] = { "factoryname", "name", NULL };
|
|
char *factoryname, *name = NULL;
|
|
PyObject *py_ret;
|
|
GstElement *ret;
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z:element_factory_make", kwlist, &factoryname, &name))
|
|
return NULL;
|
|
ret = gst_element_factory_make(factoryname, name);
|
|
if (ret == NULL) {
|
|
PyErr_SetString(PyGstExc_PluginNotFoundError, factoryname);
|
|
return NULL;
|
|
}
|
|
py_ret = pygstobject_new((GObject *)ret);
|
|
pygst_object_unref((GObject *)ret);
|
|
return py_ret;
|
|
}
|
|
|