1 /***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 ***************************************************************************/
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. *
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. *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
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 ***************************************************************************/
26 #ifndef TAGLIB_VORBISPROPERTIES_H
27 #define TAGLIB_VORBISPROPERTIES_H
29 #include "taglib_export.h"
30 #include "audioproperties.h"
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
49 //! An implementation of audio property reading for Ogg Vorbis
52 * This reads the data from an Ogg Vorbis stream found in the AudioProperties
56 class TAGLIB_EXPORT Properties : public AudioProperties
60 * Create an instance of Vorbis::Properties with the data read from the
61 * Vorbis::File \a file.
63 Properties(File *file, ReadStyle style = Average);
66 * Destroys this VorbisProperties instance.
68 virtual ~Properties();
72 virtual int length() const;
73 virtual int bitrate() const;
74 virtual int sampleRate() const;
75 virtual int channels() const;
78 * Returns the Vorbis version, currently "0" (as specified by the spec).
80 int vorbisVersion() const;
83 * Returns the maximum bitrate as read from the Vorbis identification
86 int bitrateMaximum() const;
89 * Returns the nominal bitrate as read from the Vorbis identification
92 int bitrateNominal() const;
95 * Returns the minimum bitrate as read from the Vorbis identification
98 int bitrateMinimum() const;
101 Properties(const Properties &);
102 Properties &operator=(const Properties &);
106 class PropertiesPrivate;
107 PropertiesPrivate *d;
112 * To keep compatibility with the current version put Vorbis in the Ogg namespace
113 * only in the docs and provide a typedef to make it work. In the next BIC
114 * version this will be removed and it will only exist in the Ogg namespace.
120 namespace Ogg { namespace Vorbis { typedef TagLib::AudioProperties AudioProperties; } }