tags..

Mathias Panzenböck grosser.meister.morti at gmx.net
Wed Aug 17 02:23:48 UTC 2011


On 08/17/2011 03:12 AM, Kyle wrote:
> they arent wrapped up because every format doesnt support them..
>
> if you wanted to transfer an image (i assume you mean album art) from one format to the other.. just
> extract the image from one and store it into the other
>
> here is how to extract the image from an mp3
>
> ID3v2::FrameList l = Tag->frameList("APIC");
>
>      if(l.isEmpty())
>          return NULL;
>
>      ID3v2::AttachedPictureFrame *f = static_cast<ID3v2::AttachedPictureFrame *>(l.front());
>
>      Size = f->picture().size();
>
>      char* data = (char*)malloc(Size);
>      memcpy(data, f->picture().data(), Size);
>
>      return data;
>
> you can get any of the non wrapped tags using the frameList.. most of the other formats have
> something similar
>

I think thats the problem. You have to write code for each format. Wouldn't it be possible to make a 
more generalized interface? Like a hashtable with standardized names. (If not then not. The values 
have to be something similar to QVariant.) If the format supports the tag, the hashtable has an 
appropriate entry. And for writing unsupported tags are just ignored.

One could write such a thin on top of taglib, but without proper integration I don't know if it 
would play nice with custom file type resolvers.

> 2011/8/16 <sf_2000 at mail.ru <mailto:sf_2000 at mail.ru>>
>
>     Здравствуйте, Kyle.
>
>     It would be also perfect to have support of the tag 'chap' for mp4
>     files...
>
>     Вы писали Monday, August 15, 2011, 4:34:01 PM:
>
>      > You can get album artist and composer.. they just arent wrapped up
>      > in neat little ->AlbumArtist()/->Composer() functions
>
>     --
>     С уважением,
>     Руслан Драгунов                         mailto:sf_2000 at mail.ru <mailto:sf_2000 at mail.ru>
>
>     _______________________________________________
>     taglib-devel mailing list
>     taglib-devel at kde.org <mailto:taglib-devel at kde.org>
>     https://mail.kde.org/mailman/listinfo/taglib-devel
>
>
>
>
> --
> -Kyle
>
>
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel



More information about the taglib-devel mailing list