GNOME Bugzilla – Bug 598682
make check fails due to fpsdisplaysink if xvimagesink does not exist
Last modified: 2009-12-17 23:43:44 UTC
Created attachment 145604 [details] [review] Fail rather than use a sink which is NULL In case fpsdisplaysink cannot create an xvimagesink during its initialization, it will fail later when trying to change state. This causes the generic/states check test to fail. The attached patch solves the problem. However, as suggested by Edward Hervey, a better solution would be to move the initialization to the NULL=>READY state transition.
Thanks! I'll apply the patch soon and also implement the suggestion.
Created attachment 149689 [details] [review] Fail rather than use a sink which is NULL Updated the patch to match recent development in git.
Created attachment 149899 [details] [review] Fail rather than use a sink which is NULL Recent changes has fixed most of the problem. One small fix remains to be done though.
This fixes the problem, but isn't very nice (IMHO). For one, if you fail the state change, please use GST_ELEMENT_ERROR() to post an appropriate error message on the bus. Secondly, it should be sufficient to do the check in the NULL -> READY state change really. Maybe the autovideosink that's now created in the instance init function should really be created there? Also, we should make sure the caller doesn't try to change the video sink via g_object_set_property() while we're in state > NULL, or something along those lines.
I can't see any fpsdisplaysinks on make check here, but my make check is currently full of other errors and I haven't looked why yet. Please reopen if it still isn't fixed for you Module: gst-plugins-bad Branch: master Commit: 87bfdef68379eafefc27b1c413942697f0bac8ee URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=87bfdef68379eafefc27b1c413942697f0bac8ee Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk> Date: Thu Dec 17 11:04:28 2009 -0300 fpsdisplaysink: Internal sink improvements Does some general improvements with the internal sink handling. 1) Do not remove and re-add the ghostpad when changing internal sink 2) Only instantiate the default sink when changing from NULL to READY if there is no other available 3) Avoid changing the internal sink if not on NULL state Fixes #598682