Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mpegheader.h

Go to the documentation of this file.
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_MPEGHEADER_H
00023 #define TAGLIB_MPEGHEADER_H
00024 
00025 namespace TagLib {
00026 
00027   class ByteVector;
00028 
00029   namespace MPEG {
00030 
00032 
00040     class Header
00041     {
00042     public:
00046       Header(const ByteVector &data);
00047 
00051       Header(const Header &h);
00052 
00056       virtual ~Header();
00057 
00062       bool isValid() const;
00063 
00067       enum Version {
00069         Version1 = 0,
00071         Version2 = 1,
00073         Version2_5 = 2
00074       };
00075 
00079       Version version() const;
00080 
00084       int layer() const;
00085 
00089       bool protectionEnabled() const;
00090 
00094       int bitrate() const;
00095 
00099       int sampleRate() const;
00100 
00104       bool isPadded() const;
00105 
00110       enum ChannelMode {
00112         Stereo        = 0,
00114         JointStereo   = 1,
00116         DualChannel   = 2,
00118         SingleChannel = 3
00119       };
00120 
00124       ChannelMode channelMode() const;
00125 
00129       bool isCopyrighted() const;
00130 
00134       bool isOriginal() const;
00135 
00139       int frameLength() const;
00140 
00144       Header &operator=(const Header &h);
00145 
00146     private:
00147       void parse(const ByteVector &data);
00148 
00149       class HeaderPrivate;
00150       HeaderPrivate *d;
00151     };
00152   }
00153 }
00154 
00155 #endif

Generated on Mon Jun 7 12:51:47 2004 for TagLib by doxygen 1.3.4