Re: Re: [mad-user] How to manipulate both V1 and V2 tags in the same file

Cedric Tefft <[email protected]> Tue, 21 Sep 2004 02:44:23 -0700
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
Rob Leslie wrote:

> On Sep 9, 2004, at 8:55 PM, Cedric Tefft wrote:
>
>>> Accordingly, it's not possible to access the V1 and V2 information 
>>> as separate tags with the file interface. If you really want to do 
>>> this, you can use the tag parsing and rendering routines to maintain 
>>> separate tag structures and data, but you'll have to read and write 
>>> the data from the file yourself.
>>
>>
>> I'm preared to do this if necessary, however it occurs to me that 
>> what I'll end up doing is rewriting, almost verbatim, functions that 
>> already exist in libid3tag (new_file() and the like).  The only 
>> reason I couldn't use the library functions is that they aren't 
>> exported to the API.  This seems like a bit of a waste since I have 
>> to link to the library anyway.
>>
>> Would you be willing to accept a few patches which expose a bit more 
>> of the library's internals to the API?
>
>
> I'll consider it, but it seems you should not have to duplicate much 
> functionality. Once you have a tag structure containing the desired V1 
> data, it is very easy to render and apply to a file.

True, but there's no way to read the contents of any *existing* V1 tag 
(not if there's a V2 tag present, anyway).  All you can do is create a 
new one from scratch and overwrite the old one.

I guess this might make more sense if I explained what I'm doing.  I 
maintain a general-purpose ID3 tagging tool that I'm trying to upgrade 
to support V2 tags.   I believe in the philosophy that the best programs 
are the ones that allow users to do things the developers never thought 
of.  While I don't personally have a reason to manipulate V1 tags 
independently of V2 tags, I think a general-purpose tag manipulation 
tool should be flexible enough to let the user do that if he really wants to

I think your tagging library is wonderful -- and it seems to have all 
the tag minipulation code I need, I just keep bumping up against a few 
minor issues where, in order to let the user have complete control over 
all aspects of tagging, I need access to some things the library doesn't 
export to the API.

I haven't made any modifications to the library yet, but just off the 
top of my head I think I'd only need a few additional functions like:

id3_file_numtags(struct id3_file const *)
id3_file_specifictag(struct id3_file const *, int tagnumber)

possibly:

id3_file_fpopen(FILE *file_pointer, enum id3_file_mode)

maybe an additional flag and some things that aren't obvious to me at 
this point.  Shouldn't be anything major and certainly nothing that 
would break backward compatibility.

Anyway, if you like I'll work up the changes and send them over.

Thx,

- Cedric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.