TagLib API Documentation
vorbisfile.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 ***************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_VORBISFILE_H
27#define TAGLIB_VORBISFILE_H
28
29#include "taglib_export.h"
30#include "oggfile.h"
31#include "xiphcomment.h"
32#include "vorbisproperties.h"
33
34namespace TagLib {
35
36/*
37 * This is just to make this appear to be in the Ogg namespace in the
38 * documentation. The typedef below will make this work with the current code.
39 * In the next BIC version of TagLib this will be really moved into the Ogg
40 * namespace.
41 * Kept for source compatibility, the typedef in vorbisproperties.h was not
42 * correct in TagLib 1.
43 */
44
45#ifdef DOXYGEN
46 namespace Ogg {
47#endif
48
50
51 namespace Vorbis {
52
53
55
64 {
65 public:
72 File(FileName file, bool readProperties = true,
74
84 File(IOStream *stream, bool readProperties = true,
86
90 ~File() override;
91
92 File(const File &) = delete;
93 File &operator=(const File &) = delete;
94
100 Ogg::XiphComment *tag() const override;
101
102
107 PropertyMap properties() const override;
108
114
119 Properties *audioProperties() const override;
120
126 bool save() override;
127
134 static bool isSupported(IOStream *stream);
135
136 private:
137 void read(bool readProperties);
138
139 class FilePrivate;
141 std::unique_ptr<FilePrivate> d;
142 };
143 } // namespace Vorbis
144
145/*
146 * To keep compatibility with the current version put Vorbis in the Ogg namespace
147 * only in the docs and provide a typedef to make it work. In the next BIC
148 * version this will be removed and it will only exist in the Ogg namespace.
149 * Kept for source compatibility, the typedef in vorbisproperties.h was not
150 * correct in TagLib 1.
151 */
152
153#ifdef DOXYGEN
154 }
155#else
156 namespace Ogg {
157 namespace Vorbis {
158 using File = TagLib::Vorbis::File;
159 } // namespace Vorbis
160 } // namespace Ogg
161#endif
162
163} // namespace TagLib
164
165#endif
ReadStyle
Definition: audioproperties.h:56
@ Average
Read more of the file and make better values guesses.
Definition: audioproperties.h:60
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:65
An implementation of TagLib::File with some helpers for Ogg based formats.
Definition: oggfile.h:51
An implementation of Ogg::File with Vorbis specific methods.
Definition: vorbisfile.h:64
static bool isSupported(IOStream *stream)
Properties * audioProperties() const override
File & operator=(const File &)=delete
File(const File &)=delete
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
PropertyMap setProperties(const PropertyMap &) override
PropertyMap properties() const override
Ogg::XiphComment * tag() const override
An implementation of audio property reading for Ogg Vorbis.
Definition: vorbisproperties.h:59
Ogg Vorbis comment implementation.
Definition: xiphcomment.h:71
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:122
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
const char * FileName
Definition: tiostream.h:59
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55