58 Commits

Author SHA1 Message Date
Scott Wheeler
1aff3947ef Nice catch from Gunnar Roth -- the iterator was invalid here.
BUG:94662


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@385470 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2005-02-02 19:04:54 +00:00
Benjamin Meyer
3c9f7ec7d6 startsWith() should be used to avoid bugs like: s.mid(0, 4) == "Foo".
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@371832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-12-19 05:45:33 +00:00
Scott Wheeler
d1eb678b77 Make the private class a friend so that it can access the protected Header
class.
BUG:93869


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@369269 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-12-08 16:50:10 +00:00
Scott Wheeler
4b47288bca Don't write a track number if the track is larger than 255.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@358768 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-10-29 13:48:55 +00:00
Scott Wheeler
d58cde9eca This line is redundant.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@356359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-10-20 23:34:55 +00:00
Scott Wheeler
9087eacd37 Add some more docs on how to use the ID3v1::StringHandler in the ID3v1::Tag
documentation.

BUG:90634


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@356354 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-10-20 23:15:08 +00:00
Scott Wheeler
3d5ab8fd10 Move the sanity check before the unknown frame stuff. As the code currently
is if a bogus frame is hit it may try to parse it as an UnknownFrame rather
than just discarding it.

CCMAIL:Espen Tveit <espen.tveit@gmail.com>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@355686 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-10-18 15:31:12 +00:00
Scott Wheeler
68982059d0 misplace conditional
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@345352 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-09-10 01:42:56 +00:00
Scott Wheeler
133f50e356 Patch from Allan to add support for compressed frames.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@345351 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-09-10 01:29:49 +00:00
Scott Wheeler
a51d1cb117 Scott's silly nitpicks...
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@345141 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-09-09 00:28:57 +00:00
Allan Sandfeld Jensen
f086fdaba5 Set APELocation to the beginning of the APE-tag
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@340956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-25 15:37:53 +00:00
Allan Sandfeld Jensen
bdee6dcf73 APE-tags for mp3s.
Currently they are for special purposes only, and thus not used as a part
of the union tag.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@338184 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-15 21:14:12 +00:00
Scott Wheeler
60959a1b5b add api docs
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336790 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-08 06:04:42 +00:00
Scott Wheeler
47ddbca63b CVS_SILENT forgot a short description
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-07 01:39:26 +00:00
Scott Wheeler
2a48666f80 Adding support for the Unique File Identifier ID3v2 frame type (UFID).
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336640 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-07 00:59:16 +00:00
Scott Wheeler
c3c54b570a Add support for custom ID3v2 text frames (TXXX).
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336629 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-06 23:41:56 +00:00
Scott Wheeler
4aaa73f613 Here's an oops -- this *really* should have been virtual. I'm not sure how
I missed that.  I'll come up with something -- probably a functor or similar
to work around this at some point.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-06 01:54:28 +00:00
Scott Wheeler
cc6bf884a3 Ignore compressed and encrypted ID3v2 frames rather than just blindly giving
back the compressed/encrypted data as a string.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@335256 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-02 19:35:47 +00:00
Scott Wheeler
ae2113e716 Always explicitly check for divide by zero conditions.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@335132 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-08-02 12:51:14 +00:00
Scott Wheeler
1ad5582391 missing const
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332913 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 13:44:59 +00:00
Scott Wheeler
74b656091a Provide a default (empty) value for the language. The lack thereof was was
causing the bytes to not get lined up properly in the newly written tag and
then they weren't read back properly.

CCMAIL:82898-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332788 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 03:14:05 +00:00
Scott Wheeler
9963e67865 Use setData() rather than parseFields() here to make sure that the frame
header is initialized.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332785 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 02:44:23 +00:00
Scott Wheeler
cd32d1f8a3 Make it possible to strip tags without deleting them (again). This is
used by MPEG::File::save() so that tags that aren't explicitly saves still
exist in memory.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332783 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 02:22:05 +00:00
Scott Wheeler
3de6f40776 CVS_SILENT indentation oops from the last commit
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332782 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 02:19:26 +00:00
Scott Wheeler
d257ddfd02 Update the ID3v1 location when stripping the ID3v2 tag.
CCMAIL:83926-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332780 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 01:49:18 +00:00
Scott Wheeler
3a81dfb883 Fix a number of bugs to get things working with ID3v2.4 tags generated by
libid3tag:

*) Handle the case of there being an extended header where the first byte
   is zero (this was running into a check to see if the padding had been
   reached)
*) Add support for reading ID3v2::Frame::Header flags.  Previously this
   was not implemented, but was needed to...
*) Properly adjust the reading position for the existance of a data length
   indicator at the beginning of frames

Things now seem to work with the test files that I have here.  Since this
is the only other ID3v2.4 implmentation that I know of "in the wild" it's
nice that they now play nice together.  libid3tag uses many more of the
unique ID3v2.4 features than TagLib does.

CCMAIL:82867-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@332778 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-07-26 01:29:39 +00:00
Scott Wheeler
9a365f9e7e Fix spelling.
CCMAIL:83908-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-26 14:26:36 +00:00
Scott Wheeler
5b0c38eee9 CVS_SILENT add a note in the docs about strip() behavior
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323204 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-23 22:39:39 +00:00
Scott Wheeler
430e20f191 Another nice patch from Teemu Tervo. This deletes the tags from memory
when they're stripped from the file.

CCMAIL:83424-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323203 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-23 22:38:21 +00:00
Scott Wheeler
8bdecaf320 CVS_SILENT forgot to save this file before the last commit -- doc update
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323166 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-23 18:37:00 +00:00
Scott Wheeler
420541441c Switch the return type of File::save() from void to bool to provide a little
bit of feedback on whether or not the safe operation worked.

CCMAIL:83882@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323165 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-23 18:35:52 +00:00
Scott Wheeler
5f2e59150c Ah, this one's easy -- though an odd corer case; there's a Xing header here
but no MPEG frames.  This was triggering a divide by zero.

CCMAIL:83210-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@321447 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-17 15:33:53 +00:00
Scott Wheeler
2817d4e507 initialize variable
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@320862 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-15 10:13:05 +00:00
Scott Wheeler
b9de676bc0 Parse ID3v2.4 genres as a list of fields rather than a text string with the
ID3v1 genre in parenthesis.

CCMAIL:82554-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@319086 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-09 14:57:30 +00:00
Scott Wheeler
0c6be64f8a Two issues pointed out by Gary Peck:
*) Note that adding and removing frames from the ID3v2::Tag will invalidate
   iterators on the frame list
*) Correct the number of genres -- it should be 148 instead of 147.  You
   can all have your Synthpop genre back now.  :-)

CCMAIL:Gary Peck <gbpeck@sbcglobal.net>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@318067 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-06-06 00:10:58 +00:00
Scott Wheeler
9320aa0bbc Oops. Pretty significant type in the frame name for recording date. This
will automatically fix these files on the next write.  (At the moment other
taggers will not be able to read the date written by TagLib in the ID3v2 tag.
In most cases they'll fall back to the ID3v1 tag, which is fine, but still
kind of nasty.)  Thanks to Teemu Tervo for catching this.

CCMAIL:82038-done@bugs.kde.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@314024 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-05-24 07:37:41 +00:00
Scott Wheeler
3ca114a4ee Add a short description
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@310851 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-05-13 00:09:41 +00:00
Scott Wheeler
1770ffd35a Add a frameList() overload that accepts a frame ID as a shortcut to the
frameListMap().


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@310849 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-05-13 00:07:30 +00:00
Scott Wheeler
b9c9fd6c8d Added an example on how to read additional frames.
CCMAIL:Volker Wegert <mail@volker-wegert.de>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@309882 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-05-10 01:07:58 +00:00
Scott Wheeler
1be868b5b7 CVS_SILENT docs fix
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@309805 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-05-09 17:54:40 +00:00
Scott Wheeler
5895810131 Add docs.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306915 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-28 00:58:46 +00:00
Scott Wheeler
9e15659dbf Oops, the implementation of this constructor was missing.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306914 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-28 00:23:52 +00:00
Scott Wheeler
5091aa0b0c Add native support for the RVA2 (relative volume adjustment) frame. The
docs aren't there yet and this is completely untested, but that will follow
as soon as I find a file actually tagged with one of these.  :-)

CCMAIL:Jorn Baayen <jbaayen@gnome.org>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306706 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-27 02:01:27 +00:00
Scott Wheeler
8c2b1138ea Add direct support APIC (attached picture) frames. I'll probably add an
example to the examples dir later today showing how to use this.

CCMAIL:Matthias Welwarsky <matze@stud.fbi.fh-darmstadt.de>
CCMAIL:Jorn Baayen <jbaayen@gnome.org>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306452 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-26 08:49:02 +00:00
Scott Wheeler
940ac2cc3d Minor fix for getting the frame header size correct for unknown frames in
ID3v2.2 tags.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-26 01:18:37 +00:00
Scott Wheeler
4879eb8e6e CVS_SILENT make some stuff as deprecated
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@302723 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-10 23:28:54 +00:00
Scott Wheeler
09c4de9114 CVS_SILENT API docs corrections
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@302647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-10 17:23:22 +00:00
Scott Wheeler
2227d2004b Fix the same bug that I fixed in MPEG last week -- allow the lib user to
specify the ID3v2FrameFactory in the FLAC::File construstor.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@302629 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-10 15:50:17 +00:00
Scott Wheeler
15d3c3c71a Several optimizations that came from KCacheGrind / calltree fun.
Basically they fall into the categories:
- Don't convert things before you need to
- When you do, use more effecient copy constructors / assignment operators
  (i.e. when copying prefer memcpy to a for loop and when that's not possible
  use an iterator instead of operator[])


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301896 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-07 06:00:05 +00:00
Scott Wheeler
8c63238fb8 Add the ability to override the default ID3v1 string handling in TagLib by
adding a ID3v1::StringHandler class that has render and parse methods.

By default this still makes the (correct) assumption that ID3v1 tags contain
ISO-8859-1 data, but this makes it easy for applications to override this to
allow user specified codecs.

CCMAIL:78428@bugs.kde.org
CCMAIL:77710@bugs.kde.org
CCMAIL:amarok-devel@lists.sourceforge.net
CCMAIL:Shlomi Loubaton <loubaton.shlomi@012.net.il>
CCMAIL:Nir Misgav <misgav@ee.bgu.ac.il>


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301244 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2004-04-04 14:42:13 +00:00