Go to the documentation of this file.
27 #if defined HAVE_CONFIG_H
47 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): num_fields = " << iFields );
57 ID3D_WARNING(
"ID3_FrameImpl::Parse(): out of data at postion " <<
72 ID3D_WARNING(
"ID3_FrameImpl::Parse(): field is null" );
78 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): field is not in scope" );
83 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): setting enc to " << enc );
87 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): parsing field, cur = " << beg );
88 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): parsing field, end = " <<
93 ID3D_WARNING(
"ID3_FrameImpl::Parse(): no data parsed, bad parse" );
100 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): found encoding = " << enc );
103 et.setExitPos(rdr.
getCur());
112 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): reader.getBeg() = " << reader.
getBeg() );
113 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): reader.getCur() = " << reader.
getCur() );
114 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): reader.getEnd() = " << reader.
getEnd() );
117 if (!_hdr.Parse(reader) || reader.
getCur() == beg)
119 ID3D_WARNING(
"ID3_FrameImpl::Parse(): no header to parse" );
122 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): after hdr, getCur() = " << reader.
getCur() );
123 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): found frame! id = " << _hdr.GetTextID() );
126 const size_t dataSize = _hdr.GetDataSize();
127 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): dataSize = " << dataSize );
128 if (reader.
getEnd() < beg + dataSize)
130 ID3D_WARNING(
"ID3_FrameImpl::Parse(): not enough data to parse frame" );
134 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): window getBeg() = " << wr.
getBeg() );
135 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): window getCur() = " << wr.
getCur() );
136 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): window getEnd() = " << wr.
getEnd() );
138 unsigned long origSize = 0;
139 if (_hdr.GetCompression())
142 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): frame is compressed, origSize = " << origSize );
145 if (_hdr.GetEncryption())
148 this->SetEncryptionID(ch);
149 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): frame is encrypted, encryption_id = " << (
int) ch );
152 if (_hdr.GetGrouping())
155 this->SetGroupingID(ch);
156 ID3D_NOTICE(
"ID3_FrameImpl::Parse(): frame is encrypted, grouping_id = " << (
int) ch );
160 this->_ClearFields();
163 bool success =
false;
165 if (!_hdr.GetCompression())
167 success = parseFields(wr, *
this);
172 success = parseFields(csr, *
this);
virtual ID3_FieldID GetID() const =0
virtual pos_type getCur()=0
Return the current position in the reader.
virtual uint32 Get() const =0
Returns the value of the integer field.
int_type readChar()
Read a single character and advance the internal position.
The representative class of an ID3v2 field.
Set a window on the buffer.
pos_type getCur()
Return the current position in the reader.
virtual bool SetEncoding(ID3_TextEnc enc)=0
virtual bool Parse(ID3_Reader &)=0
ID3_C_EXPORT uint32 readBENumber(ID3_Reader &, size_t)
ID3_V2Spec GetSpec() const
virtual pos_type getEnd()
Return the ending position in the reader.
virtual pos_type getBeg()
Return the beginning position in the reader.
virtual bool InScope(ID3_V2Spec spec) const =0
pos_type getBeg()
Return the beginning position in the reader.
void setExitPos(ID3_Reader::pos_type pos)
Fields::iterator iterator
@ ID3FN_TEXTENC
Text encoding (unicode or ASCII)
pos_type getEnd()
Return the ending position in the reader.