GNOME Bugzilla – Bug 337388
Bogus clock-provide messages being created
Last modified: 2006-04-06 13:36:17 UTC
See bug #337386 for some context. In the testcase that was causing this problem, we do the following: 1) Create pipeline. 2) Create bin. 3) Create fakesink 4) Put fakesink in bin 5) Put bin in pipeline At step 5, we get a bogus clock-provide message being created (bogus because fakesink is NOT a clock provider). The reason for this is that, when we add something to a bin (in this case adding a bin to a pipeline), we create the clock-provide message if gst_element_provides_clock() returns TRUE for the element being added. For fakesink, this correctly returns false (so when we add the fakesink to the bin, we don't create a message). However, for the bin, it returns true: we return true in gst_element_provides_clock() if the element has a provide_clock vfunc. For a bin, we always have this vfunc, regardless of whether any of our children provide clocks. This is wrong.
The function could be overriden in a subclass that can provide a clock regardless of the children. You could avoid unneeded messages by checking if the function is the default one, of which the behaviour is known. The message is informational and means that the bin can potentially provide a clock so the message is not 'wrong'.