Rockbox

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Patches
  • Category ID3 / meta data
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.12
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Hendricks266 - 2012-12-31

FS#12795 - Album art for FLAC and Ogg

I am working on adding album art support for FLAC and Ogg files. FLAC looks straightfoward, but there is a design problem with Ogg.

https://wiki.xiph.org/VorbisComment#Cover_art

The struct containing the image and associated data is base64 encoded. I can't just set id3→albumart.pos to a location in the file like all other supported album art formats (and FLAC). Obivously I could allocate memory for the decoded base64 data, but it would have to be deallocated later to prevent a leak.

On IRC, nick_p suggested: "how about adding a new id3 struct element id3→albumart.base64_encoded=true and decoding it when needed on the fly?" This sounds like a good idea, with one issue: it's not the album art alone that is base64 encoded, but the data struct described here:

http://flac.sourceforge.net/format.html#metadata_block_picture

I can test to see if I can parse the beginning of the base64 block, then set the pos pointer to the middle of of the block (with the id3 struct addition) and see if it will still decode.

I believe unhelpful suggested years ago when he implemented our jpeg decoder that ogg art could be implemented by adding another jpeg parser, this one for a base64 coded jpeg stream.

nls commented on 2013-06-09 21:04

Shouldn't it be possible to decode the base64 data in place and then pass it to the regular jpeg decoder?

We have a rather similar situation for mp3 album art if the id3v2 tag has the "unsynchronized" bit set. Currently we ignore such album art.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing