TagLib 1.11 (TagLib: vorbisproperties.h Source File)

vorbisproperties.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2002 - 2008 by Scott Wheeler
00003     email                : wheeler@kde.org
00004  ***************************************************************************/
00005 
00006 /***************************************************************************
00007  *   This library is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU Lesser General Public License version   *
00009  *   2.1 as published by the Free Software Foundation.                     *
00010  *                                                                         *
00011  *   This library is distributed in the hope that it will be useful, but   *
00012  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014  *   Lesser General Public License for more details.                       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with this library; if not, write to the Free Software   *
00018  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
00019  *   02110-1301  USA                                                       *
00020  *                                                                         *
00021  *   Alternatively, this file is available under the Mozilla Public        *
00022  *   License Version 1.1.  You may obtain a copy of the License at         *
00023  *   http://www.mozilla.org/MPL/                                           *
00024  ***************************************************************************/
00025 
00026 #ifndef TAGLIB_VORBISPROPERTIES_H
00027 #define TAGLIB_VORBISPROPERTIES_H
00028 
00029 #include "taglib_export.h"
00030 #include "audioproperties.h"
00031 
00032 namespace TagLib {
00033 
00034 /*
00035  * This is just to make this appear to be in the Ogg namespace in the
00036  * documentation.  The typedef below will make this work with the current code.
00037  * In the next BIC version of TagLib this will be really moved into the Ogg
00038  * namespace.
00039  */
00040 
00041 #ifdef DOXYGEN
00042   namespace Ogg {
00043 #endif
00044 
00045   namespace Vorbis {
00046 
00047     class File;
00048 
00050 
00056     class TAGLIB_EXPORT Properties : public AudioProperties
00057     {
00058     public:
00063       Properties(File *file, ReadStyle style = Average);
00064 
00068       virtual ~Properties();
00069 
00078       virtual int length() const;
00079 
00086       // BIC: make virtual
00087       int lengthInSeconds() const;
00088 
00094       // BIC: make virtual
00095       int lengthInMilliseconds() const;
00096 
00100       virtual int bitrate() const;
00101 
00105       virtual int sampleRate() const;
00106 
00110       virtual int channels() const;
00111 
00115       int vorbisVersion() const;
00116 
00121       int bitrateMaximum() const;
00122 
00127       int bitrateNominal() const;
00128 
00133       int bitrateMinimum() const;
00134 
00135     private:
00136       Properties(const Properties &);
00137       Properties &operator=(const Properties &);
00138 
00139       void read(File *file);
00140 
00141       class PropertiesPrivate;
00142       PropertiesPrivate *d;
00143     };
00144   }
00145 
00146 /*
00147  * To keep compatibility with the current version put Vorbis in the Ogg namespace
00148  * only in the docs and provide a typedef to make it work.  In the next BIC
00149  * version this will be removed and it will only exist in the Ogg namespace.
00150  */
00151 
00152 #ifdef DOXYGEN
00153   }
00154 #else
00155   namespace Ogg { namespace Vorbis { typedef TagLib::AudioProperties AudioProperties; } }
00156 #endif
00157 
00158 }
00159 
00160 #endif