Cover of flac file

Lukáš Lalinský lalinsky at gmail.com
Wed Oct 17 08:00:49 UTC 2012


On Tue, Oct 16, 2012 at 7:26 PM, Гриша Ваника <grish.vanika at gmail.com> wrote:
> But it doesn't work. Function pictureList() of TagLib::FLAC::File always
> return empty list (file is valid and has cover) and file does not have ID3v2
> tag.
>
> I test it on Windows 32 bit and Ubuntu 12.04 32 bit ( TagLib 1.8 ). Can you
> help me?

Are you sure the file has the images attached the official way? Can
you run metaflac --list on the file and post the results? It should
have a block of type "6 (PICTURE)" in it.

> And one another question. What about initializing TagLib::FileRef with
> wchar_t* string on not Windows OS?
> I mean TagLib::FileName type
>
[...]
>
> I can't work with TagLib::FileRef and wide characters string?
>
> According to the implementation of FileName class it will work fine on not
> Windows OS too...

There are two reasons:

 1. In order to keep backward compatibility, we had to keep
non-Windows as char*. Windows was not supported by TagLib before we
had this change, so we could change the ABI for Windows, but not for
other platforms.

 2. Filenames on other UNIX based OSes (with the exception of OS X)
are byte strings, which don't necessarily need to have to be encoded
in a particular Unicode encoding. If you would send a wchar_t* string
to TagLib, it would have to somehow figure out how to convert it to
char*. This would be just guess work based on the current locale or
something like that. This is best done in the application code, not in
TagLib.

Lukas


More information about the taglib-devel mailing list