GNOME Bugzilla – Bug 588744
[check] Stream consistency checker utility
Last modified: 2009-07-28 15:43:13 UTC
Many elements don't have any checks (whether internally or in the unit tests) to make sure that the outgoing data flow is consistant. * No in-band data (buffers or events) are sent before NEWSEGMENT * NEWSEGMENT is sent out after a FLUSH_START/FLUSH_STOP tuple * Only *ONE* FLUSH_STOP follows a FLUSH_START * No in-band data (buffers or events) are sent after EOS * No in-band data (buffers or events) are sent between FLUSH_START and FLUSH_STOP * ... maybe some more For this I've created a StreamConsistency helper utility for libgstcheck which can be used in various unit tests. This has already helped detect a few bugs in some elements. Doing this is very important for dynamic pipelines (in general and GNonLin ones in particular) where a certain data flow consistency is expected.
Created attachment 138506 [details] [review] gstcheck: Add a stream consistency checking helper routine.
ouch, I meant to mark this one as a blocker too :(
Looks ok. The check about receiving a new-segment between flush-start and flush-stop sounds dubious to me though: While forwarding flush-start from one thread, an element will continue as it was in the streaming thread until it gets a WRONG_STATE return from pushing something and can return it upstream. That means it might indeed push a new-segment during the flush.
Good point, I thought the GST_PAD_IS_FLUSHING check was done on source pads... but it appears it's only done on the peerpad. I'll remove the flushing checks, those checks are already handled by code in core (gstpad).
commit dcdc73d1826d3dca91663ee8ce8af84fcf3ea317 Author: Edward Hervey <bilboed@bilboed.com> Date: Mon Jul 13 09:22:06 2009 +0200 gstcheck: Add a stream consistency checking helper routine. Fixes #588744
Sorry for re-opening. Two quick questions: - why is the GstStreamConsistency structure public? Does it need to be public? - if it should be public, shouldn't it have padding?
good point... it doesn't need to be public (at least not the contents).
Created attachment 139384 [details] [review] check: make new GstStreamConsistency structure private
Patch looks fine to me. If bilboed is OK with it too, push it...
commit 623c19983a6e6e099d53b681a1ece5883d2f5fac Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Jul 28 15:23:15 2009 +0100 check: make new GstStreamConsistency structure private There's no need to have GstStreamConsistency in a public header for the time being, so make it private. While we're at it, add a gtk-doc blurb for it though. Re-fixes #588744.