![]() |
|
00001 /*************************************************************************** 00002 copyright : (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 00019 * USA * 00020 ***************************************************************************/ 00021 00022 #ifndef TAGLIB_VORBISPROPERTIES_H 00023 #define TAGLIB_VORBISPROPERTIES_H 00024 00025 #include "audioproperties.h" 00026 00027 namespace TagLib { 00028 00029 /* 00030 * This is just to make this appear to be in the Ogg namespace in the 00031 * documentation. The typedef below will make this work with the current code. 00032 * In the next BIC version of TagLib this will be really moved into the Ogg 00033 * namespace. 00034 */ 00035 00036 #ifdef DOXYGEN 00037 namespace Ogg { 00038 #endif 00039 00040 namespace Vorbis { 00041 00042 class File; 00043 00045 00051 class Properties : public AudioProperties 00052 { 00053 public: 00058 Properties(File *file, ReadStyle style = Average); 00059 00063 virtual ~Properties(); 00064 00065 // Reimplementations. 00066 00067 virtual int length() const; 00068 virtual int bitrate() const; 00069 virtual int sampleRate() const; 00070 virtual int channels() const; 00071 00075 int vorbisVersion() const; 00076 00081 int bitrateMaximum() const; 00082 00087 int bitrateNominal() const; 00088 00093 int bitrateMinimum() const; 00094 00095 private: 00096 Properties(const Properties &); 00097 Properties &operator=(const Properties &); 00098 00099 void read(); 00100 00101 class PropertiesPrivate; 00102 PropertiesPrivate *d; 00103 }; 00104 } 00105 00106 /* 00107 * To keep compatibility with the current version put Vorbis in the Ogg namespace 00108 * only in the docs and provide a typedef to make it work. In the next BIC 00109 * version this will be removed and it will only exist in the Ogg namespace. 00110 */ 00111 00112 #ifdef DOXYGEN 00113 } 00114 #else 00115 namespace Ogg { namespace Vorbis { typedef TagLib::AudioProperties AudioProperties; } } 00116 #endif 00117 00118 } 00119 00120 #endif