[ID3 Dev] Padding

Ion Todirel iontodirel at yahoo.co.uk
Wed Aug 24 03:02:00 PDT 2005


Thanks.

Ben Bennett <fiji at ayup.limey.net> wrote:On Tue, Aug 23, 2005 at 11:12:42PM +0100, Ion Todirel wrote:
> thanks very much Ben, i stiil dont understand why footer and padding are mutually exclusive? if i have this situation, all sems to be OK?
> 
> 
> 
> 
> 

> 
> 
> 

The footer doesn't work as you have indicated here. The footer is at
the end of a tag so:

[The following is not a legal layout due to padding and footer]









Would be the right layout. Except that as soon as you hit padding it
means that there is padding for the rest of the tag size. In the case
above the footer doesn't make sense since you can't find it easily (it
is primarily for when the tag is appended).

So if you have a totally appended tag:

[Also not legal]









The footer now makes sense since you find it easily by scanning
backwards and then you can find the tag start and parse normally.
Except that there is no real need for padding since when you are so
close to the end of the file it is easy to rewrite the remainder to
grow or shrink the tag.


> and second problem:
> 
> here is a simple tag:
> 
> 
> <"frame ID" header><"frame ID" content>
> ...
> <"frame IDi" header><"frame IDi" content>
> ...
> <"frame IDn" header><"frame IDn" content> (last frame (normal frame))
> 
> 
(lets say 100%)
> 
> 
> 

I am not sure what you mean by 100%. If you mean 100% of the
remainder of the tag size, then okay, but padding always has to be
100% of the remainder. So lets call it 100 bytes.

> 
> Ben, way just not add two new frames like this?:
> 
> 
> <"frame ID" header><"frame ID" content>
> ...
> <"frame IDi" header><"frame IDi" content>
> ...
> <"frame IDn" header><"frame IDn" content>
> 
> <"frame IDn+1" content><"frame IDn+1" content> (added frame)
> 
> <"frame IDn+2" content><"frame IDn+2" content> (added frame) 
> 
(after adding two frames padding = padding - x bytes) 
> 
> 

If X = the size of the 2 new frames, then that is exactly what you
would do.

> but add like you say?:
> 
> 
> <"frame ID1" header>
> <"frame ID2" header>
> <"frame ID3" header><"frame ID3" content>
> ...
> <"frame IDi" header><"frame IDi" content>
> ...
> <"frame IDn" header><"frame IDn" content> (last frame (normal frame))
> 
> <"frame ID1" content> 
> <"frame ID2" content> 
> 
(same situation) 
> 
> 

I did not mean to imply this and have confused you. The previous case
is what you would do.

-ben

---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org



		
---------------------------------
How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20050824/2477d867/attachment.html>


More information about the ID3v2 mailing list