author | harlekin <harlekin> | 2002-07-09 12:33:52 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-09 12:33:52 (UTC) |
commit | 2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd (patch) (unidiff) | |
tree | 8ce99f4cde91c9346a4cd6f7029ec1d1308cfb30 /noncore/multimedia/opieplayer2/mediadetect.cpp | |
parent | c0d304c69f6c42328472cd1328d9cad7c2ed4dfb (diff) | |
download | opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.zip opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.tar.gz opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.tar.bz2 |
more gui work
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediadetect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediadetect.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediadetect.cpp b/noncore/multimedia/opieplayer2/mediadetect.cpp new file mode 100644 index 0000000..7deeb2f --- a/dev/null +++ b/noncore/multimedia/opieplayer2/mediadetect.cpp | |||
@@ -0,0 +1,38 @@ | |||
1 | #include <qstring.h> | ||
2 | #include "mediadetect.h" | ||
3 | |||
4 | |||
5 | MediaDetect::MediaDetect() { | ||
6 | } | ||
7 | |||
8 | MediaDetect::~MediaDetect() { | ||
9 | } | ||
10 | |||
11 | char MediaDetect::videoOrAudio( const QString& fileName ) { | ||
12 | if( fileName.right(4) == ".avi" || | ||
13 | fileName.right(4) == ".mpg" || | ||
14 | fileName.right(4) == ".asf" || | ||
15 | fileName.right(4) == ".mov" || | ||
16 | fileName.right(5) == ".mpeg" ) { | ||
17 | return 'v'; | ||
18 | } else if ( fileName.right(4) == ".avi" || | ||
19 | fileName.right(4) == ".mp3" || | ||
20 | fileName.right(4) == ".ogg" || | ||
21 | fileName.right(4) == ".wav" ) { | ||
22 | return 'a'; | ||
23 | } else { | ||
24 | return 'f'; | ||
25 | } | ||
26 | } | ||
27 | |||
28 | bool MediaDetect::isStreaming( const QString& fileName ) { | ||
29 | // ugly | ||
30 | if( fileName.left(4) == "http" ) { | ||
31 | return true; | ||
32 | } else if (fileName.left(3) == "ftp" ) { | ||
33 | return true; | ||
34 | } else { | ||
35 | return false; | ||
36 | } | ||
37 | } | ||
38 | |||