Commit 3075e00b authored by David I. Lehn's avatar David I. Lehn

add pad and element query and convert methods

Original commit message from CVS:
add pad and element query and convert methods
parent b8ec40b0
......@@ -262,3 +262,93 @@ _wrap_gst_element_set_state(PyGObject *self, PyObject *args, PyObject *kwargs)
pyg_block_threads();
return PyInt_FromLong(ret);
}
%%
override gst_pad_query kwargs
static PyObject *
_wrap_gst_pad_query(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "type", "format", NULL };
GstQueryType type;
GstFormat format;
gint64 value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GstPad.query", kwlist, &type, &format))
return NULL;
value = 0;
gret = gst_pad_query(GST_PAD(self->obj), type, &format, &value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(value));
return ret;
}
%%
override gst_element_query kwargs
static PyObject *
_wrap_gst_element_query(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "type", "format", NULL };
GstQueryType type;
GstFormat format;
gint64 value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GstElement.query", kwlist, &type, &format))
return NULL;
value = 0;
gret = gst_element_query(GST_ELEMENT(self->obj), type, &format, &value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(value));
return ret;
}
%%
override gst_pad_convert kwargs
static PyObject *
_wrap_gst_pad_convert(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "src_format", "src_value", "dest_format", NULL };
GstFormat src_format, dest_format;
PyObject *src_value_obj;
gint64 src_value, dest_value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iOi:GstPad.convert", kwlist, &src_format, &src_value_obj, &dest_format))
return NULL;
src_value = PyLong_AsLongLong(src_value_obj);
dest_value = 0;
gret = gst_pad_convert(GST_PAD(self->obj), src_format, src_value, &dest_format, &dest_value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(dest_value));
return ret;
}
%%
override gst_element_convert kwargs
static PyObject *
_wrap_gst_element_convert(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "src_format", "src_value", "dest_format", NULL };
GstFormat src_format, dest_format;
PyObject *src_value_obj;
gint64 src_value, dest_value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iOi:GstElement.convert", kwlist, &src_format, &src_value_obj, &dest_format))
return NULL;
src_value = PyLong_AsLongLong(src_value_obj);
dest_value = 0;
gret = gst_element_convert(GST_ELEMENT(self->obj), src_format, src_value, &dest_format, &dest_value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(dest_value));
return ret;
}
......@@ -262,3 +262,93 @@ _wrap_gst_element_set_state(PyGObject *self, PyObject *args, PyObject *kwargs)
pyg_block_threads();
return PyInt_FromLong(ret);
}
%%
override gst_pad_query kwargs
static PyObject *
_wrap_gst_pad_query(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "type", "format", NULL };
GstQueryType type;
GstFormat format;
gint64 value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GstPad.query", kwlist, &type, &format))
return NULL;
value = 0;
gret = gst_pad_query(GST_PAD(self->obj), type, &format, &value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(value));
return ret;
}
%%
override gst_element_query kwargs
static PyObject *
_wrap_gst_element_query(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "type", "format", NULL };
GstQueryType type;
GstFormat format;
gint64 value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GstElement.query", kwlist, &type, &format))
return NULL;
value = 0;
gret = gst_element_query(GST_ELEMENT(self->obj), type, &format, &value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(value));
return ret;
}
%%
override gst_pad_convert kwargs
static PyObject *
_wrap_gst_pad_convert(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "src_format", "src_value", "dest_format", NULL };
GstFormat src_format, dest_format;
PyObject *src_value_obj;
gint64 src_value, dest_value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iOi:GstPad.convert", kwlist, &src_format, &src_value_obj, &dest_format))
return NULL;
src_value = PyLong_AsLongLong(src_value_obj);
dest_value = 0;
gret = gst_pad_convert(GST_PAD(self->obj), src_format, src_value, &dest_format, &dest_value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(dest_value));
return ret;
}
%%
override gst_element_convert kwargs
static PyObject *
_wrap_gst_element_convert(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "src_format", "src_value", "dest_format", NULL };
GstFormat src_format, dest_format;
PyObject *src_value_obj;
gint64 src_value, dest_value;
gboolean gret;
PyObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iOi:GstElement.convert", kwlist, &src_format, &src_value_obj, &dest_format))
return NULL;
src_value = PyLong_AsLongLong(src_value_obj);
dest_value = 0;
gret = gst_element_convert(GST_ELEMENT(self->obj), src_format, src_value, &dest_format, &dest_value);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, PyInt_FromLong(gret));
PyTuple_SetItem(ret, 1, PyLong_FromLongLong(dest_value));
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment