desktop files spec: Plugin based applications and the MimeType key

Matthias Kretz kretz at kde.org
Sat Oct 7 18:11:36 BST 2006


On Saturday 07 October 2006 14:50, Albert Astals Cid wrote:
> Any suggestion before i start hacking on it?

Just a comment: I have the problem too with Phonon, but it's even more 
complicated because the plugins are not under the control of KDE. It depends 
on what NMM plugins/Xine demuxers and decoders/GST plugins are installed. All 
those media frameworks support a programatical way of retrieving the list of 
mime types which I also have in the Phonon API: 
http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/phonon/html/classPhonon_1_1BackendCapabilities.html#e4

If you use the 
http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/phonon/html/classPhonon_1_1BackendCapabilities.html#e5 
method instead, Phonon will first look at the static mime type list of the 
backend (which has to include all mime types it could possibly support) and 
if it's in there it loads the backend and makes sure the mime type is 
supported. This is used for Konqueror sound previews to only load a Phonon 
backend when it makes sense.

Now that still doesn't solve the problem for an application that uses Phonon 
for playback, it wouldn't know what mime types to put into its .desktop file.

Hmm, /me has evil thoughts:

[Desktop Entry]
...
MimeType[$e]=$(/path/to/kde/bin/list_phonon_mimetypes)

Where list_phonon_mimetypes is a simple app that outputs 
Phonon::BackendCapabilities::knownMimeTypes().

Remains the question about ksycoca caching. I know it is cached, but how/when 
is it invalidated?

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061007/ecf4a4bf/attachment.sig>


More information about the kde-core-devel mailing list