mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
python: override gst_rtsp_media_mapping_add_factory to fix refcounting
This commit is contained in:
parent
de30ca60c4
commit
6b862f0c0e
1 changed files with 20 additions and 0 deletions
|
@ -65,3 +65,23 @@ _wrap_gst_rtsp_server_create_watch(PyGObject *self, PyObject *args, PyObject *ke
|
|||
pyg_end_allow_threads;
|
||||
return pygobject_new((GObject *)ret);
|
||||
}
|
||||
|
||||
%%
|
||||
override gst_rtsp_media_mapping_add_factory kwargs
|
||||
static PyObject *
|
||||
_wrap_gst_rtsp_media_mapping_add_factory(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
static char *kwlist[] = { "path", "factory", NULL };
|
||||
char *path;
|
||||
PyGObject *factory;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sO!:GstRTSPMediaMapping.add_factory", kwlist, &path, &PyGstRTSPMediaFactory_Type, &factory))
|
||||
return NULL;
|
||||
pyg_begin_allow_threads;
|
||||
gst_rtsp_media_mapping_add_factory(GST_RTSP_MEDIA_MAPPING(self->obj), path,
|
||||
g_object_ref (GST_RTSP_MEDIA_FACTORY(factory->obj)));
|
||||
pyg_end_allow_threads;
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue