From: <tho...@fr...> - 2005-10-13 15:36:24
|
CVS Root: /cvs/gstreamer Module: gst-python Changes by: thomasvs Date: Thu Oct 13 2005 08:36:16 PDT Log message: update a test fix an uninited var Modified files: . : ChangeLog gst : gstelement.override testsuite : test_event.py Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.312&r2=1.313 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/gstelement.override.diff?r1=1.21&r2=1.22 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/testsuite/test_event.py.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-python/ChangeLog,v retrieving revision 1.312 retrieving revision 1.313 diff -u -d -r1.312 -r1.313 --- ChangeLog 13 Oct 2005 10:58:16 -0000 1.312 +++ ChangeLog 13 Oct 2005 15:36:04 -0000 1.313 @@ -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 <ale...@nn...> Reviewed by Edward Hervey <ed...@fl...> Index: gstelement.override RCS file: /cvs/gstreamer/gst-python/gst/gstelement.override,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gstelement.override 13 Oct 2005 10:41:06 -0000 1.21 +++ gstelement.override 13 Oct 2005 15:36:04 -0000 1.22 @@ -83,7 +83,7 @@ GstStateChangeReturn ret; PyObject *timeout = NULL; gdouble timeoutd; - GstClockTime timeout64; + GstClockTime timeout64 = GST_CLOCK_TIME_NONE; PyObject *tuple; /* Index: test_event.py RCS file: /cvs/gstreamer/gst-python/testsuite/test_event.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- test_event.py 11 Oct 2005 12:42:53 -0000 1.6 +++ test_event.py 13 Oct 2005 15:36:04 -0000 1.7 @@ -26,16 +26,32 @@ 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() |