diff --git a/ChangeLog b/ChangeLog index 271098ddd7..18be481fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-10-09 Thomas Vander Stichele + + * gst/gst.defs: + * gst/gstmessage.override: + fix for pending state being added to state message + * testsuite/test_buffer.py: + * testsuite/test_pipeline.py: + update + 2005-10-07 Andy Wingo * gst/gstelement.override (_wrap_gst_element_get_state): Drop the diff --git a/gst/gst.defs b/gst/gst.defs index a5b88c8fdf..70a136af2e 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -2625,6 +2625,7 @@ '("GstObject*" "src") '("GstState" "old_state") '("GstState" "new_state") + '("GstState" "pending_state") ) ) diff --git a/gst/gstmessage.override b/gst/gstmessage.override index 2c825b0323..ae9593d603 100644 --- a/gst/gstmessage.override +++ b/gst/gstmessage.override @@ -27,18 +27,20 @@ _wrap_gst_message_parse_state_changed (PyGstMiniObject *self) { GstState old; GstState new; - PyObject *ret; + GstState pen; + 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); + gst_message_parse_state_changed (GST_MESSAGE(self->obj), &old, &new, &pen); /* Return this as a tuple */ - ret = PyList_New(2); + ret = PyList_New(3); PyList_SET_ITEM(ret, 0, pyg_enum_from_gtype(GST_TYPE_STATE, old)); PyList_SET_ITEM(ret, 1, pyg_enum_from_gtype(GST_TYPE_STATE, new)); + PyList_SET_ITEM(ret, 2, pyg_enum_from_gtype(GST_TYPE_STATE, pen)); return ret; } %% diff --git a/testsuite/test_buffer.py b/testsuite/test_buffer.py index e9cf66d245..e97fb113ec 100644 --- a/testsuite/test_buffer.py +++ b/testsuite/test_buffer.py @@ -22,9 +22,9 @@ import sys import gc -from common import gobject, gst, unittest +from common import gobject, gst, unittest, TestCase -class BufferTest(unittest.TestCase): +class BufferTest(TestCase): def testBufferBuffer(self): buf = gst.Buffer('test') assert str(buffer(buf)) == 'test' diff --git a/testsuite/test_pipeline.py b/testsuite/test_pipeline.py index 6417ae8d8d..00b29799dc 100644 --- a/testsuite/test_pipeline.py +++ b/testsuite/test_pipeline.py @@ -133,7 +133,7 @@ class PipelineAndBus(TestCase): message.src.get_path_string(), message.type.value_nicks[1])) t = message.type if t == gst.MESSAGE_STATE_CHANGED: - old, new = message.parse_state_changed() + old, new, pen = message.parse_state_changed() gst.debug('%r state change from %r to %r' % ( message.src.get_path_string(), old, new)) if message.src == self.pipeline and new == self.final: