32#include "io_helpers.h"
59 bytesUsed +=
_info->extended_bytes;
82 io::writeUInt28(writer, 6);
83 io::writeBENumber(writer, 1, 1);
84 io::writeBENumber(writer, 0, 1);
88 io::writeBENumber(writer, 6,
sizeof(uint32));
89 for (
size_t i = 0; i < 6; ++i)
103 io::ExitTrigger et(reader);
106 ID3D_NOTICE(
"ID3_TagHeader::Parse(): not an id3v2 header" );
124 std::clog <<
"id3lib: ID3v2." <<
static_cast<int>(major) <<
"."
125 <<
static_cast<int>(minor)
126 <<
" tag found, but only ID3v2.3.0 and earlier are supported; "
127 <<
"this tag may not be read correctly" << std::endl;
140 _info->extended_bytes = 0;
143 et.setExitPos(reader.
getCur());
159 uint16 tmpval = io::readBENumber(reader, 2);
168 _info->extended_bytes = 14;
171 _info->extended_bytes = 10;
183 io::readUInt28(reader);
184 const int extflagbytes = reader.
readChar();
186 for (i = 0; i < extflagbytes; ++i)
198 const int extheaderflagdatasize = reader.
readChar();
199 extrabytes += extheaderflagdatasize;
209 const int extheaderflagdatasize = reader.
readChar();
210 extrabytes += extheaderflagdatasize;
220 const int extheaderflagdatasize = reader.
readChar();
221 extrabytes += extheaderflagdatasize;
226 _info->extended_bytes = 5 + extflagbytes + extrabytes;
234 _info->extended_bytes = 0;
virtual pos_type setCur(pos_type pos)=0
Set the value of the current position for reading.
virtual pos_type getCur()=0
Return the current position in the reader.
virtual size_type readChars(char_type buf[], size_type len)=0
Read up to len characters into buf and advance the internal position accordingly.
virtual int_type readChar()
Read a single character and advance the internal position.
static size_t IsV2Tag(const uchar *)
Analyses a buffer to determine if we have a valid ID3v2 tag header.
virtual size_type writeChars(const char_type buf[], size_type len)=0
Write up to len characters into buf and advance the internal position accordingly.
virtual int_type writeChar(char_type ch)
Write a single character and advance the internal position.
static const int_type END_OF_WRITER
uchar ID3_V2SpecToRev(ID3_V2Spec spec)
ID3_V2Spec ID3_VerRevToV2Spec(uchar ver, uchar rev)
uchar ID3_V2SpecToVer(ID3_V2Spec spec)