Very long time of parsing of tags (mp3, mp4, ...)
Vladimir Skuzovatkin
skzvlad at gmail.com
Sat Mar 5 13:01:43 CET 2011
Hi!
Please forget about this problem ("Very long time of parsing of tags").
After some changes I can not reproduce it.
Sorry for the trouble.
I have another question about the attached image.
I found that the file size does not decrease after removal of the picture.
For example,
mp3 file without picture have size: 2 078 346 bytes,
size of jpg file to attach: 314 225 bytes,
size of this mp3 file after attaching the picture: 2 390 164 bytes,
and size of this mp3 file after deleting of all attached pictures: 2 390
164 bytes.
Why file size does not decrease after removal of the picture?
For example, I use the next code to delete all pictures from mp3 file:
TagLib::MPEG::File* pFile = ...;
...
TagLib::ID3v2::Tag* pID3v2Tag = pFile->ID3v2Tag();
if (pID3v2Tag)
{
TagLib::ID3v2::FrameList frameList=
pID3v2Tag->frameList("APIC");
{
if (!frameList.isEmpty())
{
std::list<TagLib::ID3v2::Frame*>::const_iterator it =
frameList.begin();
while (it != frameList.end())
{
std::list<TagLib::ID3v2::Frame*>::const_iterator
nextIt = it;
nextIt++;
pID3v2Tag->removeFrame(*it, true);
it = nextIt;
}
}
}
}
....
pFile->save();
After performing of this code all pictures are detached, but size of file is
not decreased.
Probably, I did not correctly use the library?
2011/3/5 Lukáš Lalinský <lalinsky at gmail.com>
> On Sat, Mar 5, 2011 at 8:53 AM, Vladimir Skuzovatkin <skzvlad at gmail.com>
> wrote:
> > Hi!
> > I try to write "tag editor" with using "TagLib" library.
> > OS: Windows, library version number: TagLib 1.6.3.
> > I found next problem.
> > The file (mp3, mp4, ...) is opened for a long time (>30 sec) after
> writing
> > to it a image (attached picture, coverArt).
> > For example:
> > 1) Small (~10Kb) PNG image was written into media file. Time of opening
> file
> > (after writing of image) is equal to ~4 milliseconds.
> > 2) Small PNG image was deleted from media file and big (~400Kb) PNG image
> > was written into media file. Time of opening file is equal to ~30
> seconds.
> > Why the time to open (to parse tags) is very big?
> > Can you reproduce this error?
>
> It would be best if you could send me the files to lalinsky at gmail.com,
> so that I can see the difference on the same files. I'm not aware of
> anything that would cause such slowdowns.
>
> Lukas
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>
--
Thanks,
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110305/705710cc/attachment.htm
More information about the taglib-devel
mailing list