Version: 4.3.80 (using KDE 4.4.1) OS: Linux Installed from: Mandriva RPMs The Phonon gstreamer backend does not list all available mime types because it only access the 0'th struct of the caps struct. As a result, many file types (including .it , .xm and .s3m files) cannot be dragged and dropped and played in Amarok. Here is a patch that corrects the problem (I will also attach it): --- phonon-4.3.80/gstreamer/backend.cpp.orig 2010-03-18 23:15:48.723577146 +0200 +++ phonon-4.3.80/gstreamer/backend.cpp 2010-03-18 23:16:00.270575574 +0200 @@ -240,10 +240,13 @@ GstCaps *caps = gst_static_pad_template_get_caps (padTemplate); if (caps) { - const GstStructure* capsStruct = gst_caps_get_structure (caps, 0); - QString mime = QString::fromUtf8(gst_structure_get_name (capsStruct)); - if (!availableMimeTypes.contains(mime)) - availableMimeTypes.append(mime); + for (unsigned int struct_idx = 0; struct_idx < gst_caps_get_size (caps); struct_idx++) { + + const GstStructure* capsStruct = gst_caps_get_structure (caps, struct_idx); + QString mime = QString::fromUtf8(gst_structure_get_name (capsStruct)); + if (!availableMimeTypes.contains(mime)) + availableMimeTypes.append(mime); + } } } }
Created attachment 41749 [details] Patch to correct the problem. This is a patch that corrects the problem. I hereby disclaim any ownership on it and licences it under public-domain / CC-Zero.
commit 97555adfca6830c23682f03eba72b8b44ec38f28 Author: Colin Guthrie <cguthrie@mandriva.org> Date: Sat Mar 20 11:57:25 2010 +0000 gstreamer: Include all supported mime types. Shlomi Fish discovered that not all mime types supported by the gstreamer backend were parsed into Phonon. This change ensures that that all mime types are parsed correctly. Thanks to Shlomi for the patch. BUG: 231254 diff --git a/gstreamer/backend.cpp b/gstreamer/backend.cpp index 3a794b0..729a1d3 100644 --- a/gstreamer/backend.cpp +++ b/gstreamer/backend.cpp @@ -240,10 +240,13 @@ QStringList Backend::availableMimeTypes() const GstCaps *caps = gst_static_pad_template_get_caps (padTemplate); if (caps) { - const GstStructure* capsStruct = gst_caps_get_structure (caps, 0); - QString mime = QString::fromUtf8(gst_structure_get_name (capsStruct)); - if (!availableMimeTypes.contains(mime)) - availableMimeTypes.append(mime); + for (unsigned int struct_idx = 0; struct_idx < gst_caps_get_size (caps); struct_idx++) { + + const GstStructure* capsStruct = gst_caps_get_structure (caps, struct_idx); + QString mime = QString::fromUtf8(gst_structure_get_name (capsStruct)); + if (!availableMimeTypes.contains(mime)) + availableMimeTypes.append(mime); + } } } }
reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise.