From py.thoulon at gmail.com Mon Aug 22 00:00:27 2005 From: py.thoulon at gmail.com (Pyt) Date: Mon, 22 Aug 2005 09:00:27 +0200 Subject: [ID3 Dev] Padding In-Reply-To: <20050820195204.7145.qmail@web86907.mail.ukl.yahoo.com> References: <20050820195050.53484.qmail@web86904.mail.ukl.yahoo.com> <20050820195204.7145.qmail@web86907.mail.ukl.yahoo.com> Message-ID: Padding is the bunch of null chars that lie between the end of the last frame and the end of the tag (the tag size, as given in the tag header, includes padding). A null char where you would expect a frame ID indicates start of padding (unless you're past the end of the tag). Rgds, Pyt. On 8/20/05, Ion Todirel wrote: > > > > *Ion Todirel * wrote: > > Please help me, how to detect padding? four zeroed chars? > > ------------------------------ > To help you stay safe and secure online, we've developed the all new *Yahoo! > Security Centre* > . > > ------------------------------ > 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: From py.thoulon at gmail.com Tue Aug 23 23:37:31 2005 From: py.thoulon at gmail.com (Pyt) Date: Wed, 24 Aug 2005 08:37:31 +0200 Subject: [ID3 Dev] Padding In-Reply-To: <20050823210026.70185.qmail@web86903.mail.ukl.yahoo.com> References: <20050823210026.70185.qmail@web86903.mail.ukl.yahoo.com> Message-ID: On 8/23/05, Ion Todirel wrote: > > Pyt please help me, i don't know if i understand good: > Ben fired faster than I could... :-) Cheers, Pyt. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iontodirel at yahoo.co.uk Wed Aug 24 03:02:00 2005 From: iontodirel at yahoo.co.uk (Ion Todirel) Date: Wed, 24 Aug 2005 11:02:00 +0100 (BST) Subject: [ID3 Dev] Padding In-Reply-To: <20050824004533.GA31513@ayup.limey.net> Message-ID: <20050824100201.50651.qmail@web86904.mail.ukl.yahoo.com> Thanks. Ben Bennett 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: From iontodirel at yahoo.co.uk Sun Aug 28 07:05:08 2005 From: iontodirel at yahoo.co.uk (Ion Todirel) Date: Sun, 28 Aug 2005 15:05:08 +0100 (BST) Subject: [ID3 Dev] Syncsafe integers and 2.3/2.4 In-Reply-To: <20050828003147.GA23857@ayup.limey.net> Message-ID: <20050828140508.15200.qmail@web86903.mail.ukl.yahoo.com> Windows Media Player, has a SDK for developers, if Player can read tag, then SDK provide this functionality. If iTunes has SDK use it. Way iTunes does'nt support ID3v2? Ben Bennett wrote: On Sat, Aug 27, 2005 at 02:18:27PM +0100, Ion Todirel wrote: > If you wont to understand how something works you mast broks it in > parts. Play with Mirosoft Windows Media Player SDK 10 or with > Windows Media Format 9.5 SDK (in .NET), check winamp, I understand how the spec is supposed to work and have tested the behavior with a ton of tag writing things. The behavior is mixed. iTunes is not the only broken implementation, but there are some that gets it right. > way iTunes is so important for you? its more important to support > standards! Yes, but iTunes is a large portion of the market. And saying "we don't support iTunes, because Apple can't RTFM" is not the best option. > When in some case something doesn't work its best to not do it, in > this case heuristical algoritm, in some cases it will not work. So. Better than blindly crashing all of the time. At least this way it will work most of the time. And when it breaks I will add more heuristics. "Be pedantic about what yuou write and liberal about what you accept" > Like i say, way iTunes? Adressed above. -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: From fiji at ayup.limey.net Tue Aug 23 17:45:33 2005 From: fiji at ayup.limey.net (Ben Bennett) Date: Tue, 23 Aug 2005 20:45:33 -0400 Subject: [ID3 Dev] Padding In-Reply-To: <20050823221243.41855.qmail@web86908.mail.ukl.yahoo.com> References: <20050823211031.GA26928@ayup.limey.net> <20050823221243.41855.qmail@web86908.mail.ukl.yahoo.com> Message-ID: <20050824004533.GA31513@ayup.limey.net> 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%) >