filtering playable files in a collection

View: New views
3 Messages — Rating Filter:   Alert me  

filtering playable files in a collection

by Bugzilla from mdione@grulic.org.ar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    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?

--
(Not so) Random fortune:
The Weak Lusethropic Principle states: "As more idiot-proof software becomes
available, more idiots are able to use computers. Idiot-proof software did not
make or cause computer lusers; it simple allowed lusers to use computers where
they could not before."
            -- Ben Cantrick
_______________________________________________
kde-multimedia mailing list
kde-multimedia@...
https://mail.kde.org/mailman/listinfo/kde-multimedia

Re: filtering playable files in a collection

by Bugzilla from thiago@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009


_______________________________________________
kde-multimedia mailing list
kde-multimedia@...
https://mail.kde.org/mailman/listinfo/kde-multimedia

signature.asc (196 bytes) Download Attachment

Re: filtering playable files in a collection

by Bugzilla from kevin.krammer@gmx.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


_______________________________________________
kde-multimedia mailing list
kde-multimedia@...
https://mail.kde.org/mailman/listinfo/kde-multimedia

signature.asc (196 bytes) Download Attachment