mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
gst/interfaces.override (_wrap_gst_tuner_list_norms)
Original commit message from CVS: * gst/interfaces.override (_wrap_gst_tuner_list_norms) (_wrap_gst_tuner_list_channels): Impl.
This commit is contained in:
parent
a40a538c90
commit
582e7e6624
2 changed files with 36 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-08-12 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/interfaces.override (_wrap_gst_tuner_list_norms)
|
||||||
|
(_wrap_gst_tuner_list_channels): Impl.
|
||||||
|
|
||||||
2004-08-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-08-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/gst.override:
|
* gst/gst.override:
|
||||||
|
|
|
@ -53,23 +53,38 @@ ignore-glob
|
||||||
gstinterfaces_*init
|
gstinterfaces_*init
|
||||||
*_get_type
|
*_get_type
|
||||||
%%
|
%%
|
||||||
%%
|
override gst_tuner_list_channels noargs
|
||||||
override gst_tuner_make kwargs
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_wrap_gst_tuner_make(PyObject *self, PyObject *args, PyObject *kwargs)
|
_wrap_gst_tuner_list_channels(PyGObject *self)
|
||||||
{
|
{
|
||||||
static char *kwlist[] = { "obj", NULL };
|
const GList *l, *list;
|
||||||
PyObject *py_value = NULL;
|
PyObject *py_list;
|
||||||
GValue value = { 0 };
|
|
||||||
|
list = gst_tuner_list_channels(GST_TUNER(self->obj));
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GstStructure.set_value", kwlist, &py_value))
|
|
||||||
return NULL;
|
py_list = PyList_New(0);
|
||||||
g_value_init(&value, G_TYPE_STRING);
|
for (l = list; l; l = l->next) {
|
||||||
if (pyg_value_from_pyobject(&value, py_value) != 0) {
|
GstTunerChannel *channel = (GstTunerChannel*)l->data;
|
||||||
return NULL;
|
PyList_Append(py_list, pygobject_new(G_OBJECT(channel)));
|
||||||
}
|
}
|
||||||
gst_structure_set_value(pyg_boxed_get(self, GstStructure), field, &value);
|
|
||||||
|
return py_list;
|
||||||
Py_INCREF(Py_None);
|
}
|
||||||
return Py_None;
|
%%
|
||||||
|
override gst_tuner_list_norms noargs
|
||||||
|
static PyObject *
|
||||||
|
_wrap_gst_tuner_list_norms(PyGObject *self)
|
||||||
|
{
|
||||||
|
const GList *l, *list;
|
||||||
|
PyObject *py_list;
|
||||||
|
|
||||||
|
list = gst_tuner_list_norms(GST_TUNER(self->obj));
|
||||||
|
|
||||||
|
py_list = PyList_New(0);
|
||||||
|
for (l = list; l; l = l->next) {
|
||||||
|
GstTunerNorm *norm = (GstTunerNorm*)l->data;
|
||||||
|
PyList_Append(py_list, pygobject_new(G_OBJECT(norm)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return py_list;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue