TagLib  2.2.1
vorbisproperties.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_VORBISPROPERTIES_H
27 #define TAGLIB_VORBISPROPERTIES_H
28 
29 #include "taglib_export.h"
30 #include "audioproperties.h"
31 
32 namespace TagLib {
33 
34 /*
35  * This is just to make this appear to be in the Ogg namespace in the
36  * documentation. The typedef below will make this work with the current code.
37  * In the next BIC version of TagLib this will be really moved into the Ogg
38  * namespace.
39  * Kept for source compatibility, the typedef in vorbisproperties.h was not
40  * correct in TagLib 1.
41  */
42 
43 #ifdef DOXYGEN
44  namespace Ogg {
45 #endif
46 
47  namespace Vorbis {
48 
49  class File;
50 
52 
59  {
60  public:
65  Properties(File *file, ReadStyle style = Average);
66 
70  ~Properties() override;
71 
72  Properties(const Properties &) = delete;
73  Properties &operator=(const Properties &) = delete;
74 
80  int lengthInMilliseconds() const override;
81 
85  int bitrate() const override;
86 
90  int sampleRate() const override;
91 
95  int channels() const override;
96 
100  int vorbisVersion() const;
101 
106  int bitrateMaximum() const;
107 
112  int bitrateNominal() const;
113 
118  int bitrateMinimum() const;
119 
120  private:
121  void read(File *file);
122 
123  class PropertiesPrivate;
125  std::unique_ptr<PropertiesPrivate> d;
126  };
127  } // namespace Vorbis
128 
129 /*
130  * To keep compatibility with the current version put Vorbis in the Ogg namespace
131  * only in the docs and provide a typedef to make it work. In the next BIC
132  * version this will be removed and it will only exist in the Ogg namespace.
133  * Kept for source compatibility, the typedef in vorbisproperties.h was not
134  * correct in TagLib 1.
135  */
136 
137 #ifdef DOXYGEN
138  }
139 #else
140  namespace Ogg {
141  namespace Vorbis {
142  using Properties = TagLib::Vorbis::Properties;
143  } // namespace Vorbis
144  } // namespace Ogg
145 #endif
146 
147 } // namespace TagLib
148 
149 #endif
An implementation of Ogg::File with Vorbis specific methods.
Definition: vorbisfile.h:63
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
An implementation of audio property reading for Ogg Vorbis.
Definition: vorbisproperties.h:58
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A simple, abstract interface to common audio properties.
Definition: audioproperties.h:45
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41