filtering playable files in a collection

Kevin Krammer kevin.krammer at gmx.at
Thu Sep 3 20:59:15 BST 2009


On Thursday, 2009-09-03, Thiago Macieira wrote:
> Em Quinta-feira 3. Setembro 2009, às 06.38.45, Marcos Dione escreveu:
> >     I'm toying with phonon for a test media player. one of the things
> > this media player is to scan a directory for playable files. now, I know
> > I can ask the phonon backen for the mimetypes playable with it, but how
> > do I filter the files found? f.i., how do I get the mimetype of a file?
> > one simple solution would be to filter by extension, but then I would
> > have to maintain the list of valid extensions and I don't like the
> > solution anyways. so, any ideas? how do other players do it?
>
> KDE has classes for detecting the MIME type of a file.

E.g.KMimeType::findByPath() or KMimeType::findByUrl()

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20090903/123394cc/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list