mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
gst/: fix for pending state being added to state message
Original commit message from CVS: * gst/gst.defs: * gst/gstmessage.override: fix for pending state being added to state message * testsuite/test_buffer.py: * testsuite/test_pipeline.py: update
This commit is contained in:
parent
e1137284ce
commit
c3f136f836
5 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-10-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* 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 <wingo@pobox.com>
|
||||
|
||||
* gst/gstelement.override (_wrap_gst_element_get_state): Drop the
|
||||
|
|
|
@ -2625,6 +2625,7 @@
|
|||
'("GstObject*" "src")
|
||||
'("GstState" "old_state")
|
||||
'("GstState" "new_state")
|
||||
'("GstState" "pending_state")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
%%
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue