diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch) | |
tree | 9047cf9e6b5c43878d5bf82660adae77ceee097a /noatun/modules/winskin/fileInfo.cpp | |
download | tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/winskin/fileInfo.cpp')
-rw-r--r-- | noatun/modules/winskin/fileInfo.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/noatun/modules/winskin/fileInfo.cpp b/noatun/modules/winskin/fileInfo.cpp new file mode 100644 index 00000000..69f93215 --- /dev/null +++ b/noatun/modules/winskin/fileInfo.cpp @@ -0,0 +1,50 @@ +#include <noatun/app.h> +#include <noatun/playlist.h> + +#include <qstring.h> +#include <kfilemetainfo.h> + +#include "fileInfo.h" + +fileInfo::fileInfo(const PlaylistItem &item) +{ + QString prop; + + prop = item.property("bitrate"); + if (prop.isNull()) + _bps = 0; + else + _bps = prop.toInt(); + + prop = item.property("samplerate"); + if (prop.isNull()) + _KHz = 44100; + else + _KHz = prop.toInt(); + + prop = item.property("channels"); + if (prop.isNull()) + _channelCount = 2; + else + _channelCount = prop.toInt(); +} + +fileInfo::~fileInfo() +{ +} + +unsigned int fileInfo::bps() +{ + return _bps; +} + +unsigned int fileInfo::KHz() +{ + return _KHz; +} + +unsigned int fileInfo::channelCount() +{ + return _channelCount; +} + |