[mythtv] [PATCH] FAO Thor (mainly) MythMusic Metadata restructuring...

Colin Guthrie myth at colin.guthr.ie
Sun Sep 26 11:33:06 EDT 2004


Hi,

Thor, further to our discussions about my Album Artist stuff, you said 
that the lack of ID3 writing support for the TPE4 id3v2 tag was a bit of 
a killer for my patch. We then discussed the rehashing of the metadata 
writing code.

Well, I've taken things a bit further, and abstracted things a bit more....

Attached is an incomplete patch (which does compile but is 100% 
UNTESTED!! in terms of it's functionality), which shows what I propose 
in terms of reading/writing metadata to/from files. It's not meant to be 
applied to CVS, it's just meant to highlight what I will do in the next 
couple of weeks when I get the time.

Bascially, I've abstracted out the reading and writing to a separate 
class(es):

tag.h/cpp Abstract Base Class and some methods.
id3v2.h/cpp Derived Class for ID3v2 reading/writing.

I've made the necessary changes to decoder.cpp (just removing some 
stuff) and maddecodder.cpp (changes to commitMetadata() and 
getMetadata()) to use this new structure.

I know the removal for the getMetadatafromfilename() from decoder.cpp 
stops other music formats working, but as I'm sure you'll realise, I 
intend to implement the equivelant of tagid3v2.cpp for Vorbis 
Comment/Ogg/Flac etc., thus removing the need for it.

Basically, all I want is a "good structure, keep going" type reply at 
this stage. Obviously, you may say, "that's stupid, stop now", which is 
really why I'm posting this message, just in case I go off and spend 
ages writing it only for it not to be applied.

I've got some doxygen style comments in the patch, but if desired these 
can be removed prior to application to CVS etc. I just add them out of 
habbit and to keep myself sane!

I've tried to match some coding styles, but not sure about member 
variable vs. local variable naming.... All of this can be changed easily 
enough, tho', so I'm not too worried about that at this stage, more the 
overall structure.

Thanks for any feedback.

Cheers just now.

Col.

-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
|   myth at colin.guthr.ie  |
| http://colin.guthr.ie/ |
+------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metadata.diff
Type: text/x-patch
Size: 26760 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040926/33e968b1/metadata.bin


More information about the mythtv-dev mailing list