diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
commit | f2cfda2a54780868dfe0af7bd652fcd4906547da (patch) | |
tree | c6ac23545528f5701818424f2af5f79ce3665e6c /src/metadata/optimfrog | |
download | soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip |
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/metadata/optimfrog')
-rwxr-xr-x | src/metadata/optimfrog/Makefile.am | 6 | ||||
-rwxr-xr-x | src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.cpp | 21 | ||||
-rwxr-xr-x | src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.h | 19 |
3 files changed, 46 insertions, 0 deletions
diff --git a/src/metadata/optimfrog/Makefile.am b/src/metadata/optimfrog/Makefile.am new file mode 100755 index 0000000..f2b7e6b --- /dev/null +++ b/src/metadata/optimfrog/Makefile.am @@ -0,0 +1,6 @@ +INCLUDES = $(all_includes) $(taglib_includes) +METASOURCES = AUTO +libtagoptimfrog_la_LDFLAGS = $(all_libraries) +noinst_LTLIBRARIES = libtagoptimfrog.la +noinst_HEADERS = taglib_optimfrogfiletyperesolver.h +libtagoptimfrog_la_SOURCES = taglib_optimfrogfiletyperesolver.cpp diff --git a/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.cpp b/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.cpp new file mode 100755 index 0000000..13cde6a --- /dev/null +++ b/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.cpp @@ -0,0 +1,21 @@ +// (c) 2006 Martin Aumueller <[email protected]> +// modified 2006 Daniel Faust <[email protected]> +// See COPYING file for licensing information + +#include "taglib_optimfrogfiletyperesolver.h" +#include <taglib/mpcfile.h> + +#include <string.h> + +TagLib::File *OptimFrogFileTypeResolver::createFile(const char *fileName, + bool readProperties, + TagLib::AudioProperties::ReadStyle propertiesStyle) const +{ + const char *ext = strrchr(fileName, '.'); + if(ext && !strcasecmp(ext, ".ofr")) + { + return new TagLib::MPC::File(fileName, readProperties, propertiesStyle); + } + + return 0; +} diff --git a/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.h b/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.h new file mode 100755 index 0000000..b277ed5 --- /dev/null +++ b/src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.h @@ -0,0 +1,19 @@ +// (c) 2006 Martin Aumueller <[email protected]> +// modified 2006 Daniel Faust <[email protected]> +// See COPYING file for licensing information + +#ifndef TAGLIB_OPTIMFROGFILETYPERESOLVER_H +#define TAGLIB_OPTIMFROGFILETYPERESOLVER_H + +#include <taglib/tfile.h> +#include <taglib/fileref.h> + + +class OptimFrogFileTypeResolver : public TagLib::FileRef::FileTypeResolver +{ + TagLib::File *createFile(const char *fileName, + bool readAudioProperties, + TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; +}; + +#endif |