mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
commit intermediate wrapper updates
Original commit message from CVS: commit intermediate wrapper updates
This commit is contained in:
parent
ed59668d25
commit
c8f8cd37b9
5 changed files with 47 additions and 38 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-09-18 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gst-types.defs:
|
||||
* gst/gst.override:
|
||||
* testsuite/test_registry.py:
|
||||
commit intermediate wrapper updates
|
||||
|
||||
2005-09-16 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/gst.defs (registry_get_default): Renamed from
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 39250a956e1dfc010fe9f9d93ca1e2c3a343cdca
|
||||
Subproject commit 3f8b422d851dc64797cdd97dd7a2014acd751386
|
|
@ -202,9 +202,9 @@
|
|||
(gtype-id "GST_TYPE_CAPS")
|
||||
)
|
||||
|
||||
(define-boxed Plugin
|
||||
(define-object Plugin
|
||||
(in-module "Gst")
|
||||
(parent "GObject")
|
||||
(parent "GstObject")
|
||||
(c-name "GstPlugin")
|
||||
(gtype-id "GST_TYPE_PLUGIN")
|
||||
)
|
||||
|
|
|
@ -694,55 +694,51 @@ _wrap_gst_main_quit(PyObject *self)
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
%%
|
||||
override gst_registry_pool_plugin_list noargs
|
||||
override gst_registry_get_plugin_list
|
||||
static PyObject *
|
||||
_wrap_gst_registry_pool_plugin_list(PyGObject *self)
|
||||
_wrap_gst_registry_get_plugin_list (PyGObject *self)
|
||||
{
|
||||
GstRegistry *registry;
|
||||
GList *l, *plugins;
|
||||
PyObject *list;
|
||||
|
||||
plugins = gst_registry_pool_plugin_list();
|
||||
registry = GST_REGISTRY (self->obj);
|
||||
|
||||
list = PyList_New(0);
|
||||
plugins = gst_registry_get_plugin_list (registry);
|
||||
|
||||
list = PyList_New (0);
|
||||
for (l = plugins; l; l = l->next) {
|
||||
GstPlugin *plugin = (GstPlugin*)l->data;
|
||||
PyList_Append(list,
|
||||
pyg_boxed_new(GST_TYPE_PLUGIN, plugin, TRUE, TRUE));
|
||||
GstPlugin *plugin = (GstPlugin *) l->data;
|
||||
PyList_Append (list, pygobject_new (G_OBJECT (plugin)));
|
||||
}
|
||||
g_list_free(plugins);
|
||||
g_list_free (plugins);
|
||||
|
||||
return list;
|
||||
}
|
||||
%%
|
||||
override gst_registry_pool_feature_list
|
||||
|
||||
static PyObject *
|
||||
_wrap_gst_registry_pool_feature_list(PyGObject *self, PyObject *args)
|
||||
_wrap_gst_registry_get_feature_list (PyGObject *self)
|
||||
{
|
||||
GstRegistry *registry;
|
||||
GList *l, *features;
|
||||
PyObject *pygtype, *list;
|
||||
GType gtype;
|
||||
PyObject *list;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O:registry_pool_feature_list",
|
||||
&pygtype))
|
||||
return NULL;
|
||||
registry = GST_REGISTRY (self->obj);
|
||||
|
||||
gtype = pyg_type_from_object (pygtype);
|
||||
if (!gtype)
|
||||
return NULL;
|
||||
features = gst_registry_get_feature_list (registry);
|
||||
|
||||
features = gst_registry_pool_feature_list(gtype);
|
||||
|
||||
list = PyList_New(0);
|
||||
list = PyList_New (0);
|
||||
for (l = features; l; l = l->next) {
|
||||
GstPluginFeature *feature = (GstPluginFeature*)l->data;
|
||||
PyList_Append(list, pygobject_new (G_OBJECT (feature)));
|
||||
|
||||
GstPluginFeature *feature = (GstPluginFeature *) l->data;
|
||||
PyList_Append (list, pygobject_new (G_OBJECT (feature)));
|
||||
}
|
||||
g_list_free(features);
|
||||
g_list_free (features);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
%%
|
||||
override gst_xml_new noargs
|
||||
|
||||
|
|
|
@ -23,16 +23,22 @@
|
|||
import sys
|
||||
from common import gst, unittest
|
||||
|
||||
class RegistryPoolTest(unittest.TestCase):
|
||||
class RegistryTest(unittest.TestCase):
|
||||
def testGetDefault(self):
|
||||
registry = gst.registry_get_default()
|
||||
|
||||
def testPluginList(self):
|
||||
plugins = gst.registry_pool_plugin_list()
|
||||
elements = map(lambda p: p.get_name(), plugins)
|
||||
assert 'gstcoreelements' in elements
|
||||
registry = gst.registry_get_default()
|
||||
plugins = registry.get_plugin_list()
|
||||
names = map(lambda p: p.get_name(), plugins)
|
||||
self.failUnless('gstcoreelements' in names)
|
||||
|
||||
def testFeatureList(self):
|
||||
plugins = gst.registry_pool_feature_list(gst.ElementFactory)
|
||||
elements = map(lambda p: p.get_name(), plugins)
|
||||
assert 'fakesink' in elements, elements
|
||||
registry = gst.registry_get_default()
|
||||
features = registry.get_feature_list()
|
||||
elements = map(lambda f: f.get_name(), features)
|
||||
self.failUnless('fakesink' in elements)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue