summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audiofile_tagger.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-09-17 12:58:33 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-09-17 12:58:33 +0000
commitf2b007195cd75b195e38a4cd7757debac73e7792 (patch)
tree90474413776806f02794602bbb495663e07a81ea /libs/ardour/ardour/audiofile_tagger.h
parent6ba5125e991e08a9d117b39a4c337cf453fd015d (diff)
new files from sakari, missed last time
git-svn-id: svn://localhost/ardour2/branches/3.0@3740 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audiofile_tagger.h')
-rw-r--r--libs/ardour/ardour/audiofile_tagger.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h
new file mode 100644
index 0000000000..1f2cbf223c
--- /dev/null
+++ b/libs/ardour/ardour/audiofile_tagger.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2008 Paul Davis
+ Author: Sakari Bergen
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_audiofile_tagger_h__
+#define __ardour_audiofile_tagger_h__
+
+#include <string>
+
+#include <taglib/taglib.h>
+#include <taglib/tag.h>
+#include <taglib/xiphcomment.h>
+
+using std::string;
+
+namespace ARDOUR
+{
+
+class SessionMetadata;
+
+/// Clas with static functions for tagging audiofiles
+class AudiofileTagger
+{
+ public:
+
+ /* Tags file with metadata, return true on success */
+
+ static bool tag_file (string const & filename, SessionMetadata const & metadata);
+
+ private:
+
+ static bool tag_generic (TagLib::Tag & tag, SessionMetadata const & metadata);
+ static bool tag_vorbis_comment (TagLib::Ogg::XiphComment & tag, SessionMetadata const & metadata);
+};
+
+
+
+} // namespace ARDOUR
+
+#endif /* __ardour_audiofile_tagger_h__ */