GNOME Bugzilla – Bug 700600
videomixer: Fix races in caps negotiation and re enable the unit test
Last modified: 2013-05-18 23:18:59 UTC
I am ataching here a set of patch to do that.
Created attachment 244653 [details] [review] videomixer2: Protect flush_stop_pending with the collectpad stream lock And make sure to expect a flush-stop after a flush-start
Created attachment 244654 [details] [review] videomixer: Do not send flush_stop when receiving a seek There is no reason to send a flush-stop when receiving a seek event. In the case of a flushing seek, we could eventually want to, but in the code path were we check if the seek is "flushing", we have the following comment that makes sense: "we can't send FLUSH_STOP here since upstream could start pushing data after we unlock mix->collect. We set flush_stop_pending to TRUE instead and send FLUSH_STOP after forwarding the seek upstream or from gst_videomixer_collected, whichever happens first."
Created attachment 244656 [details] [review] videomixer: Send caps event from the streaming thread This way we avoid races in caps negotiation and we make sure that the caps are sent after stream-start.
Created attachment 244657 [details] [review] videomixer: Send a reconfigure event upstream if sinkpad caps are not usable
Created attachment 244658 [details] [review] tests: Re-enable videomixer test
This is a dup of https://bugzilla.gnome.org/show_bug.cgi?id=684237 After some testing, it seems better, though I still get the following pipeline to fail from time to time: gst-launch-1.0 videotestsrc num-buffers=1 ! mix. videotestsrc num-buffers=1 ! alpha alpha=0.5 ! mix. videotestsrc num-buffers=1 ! mix. videomixer name=mix ! videoconvert ! xvimagesink So I'm wondering if the re-enabled test won't fail also from time to time.
I have been running (In reply to comment #6) > This is a dup of https://bugzilla.gnome.org/show_bug.cgi?id=684237 Sorry for the duplication, I didn't search properly before posting. I properly state that bug as a duplicate of the otherone, do I need to copy the patches there? > After some testing, it seems better, though I still get the following pipeline > to fail from time to time: > > gst-launch-1.0 videotestsrc num-buffers=1 ! mix. videotestsrc num-buffers=1 ! > alpha alpha=0.5 ! mix. videotestsrc num-buffers=1 ! mix. videomixer name=mix ! > videoconvert ! xvimagesink running while gst-launch-1.0 videotestsrc num-buffers=1 ! mix. videotestsrc \ num-buffers=1 ! alpha alpha=0.5 ! mix. videotestsrc num-buffers=1 ! mix.\ videomixer name=mix ! videoconvert ! xvimagesink; do echo "hey"; done never fails here, could you please send a full debug log to see where it fails > So I'm wondering if the re-enabled test won't fail also from time to time. I have been running the test with .forever for +30mins without any failure. *** This bug has been marked as a duplicate of bug 684237 ***