28 #if defined HAVE_CONFIG_H
40 #include "id3/io_decorators.h"
41 #include "io_strings.h"
42 #include "io_helpers.h"
59 ID3D_NOTICE(
"id3::v2::renderFields(): found encoding = " << enc );
75 if (!this->NumFields())
82 const size_t hdr_size = hdr.
Size();
87 io::StringWriter fldWriter(flds);
89 if (!this->GetCompression())
91 renderFields(fldWriter, *
this);
92 origSize = flds.size();
93 ID3D_NOTICE (
"ID3_FrameImpl::Render(): uncompressed fields" );
97 io::CompressedWriter cr(fldWriter);
98 renderFields(cr, *
this);
100 origSize = cr.getOrigSize();
101 ID3D_NOTICE (
"ID3_FrameImpl::Render(): compressed fields, orig size = " <<
105 size_t fldSize = flds.size();
106 ID3D_NOTICE (
"ID3_FrameImpl::Render(): field size = " << fldSize );
116 uchar eID = this->GetEncryptionID(), gID = this->GetGroupingID();
120 const char *tid = this->GetTextID();
142 io::writeBENumber(writer, origSize,
sizeof(uint32));
143 ID3D_NOTICE(
"ID3_FrameImpl::Render(): frame is compressed, wrote origSize = " << origSize );
148 ID3D_NOTICE(
"ID3_FrameImpl::Render(): frame is compressed, encryption id = " << eID );
153 ID3D_NOTICE(
"ID3_FrameImpl::Render(): frame is compressed, grouping id = " << gID );
The representative class of an ID3v2 field.
virtual uint32 Get() const =0
Returns the value of the integer field.
virtual ID3_FieldID GetID() const =0
virtual bool SetEncoding(ID3_TextEnc enc)=0
virtual bool InScope(ID3_V2Spec spec) const =0
virtual void Render(ID3_Writer &) const =0
ID3_V2Spec GetSpec() const
void Render(ID3_Writer &) const
Fields::const_iterator const_iterator
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.
@ ID3FN_TEXTENC
Text encoding (unicode or ASCII)
ID3_TextEnc
Enumeration of the types of text encodings: ascii or unicode.
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
@ ID3FID_NOFRAME
No known frame.