32#include "io_helpers.h"
60 bytesUsed +=
_info->extended_bytes;
83 io::writeUInt28(writer, 6);
84 io::writeBENumber(writer, 1, 1);
85 io::writeBENumber(writer, 0, 1);
89 io::writeBENumber(writer, 6,
sizeof(uint32));
90 for (
size_t i = 0; i < 6; ++i)
104 io::ExitTrigger et(reader);
107 ID3D_NOTICE(
"ID3_TagHeader::Parse(): not an id3v2 header" );
126 std::getenv(
"ID3LIB_WARN_UNSUPPORTED") !=
NULL)
128 std::clog <<
"id3lib: ID3v2." <<
static_cast<int>(major) <<
"."
129 <<
static_cast<int>(minor)
130 <<
" tag found, but only ID3v2.3.0 and earlier are supported; "
131 <<
"this tag may not be read correctly" << std::endl;
144 _info->extended_bytes = 0;
147 et.setExitPos(reader.
getCur());
163 uint16 tmpval = io::readBENumber(reader, 2);
172 _info->extended_bytes = 14;
175 _info->extended_bytes = 10;
187 io::readUInt28(reader);
188 const int extflagbytes = reader.
readChar();
190 for (i = 0; i < extflagbytes; ++i)
202 const int extheaderflagdatasize = reader.
readChar();
203 extrabytes += extheaderflagdatasize;
213 const int extheaderflagdatasize = reader.
readChar();
214 extrabytes += extheaderflagdatasize;
224 const int extheaderflagdatasize = reader.
readChar();
225 extrabytes += extheaderflagdatasize;
230 _info->extended_bytes = 5 + extflagbytes + extrabytes;
238 _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)