TagLib 1.10 (TagLib: mpegproperties.h Source File)

mpegproperties.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_MPEGPROPERTIES_H
00027 #define TAGLIB_MPEGPROPERTIES_H
00028 
00029 #include "taglib_export.h"
00030 #include "audioproperties.h"
00031 
00032 #include "mpegheader.h"
00033 
00034 namespace TagLib {
00035 
00036   namespace MPEG {
00037 
00038     class File;
00039     class XingHeader;
00040 
00042 
00048     class TAGLIB_EXPORT Properties : public AudioProperties
00049     {
00050     public:
00055       Properties(File *file, ReadStyle style = Average);
00056 
00060       virtual ~Properties();
00061 
00070       virtual int length() const;
00071 
00078       // BIC: make virtual
00079       int lengthInSeconds() const;
00080 
00086       // BIC: make virtual
00087       int lengthInMilliseconds() const;
00088 
00092       virtual int bitrate() const;
00093 
00097       virtual int sampleRate() const;
00098 
00102       virtual int channels() const;
00103 
00108       const XingHeader *xingHeader() const;
00109 
00113       Header::Version version() const;
00114 
00118       int layer() const;
00119 
00123       bool protectionEnabled() const;
00124 
00128       Header::ChannelMode channelMode() const;
00129 
00133       bool isCopyrighted() const;
00134 
00138       bool isOriginal() const;
00139 
00140     private:
00141       Properties(const Properties &);
00142       Properties &operator=(const Properties &);
00143 
00144       void read(File *file);
00145 
00146       class PropertiesPrivate;
00147       PropertiesPrivate *d;
00148     };
00149   }
00150 }
00151 
00152 #endif