Bugzilla – Bug 113937
GStreamer/cdparanoia gst_pad_query invalid data
Last modified: 2005-08-31 12:06:53 UTC
The gstreamer-cdparanoia plugin reports invalid sector data (always 0) on gst_pad_query() calls for getting disk/track information which is needed to calculate offsets and track durations for CD playback and ripping within Banshee. The problem also affects Goobox (not sure if that's even being shipped though), and has been confirmed on Foresight Linux as well.
Created attachment 48052 [details] Source to testcase demonstrating bug Just running this testcase should exhibit the bug: total_sectors will be 0, while n_tracks should be correct: the number of tracks on the audio CD being tested (/dev/hdc by default). Compile, insert audio CD, wait for it to spin and settle, and then run the program.
Sorry, didn't mean to skip over that.
Gekker says this should be a blocker since we absolutely need to be able to play audio CDs in Banshee.
Do you have the versions of cdparanoia + gstreamer that do work, and the ones that do not work, handy?
Created attachment 48083 [details] Patch against our gstreamer-plugins package, fixes the bug.
Here's a patch that fixes the problem with GStreamer's cdparanoia plugin. The bug is entirely in the plugin, and not caused by any inconsistency in cdparanoia. The problem was that the plugin has to be in "track mode" for a support function, get_first_sector(), to return a non-zero value for sector count. It will then return the sector count of the passed-in track. I just made an exception so that if not in "track mode", it returns the sector count of the entire CD, just as it will return the total number of tracks if that's what you ask for. I changed the reporting function, not get_first_sector() itself, because there is too much code depending on it. Depending on how we're using the plugin's reporting functions in Banshee, there may be further bugs related to this. That is, GST_QUERY_TOTAL with sector_format will return the total length of the CD if no track has been set, and the total length of the *current track* if one has been set. I think any bugs should be dealt with on a case-by-case basis - this one had to be fixed in the plugin, because otherwise there'd be no way to get the total CD length, but others may be better fixed in Banshee. As I understand it, the patch needs review before it can be committed to build.
Here's hpj's second revision, which has solved all of the issues, and makes goobox work again as well. This is what we're sending upstream.
Created attachment 48256 [details] Final Patch This is what is getting sent upstream.
Meant to set this to FIXED.
Why close this before its fixed in the distro? Submitted.