gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
/* -*- Mode: C; ; c-file-style: "python" -*- */
|
|
|
|
/* gst-python
|
|
|
|
* Copyright (C) 2005 Edward Hervey
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* Author: Johan Dahlin <johan@gnome.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
%%
|
|
|
|
override gst_message_parse_state_changed noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_state_changed (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
GstElementState old;
|
|
|
|
GstElementState new;
|
|
|
|
PyObject *ret;
|
|
|
|
|
|
|
|
/* Should raise an exception if it's not a state-changed message */
|
|
|
|
if (GST_MESSAGE(self->obj)->type != GST_MESSAGE_STATE_CHANGED) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not a state-changed message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
gst_message_parse_state_changed (GST_MESSAGE(self->obj), &old, &new);
|
|
|
|
/* Return this as a tuple */
|
|
|
|
ret = PyList_New(2);
|
2005-07-12 10:13:53 +00:00
|
|
|
PyList_SET_ITEM(ret, 0, pyg_flags_from_gtype(GST_TYPE_ELEMENT_STATE, old));
|
|
|
|
PyList_SET_ITEM(ret, 1, pyg_flags_from_gtype(GST_TYPE_ELEMENT_STATE, new));
|
gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
%%
|
2005-07-21 12:03:23 +00:00
|
|
|
override gst_message_parse_segment_start noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_segment_start (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
GstClockTime timestart;
|
|
|
|
PyObject *ret;
|
|
|
|
|
|
|
|
/* Should raise an exception if it's not a segment start message */
|
|
|
|
if (GST_MESSAGE(self->obj)->type != GST_MESSAGE_SEGMENT_START) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not a segment start message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
gst_message_parse_segment_start (GST_MESSAGE(self->obj), ×tart);
|
|
|
|
/* Return this as a tuple */
|
|
|
|
ret = PyLong_FromUnsignedLongLong(timestart);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_parse_segment_done noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_segment_done (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
GstClockTime timestart;
|
|
|
|
PyObject *ret;
|
|
|
|
|
|
|
|
/* Should raise an exception if it's not a segment start message */
|
|
|
|
if (GST_MESSAGE(self->obj)->type != GST_MESSAGE_SEGMENT_DONE) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not a segment done message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
gst_message_parse_segment_done (GST_MESSAGE(self->obj), ×tart);
|
|
|
|
/* Return this as a tuple */
|
|
|
|
ret = PyLong_FromUnsignedLongLong(timestart);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
%%
|
gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
override gst_message_parse_error noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_error (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
PyObject *ret;
|
|
|
|
GError *error;
|
|
|
|
gchar *debug;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_TYPE(self->obj) != GST_MESSAGE_ERROR) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not an error message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_message_parse_error (GST_MESSAGE(self->obj), &error, &debug);
|
|
|
|
|
|
|
|
ret = PyList_New(0);
|
|
|
|
PyList_Append(ret, pyg_boxed_new (GST_TYPE_G_ERROR, error, TRUE, TRUE));
|
2005-08-03 12:48:40 +00:00
|
|
|
if (debug != NULL) {
|
gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
PyList_Append(ret, PyString_FromString(debug));
|
2005-08-03 12:48:40 +00:00
|
|
|
} else {
|
|
|
|
Py_INCREF (Py_None);
|
|
|
|
PyList_Append(ret, Py_None);
|
|
|
|
}
|
gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_parse_warning noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_warning (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
PyObject *ret;
|
|
|
|
GError *warning;
|
|
|
|
gchar *debug;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_TYPE(self->obj) != GST_MESSAGE_WARNING) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not an warning message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_message_parse_warning (GST_MESSAGE(self->obj), &warning, &debug);
|
|
|
|
|
|
|
|
ret = PyList_New(0);
|
|
|
|
PyList_Append(ret, pyg_boxed_new (GST_TYPE_G_ERROR, warning, TRUE, TRUE));
|
|
|
|
if (debug != NULL)
|
|
|
|
PyList_Append(ret, PyString_FromString(debug));
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_parse_tag noargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_parse_tag (PyGstMiniObject *self)
|
|
|
|
{
|
|
|
|
PyObject *ret;
|
|
|
|
GstTagList *taglist;
|
|
|
|
|
|
|
|
if (GST_MESSAGE_TYPE(self->obj) != GST_MESSAGE_TAG) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "Message is not an Tag message");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_message_parse_tag (GST_MESSAGE(self->obj), &taglist);
|
|
|
|
|
2005-07-12 10:13:53 +00:00
|
|
|
ret = pyg_boxed_new (GST_TYPE_TAG_LIST, taglist, TRUE, TRUE);
|
gst/: Added GError wrapping,
Original commit message from CVS:
* gst/gst-types.defs:
* gst/gst.defs:
Added GError wrapping,
Removed data field from Buffer,
Added virtual methods to object
Updated to latest API
* gst/gst.override:
wrapped gst_plugin_get_feature_list(), gst_uri_handler_get_protocols(),
gst_registry_pool_list()
* gst/gstbuffer.override:
gst.Buffer() works
get/setters fixed
wrapped gst_buffer_stamp()
* gst/gstbus.override:
wrapped gst_bus_set_sync_handler() and gst_bus_add_watch()
* gst/gstelement.override:
wrapped gst_element_send_event(), gst_element_factory_get_pad_templates()
gst_element_query_convert(), gst_element_get_query_types()
* gst/gstevent.override:
wrapped gst_event_discont_get_value()
* gst/gstmessage.override:
wrapped gst_message_parse_state_changed(), gst_message_parse_error(),
gst_message_parse_warning(), gst_message_parse_tag()
* gst/gstmodule.c:
Added registration of new fundamental type with pygtk
* gst/gstpad.override:
wrapped gst_pad_query(), gst_pad_[add|remove]_[data|event|buffer]_probe(),
gst_pad_query_position(), gst_pad_query_convert()
* gst/gstquery.override:
wrapped gst_query_parse_position(), gst_query_parse_convert(),
gst_query_parse_seeking_query(), gst_query_parse_seeking_reponse()
* gst/pygstminiobject.c:
fixes
* gst/Makefile.am:
added gstbus.override, gstmessage.override, gstquery.override
* testsuite/test_buffer.py:
* testsuite/test_element.py:
* testsuite/test_event.py:
* testsuite/test_pipeline.py:
Updating testsuites
2005-07-12 09:45:58 +00:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2005-07-12 16:37:31 +00:00
|
|
|
%%
|
|
|
|
override gst_message_new_eos kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_eos(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:message_new_eos", kwlist, &PyGstObject_Type, &src))
|
|
|
|
return NULL;
|
|
|
|
ret = gst_message_new_eos(GST_OBJECT(src->obj));
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_new_error kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_error(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", "error", "debug", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
PyObject *py_error;
|
|
|
|
char *debug;
|
|
|
|
GError *error = NULL;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!Os:message_new_error", kwlist, &PyGstObject_Type, &src, &py_error, &debug))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_boxed_check(py_error, GST_TYPE_G_ERROR))
|
|
|
|
error = pyg_boxed_get(py_error, GError);
|
|
|
|
else {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "error should be a GError");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ret = gst_message_new_error(GST_OBJECT(src->obj), error, debug);
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_new_warning kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_warning(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", "error", "debug", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
PyObject *py_error;
|
|
|
|
char *debug;
|
|
|
|
GError *error = NULL;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!Os:message_new_warning", kwlist, &PyGstObject_Type, &src, &py_error, &debug))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_boxed_check(py_error, GST_TYPE_G_ERROR))
|
|
|
|
error = pyg_boxed_get(py_error, GError);
|
|
|
|
else {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "error should be a GError");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ret = gst_message_new_warning(GST_OBJECT(src->obj), error, debug);
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_new_tag kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_tag(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", "tag_list", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
GstTagList *tag_list = NULL;
|
|
|
|
PyObject *py_tag_list;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:message_new_tag", kwlist, &PyGstObject_Type, &src, &py_tag_list))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_boxed_check(py_tag_list, GST_TYPE_TAG_LIST))
|
|
|
|
tag_list = pyg_boxed_get(py_tag_list, GstTagList);
|
|
|
|
else {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "tag_list should be a GstTagList");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ret = gst_message_new_tag(GST_OBJECT(src->obj), tag_list);
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_new_state_changed kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_state_changed(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", "old_state", "new_state", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
PyObject *py_old_state = NULL, *py_new_state = NULL;
|
|
|
|
GstElementState old_state, new_state;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!OO:message_new_state_changed", kwlist, &PyGstObject_Type, &src, &py_old_state, &py_new_state))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_flags_get_value(GST_TYPE_ELEMENT_STATE, py_old_state, (gint *)&old_state))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_flags_get_value(GST_TYPE_ELEMENT_STATE, py_new_state, (gint *)&new_state))
|
|
|
|
return NULL;
|
|
|
|
ret = gst_message_new_state_changed(GST_OBJECT(src->obj), old_state, new_state);
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|
|
|
|
%%
|
|
|
|
override gst_message_new_application kwargs
|
|
|
|
static PyObject *
|
|
|
|
_wrap_gst_message_new_application(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
|
|
{
|
|
|
|
static char *kwlist[] = { "src", "structure", NULL };
|
|
|
|
PyGObject *src;
|
|
|
|
PyObject *py_structure;
|
|
|
|
GstStructure *structure = NULL;
|
|
|
|
GstMessage *ret;
|
|
|
|
|
|
|
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:message_new_application", kwlist, &PyGstObject_Type, &src, &py_structure))
|
|
|
|
return NULL;
|
|
|
|
if (pyg_boxed_check(py_structure, GST_TYPE_STRUCTURE))
|
|
|
|
structure = pyg_boxed_get(py_structure, GstStructure);
|
|
|
|
else {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "structure should be a GstStructure");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ret = gst_message_new_application(GST_OBJECT(src->obj), structure);
|
|
|
|
/* pygobject_new handles NULL checking */
|
|
|
|
return pygstminiobject_new_noref((GstMiniObject *)ret);
|
|
|
|
}
|