четверг, 10 июня 2010 г.

ID3

Binary ID3;

StartMetadataKey ID3(offset=0, size=3);

If(getValue(ID3)!=”ID3”) exit;

MetadataKye HeaderFlag(start, offset=3, size=1);

MeatdataKey ID3_size(start, offset=6, size=4);

MetadataSize=getValue(ID3_size);

 

If(getValue(HeaderFlag)[6])

{

                MetadataKey ExHeaderSize(start, offset=10, size=4);

                MetadataKey FirstFrameID(ExHeaderSize, offset=getValue(ExHeaderSize)+10, size=4);

                MetadataSize -=(10+getValue(ExHeaderSize));

}

Else

                MetadataKey FirstFrameID(start, offset=10, size=4);

Key=FirstFrameID;

While(MetadataSize>0)

{

                MetadataKey size(key, offset=4, size=4);

                If(getValue(key)==”TALB”)

                {

                               MetadataKey encoding(key, offset=10, size=1);

                               SetTag Album(getVakue(encoding) , getValueByLink(encoding, offset=1, size=getValue(size)-1));

                }

If(getValue(key)==”TCOM”)

                {

                               MetadataKey encoding(key, offset=10, size=1);

                               SetTag Composer(getVakue(encoding) , getValueByLink(encoding, offset=1, size=getValue(size)-1));

                }

                If(getValue(key)==”TDAT”)

                {

                               MetadataKey encoding(key, offset=10, size=1);

                               SetTag Date(getVakue(encoding) , getValueByLink(encoding, offset=1, size=getValue(size)-1));

                }

 

                MetadataSize -=(10+getValue(size));

                MetadataKey newKey(key, offset=10+geValue(size), size=4);

                Key=newKey;

}

Комментариев нет:

Отправить комментарий