PDA

View Full Version : Taglib 1.8 on windows 7 is not working properly as on windows XP



walidos
15th October 2012, 23:00
Hello,

I compiled taglib 1.8 using Mingw succesfully, then i integrated it into a Qt project. The purpuse is to remove ID3 Tag from mp3 files.

This code :


void MainWindow::removeTagFromFile(QByteArray &fileContent)
{
TagLib::ByteVector byteVector(fileContent.constData());
TagLib::ID3v2::FrameFactory *frame = TagLib::ID3v2::FrameFactory::instance();
TagLib::IOStream *vectorStream = new TagLib::ByteVectorStream(byteVector);
TagLib::MPEG::File file(vectorStream, frame);
file.strip();
file.save();
}
Compile and works fine on XP. Compile and doesn't work as expected on Windows 7. Taking the ".exe compiled on XP" to seven do not solve the problem.

is it weird ? i'm afraid that this is a bug in Taglib, does it make sense ? Any idea or an explanation is welcome, Thanks in advance.

You can download the project here (https://docs.google.com/open?id=0B4oIPD6jAmQOS3ZhMXdNenRoWGM)

I'm writing a tutorial in french about details of compilation and integration into a Qt project, i'll write one in english if there is interested people.

Thanks in advance for any kind of help.

ChrisW67
15th October 2012, 23:48
What does this have to do with Qt? If TagLib does not compile for some unspecified reason then surely that is a TagLib problem. If you think the reason has something to do with Qt then you'll need to provide some actual information about what the problem is.


Taking the ".exe compiled on XP" to seven do not solve the problem.
This has nothing to do with compilation at all. If the exe compiled on XP does not run on Windows 7 then either:

It does not run on XP either or, more likely,
You are not deploying the the required libraries and plugins.

oswalidos
16th October 2012, 14:04
Exacty, this is weird and i don't know what is the problem :(
you can download the project and just run the .exe, on windows 7 you'll see audio meta-data in GUI, but for windows XP you can't see meta-data and this is the purpose, my goal is to remove ID3 Tag from mp3 files.

Thanks :)

ChrisW67
16th October 2012, 22:44
So now it works on Windows 7 but not on Windows XP. Which way around is it?

Have you tried anything to diagnose the problem? Loaded your exe in Dependency Walker for example. I cannot run it because of missing dependencies.

oswalidos
19th October 2012, 11:14
You're right,
Well, finally it's not question of XP or Seven, it's about codecs installed on your computer.

There is a simple solution, you don't need to remove ID3 Tag from mp3 files to get them readable by Phonon, you need just to install K-Lite Codecs.

Explanation : Phonon backend use DirectShow on Windows to read mp3 files. The K-Lite Codec Pack is a collection of DirectShow filters, VFW/ACM codecs, and tools. Codecs and DirectShow filters are needed for encoding and decoding audio and video formats.

installing K-Lite solve the problem of Phonon with some mp3 files.

I hope this will save someone out there who suffer from phonon with mp3 files on windows.