mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
update a test fix an uninited var
Original commit message from CVS: update a test fix an uninited var
This commit is contained in:
parent
e3ac835751
commit
c72f87b682
3 changed files with 26 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-10-13 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstelement.override:
|
||||
* testsuite/test_event.py:
|
||||
fix up test a little
|
||||
|
||||
2005-10-13 Alessandro Decina <alessandro@nnva.org>
|
||||
|
||||
Reviewed by Edward Hervey <edward@fluendo.com>
|
||||
|
|
|
@ -83,7 +83,7 @@ _wrap_gst_element_get_state(PyGObject *self, PyObject *args, PyObject *kwargs)
|
|||
GstStateChangeReturn ret;
|
||||
PyObject *timeout = NULL;
|
||||
gdouble timeoutd;
|
||||
GstClockTime timeout64;
|
||||
GstClockTime timeout64 = GST_CLOCK_TIME_NONE;
|
||||
PyObject *tuple;
|
||||
|
||||
/*
|
||||
|
|
|
@ -26,16 +26,32 @@ from common import gst, unittest, testhelper, TestCase
|
|||
|
||||
class EventTest(TestCase):
|
||||
def setUp(self):
|
||||
pipeline = gst.parse_launch('fakesrc ! fakesink name=sink')
|
||||
self.sink = pipeline.get_by_name('sink')
|
||||
pipeline.set_state(gst.STATE_PLAYING)
|
||||
TestCase.setUp(self)
|
||||
self.pipeline = gst.parse_launch('fakesrc ! fakesink name=sink')
|
||||
self.sink = self.pipeline.get_by_name('sink')
|
||||
self.pipeline.set_state(gst.STATE_PLAYING)
|
||||
|
||||
def tearDown(self):
|
||||
gst.debug('setting pipeline to NULL')
|
||||
self.pipeline.set_state(gst.STATE_NULL)
|
||||
gst.debug('set pipeline to NULL')
|
||||
|
||||
del self.sink
|
||||
del self.pipeline
|
||||
TestCase.tearDown(self)
|
||||
|
||||
def testEventSeek(self):
|
||||
# this event only serves to change the rate of data transfer
|
||||
event = gst.event_new_seek(1.0, gst.FORMAT_BYTES, gst.SEEK_FLAG_FLUSH,
|
||||
gst.SEEK_TYPE_NONE, 0, gst.SEEK_TYPE_NONE, 0)
|
||||
# FIXME: but basesrc goes into an mmap/munmap spree, needs to be fixed
|
||||
|
||||
event = gst.event_new_seek(1.0, gst.FORMAT_BYTES, gst.SEEK_FLAG_FLUSH,
|
||||
gst.SEEK_TYPE_SET, 0, gst.SEEK_TYPE_NONE, 0)
|
||||
assert event
|
||||
gst.debug('sending event')
|
||||
self.sink.send_event(event)
|
||||
gst.debug('sent event')
|
||||
|
||||
def testWrongEvent(self):
|
||||
buffer = gst.Buffer()
|
||||
|
|
Loading…
Reference in a new issue