mpegheader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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