Re: [Proposal] id3v1

From: Date: Sun, 06 Jun 2004 15:42:45 +0000
Subject: Re: [Proposal] id3v1
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-729@lists.php.net to get a copy of this message
Hi Wez,
Just a quick note to say that I don't have a problem with putting this into PECL. Great! And you are the king, if I remember correctly :)
In response to your earlier email, I think naming the extension "id3" is better than "id3v1" as it make things easier for the end user when you write support for later versions. OK. Should I also rename the functions to reflect the extension name or should I later add id3v2_get_tag()?
One comment on your code: you should use the ENFORCE_SAFE_MODE|STREAM_MUST_SEEK flags in addition to REPORT_ERRORS when you open your stream. The first of these should be self-explanatory, the latter is required to make the stream seekable when opening remote files. OK, I'll adjust this.
I think you can drop most of the functions and just stick with the get_tag() function. This will make things much simpler for you when you add support for newer tag versions as you won't need to maintain any state in between function calls. That would require the user to always pass an array, when updating ID3 information. I'm not sure, whether this is nice for the user, although it would make my life easier :)
One question: is it possible to store information in a stream structure? I thought I once read of stream->abstract or something like this... I'd like to store the version information once I've retrieved it and this would be an easy way to do it... This would also allow me to implement a id3_get_version() and id3_set_version() to adjust the tag... Stephan

« previous php.pecl.dev (#729) next »