From f2cfda2a54780868dfe0af7bd652fcd4906547da Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 1 Mar 2010 19:09:31 +0000 Subject: Added KDE3 version of SoundKonverter git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/metadata/optimfrog/Makefile.am | 6 ++++++ .../optimfrog/taglib_optimfrogfiletyperesolver.cpp | 21 +++++++++++++++++++++ .../optimfrog/taglib_optimfrogfiletyperesolver.h | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100755 src/metadata/optimfrog/Makefile.am create mode 100755 src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.cpp create mode 100755 src/metadata/optimfrog/taglib_optimfrogfiletyperesolver.h (limited to 'src/metadata/optimfrog') 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 +// modified 2006 Daniel Faust +// See COPYING file for licensing information + +#include "taglib_optimfrogfiletyperesolver.h" +#include + +#include + +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 +// modified 2006 Daniel Faust +// See COPYING file for licensing information + +#ifndef TAGLIB_OPTIMFROGFILETYPERESOLVER_H +#define TAGLIB_OPTIMFROGFILETYPERESOLVER_H + +#include +#include + + +class OptimFrogFileTypeResolver : public TagLib::FileRef::FileTypeResolver +{ + TagLib::File *createFile(const char *fileName, + bool readAudioProperties, + TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; +}; + +#endif -- cgit v1.2.1