kirankoyande / php-reader

Automatically exported from code.google.com/p/php-reader
0 stars 0 forks source link

Support for reading ID3v2.3 tags #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We are working on implementing ID3v2.3 and possibly ID3v2.2 read support.

Original issue reported on code.google.com by wphil...@gmail.com on 26 Mar 2008 at 7:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Support for 2.3.0 read is plausible, but I don't think 2.2.0 can be supported 
without
making a separate class for that. The difference between 2.2 and the newer 
standards
is notable.

Nevertheless, support for 2.3.0 would also require major changes to the class. 
The
standard specifies completely different extended header, has a dozen new (or
deprecated, rather) frames, and writes all the size information in big-endian
32-integers that are not safesynch'ed. For this to work there must be some sort 
of an
option passed to the classes.

Original comment by svollbehr on 27 Mar 2008 at 8:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
sorry I haven't been on for a while, but question, couldn't you just have the 
reader
get the subversion of ID3v2 (like you already do) and then have an if clause 
whereby
if the version is 2.3 then read the size (which is really the big thing) as not
safesynch'ed, and if it's 2.4 then read the size as being safesync'ed...? that 
way
there would be no extra switch, and it would work 100% of the time. I think the
version variable is $id3->getVersion, so you even already have that built... 
all you
would have to do is build the if statement inside the getSize or whatever that's
called... no? I'll work on it and see if I can't come up with something.

Original comment by wphil...@gmail.com on 3 Apr 2008 at 9:26

GoogleCodeExporter commented 9 years ago
Yes, that would be the point in passing an option to the classes. It is 
set/read with
with setOptions/getOptions methods of each class.

What I'm still wondering is how to get that ExtendedHeader work the ID3v2.3 
style. I
would almost have to create two separate classes for that and inherit both from 
an
abstract ExtendedHeader class and then use the options to see which one to
instantiate. I have to see if that works in practise.

Original comment by svollbehr on 4 Apr 2008 at 6:54

GoogleCodeExporter commented 9 years ago
Managed to fit everything in one class. Version is detected automatically and 
write
defaults to versio 4.0. I will put the code to the next release.

Original comment by svollbehr on 15 Apr 2008 at 12:13