1059 Commits

Author SHA1 Message Date
Michael Helmling
fa38c805f5 Implemented TagUnion::properties() and made Tag::*properties* virtual.
This allows to remove several default implementations in types using
TagUnions.
2012-12-27 13:19:11 +01:00
Michael Helmling
b60b444d7b Merge branch 'master' into taglib2
Conflicts:
	taglib/toolkit/tfile.h
2012-12-27 11:55:12 +01:00
Michael Helmling
8329d6ac1a Update documentation of the property map interface in TagLib::File. 2012-12-27 11:38:01 +01:00
Michael Helmling
f1d723077f Consistently handle invalid and deprecated tags in setProperties()
This commit reverts the use of strip() in setProperties() because the
latter function should not change the file before save() is called.
Instead, the following policy is now consistently applied for file formats
with multiple tag types:
- the recommended tag type is created, if it does not exist
- deprecated tags are updated, if they exist, but not created
- illegal tag types are ignored by setProperties(), but used in properties()
  if no others exist.

The only tag types considered "illegal" so far are APEv2 in MPEG and ID3 in FLAC.
2012-12-26 22:46:37 +01:00
Michael Helmling
a095c468b2 Revert "Add a test to show a problem with properties() and duplication."
This reverts commit 6e3391a846655d898280c60aa52f6b27164412c9. The "problem" demonstrated in there won't be fixed due to lack of significance.
2012-12-20 17:30:19 +01:00
Michael Helmling
b14e6a3570 Update for pull request #89: Change how setProperties() updates tags.
For file types supporting more than one tag format, setProperties() now always creates the most modern one. Deprecated tags are stripped.
2012-12-20 17:28:50 +01:00
Michael Helmling
6e3391a846 Add a test to show a problem with properties() and duplication. 2012-12-10 21:22:11 +01:00
Michael Helmling
c0ca5c97d5 Fix issue #88 by changing the behavior of setProperties().
For file types that support multiple tag standards (for example, FLAC
files can have ID3v1, ID3v2, and Vorbis comments) setProperties is now
called for all existing tags instead of only for the most recommended
one.
This fixes the problem that under some circumstances it was not possible
to delete a value using setProperties() because upon save() the call to
Tag::duplicate recovered that value from the ID3v1 tag.
2012-12-10 20:56:16 +01:00
Michael Helmling
d5cf6d72e2 Merge remote-tracking branch 'official/master' 2012-12-10 19:55:29 +01:00
Michael Helmling
9eb0f2941f Add a test case for the return value of setProperties() 2012-12-10 19:55:23 +01:00
naota
3fa295d99d Include sys/stat.h to define S_* properly
Without including sys/stat.h, this file failed to build on FreeBSD with the following error.

In file included from /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/test_trueaudio.cpp:5:0:
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h: In function 'std::string copyFile(const string&, const string&)':
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:62: error: 'S_IRUSR' was not declared in this scope
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:72: error: 'S_IWUSR' was not declared in this scope
In file included from /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/test_mpeg.cpp:6:0:
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h: In function 'std::string copyFile(const string&, const string&)':
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:62: error: 'S_IRUSR' was not declared in this scope
/var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:72: error: 'S_IWUSR' was not declared in this scope
gmake[2]: *** [tests/CMakeFiles/test_runner.dir/test_mpeg.cpp.o] Error 1
2012-11-28 07:54:08 +09:00
Lukáš Lalinský
db892c43e7 Merge branch 'master' into taglib2
Conflicts:
	taglib/mp4/mp4tag.cpp
	taglib/mp4/mp4tag.h
	taglib/toolkit/tfile.cpp
2012-11-23 10:17:16 +01:00
Lukáš Lalinský
812f63502b Implement the PropertyMap interface for WMA 2012-11-23 09:32:00 +01:00
Lukáš Lalinský
353eb9f00f Implement the PropertyMap interface for MP4 2012-11-22 10:40:22 +01:00
Lukáš Lalinský
1b813d9d6c Document sort names 2012-11-21 17:26:17 +01:00
Lukáš Lalinský
c5dade5ee7 Use names that are consistent with Vorbis Comments 2012-11-21 17:24:32 +01:00
Lukáš Lalinský
e75d6f616c Add support for reading MusicBrainz IDs from ID3v2 tags to PropertyMap 2012-11-21 17:21:30 +01:00
Lukáš Lalinský
15b601f053 Use PropertyMap in tagreader 2012-11-21 14:40:26 +01:00
Lukáš Lalinský
45317ef7f2 Revert "Fix opening of read-only files on Windows"
This reverts commit ade8dc1a218e43c3909c4eede58f4e28e09da73a.
2012-11-20 18:34:51 +01:00
Lukáš Lalinský
3da792152a Merge pull request #85 from TsudaKageyu/fix-readonly
Fix reading read-only files in Win32
2012-11-20 09:23:16 -08:00
Tsuda Kageyu
3f6da779d2 Fix compilation in non-Win32 2012-11-20 22:46:03 +09:00
Tsuda Kageyu
57b8ae6e1c Fix reading read-only files in Win32 2012-11-20 22:20:34 +09:00
Lukáš Lalinský
ade8dc1a21 Fix opening of read-only files on Windows
The CreateFile* functions return INVALID_HANDLE_VALUE on error, not NULL.

http://article.gmane.org/gmane.comp.kde.devel.taglib/2346
2012-11-20 14:15:16 +01:00
Lukáš Lalinský
f2b56a5511 Remove no longer needed save methods in MPEG::File 2012-11-12 16:37:06 +01:00
Lukáš Lalinský
2a86da4df5 Move Vorbis to the Ogg namespace 2012-11-12 16:32:15 +01:00
Lukáš Lalinský
f6741b65e4 Add toString() for Vorbis Comments 2012-11-12 16:27:22 +01:00
Lukáš Lalinský
60ba972244 Make the toString() method virtual 2012-11-12 16:22:23 +01:00
Lukáš Lalinský
e8ae4ecd93 Revert "Revert "Add a tool to inspect audio files, only MP4 is implemented for now""
This reverts commit c6f7ad3e83e6888c448cac2d1ac242181554623f.
2012-11-12 16:16:31 +01:00
Lukáš Lalinský
f407d1456c Merge branch 'master' into taglib2 2012-11-12 16:16:18 +01:00
Lukáš Lalinský
c6f7ad3e83 Revert "Add a tool to inspect audio files, only MP4 is implemented for now"
This reverts commit 45b0279b411958d8fcc1428dc38084f351ae4b80.
2012-11-12 16:14:32 +01:00
Lukáš Lalinský
dbe6be778b Build also examples 2012-11-11 16:44:01 +01:00
Lukáš Lalinský
45b0279b41 Add a tool to inspect audio files, only MP4 is implemented for now 2012-11-11 16:43:36 +01:00
Lukáš Lalinský
3a5aeb4573 Parse covr atoms with type 0 (fixes issue #84) 2012-11-11 16:04:08 +01:00
Lukáš Lalinský
72745846f4 Update NEWS 2012-11-11 14:49:31 +01:00
Lukáš Lalinský
50e616df8d Move stream operators to the TagLib namespace 2012-11-11 14:44:34 +01:00
Lukáš Lalinský
9440055eb1 Fix compilation on clang 2012-11-11 14:35:47 +01:00
Lukáš Lalinský
cb8b8d50f6 Merge branch 'master' into taglib2 2012-11-11 14:26:46 +01:00
Lukáš Lalinský
9e788bb8c2 Fix tests when compiled with clang on Linux 2012-11-11 14:26:10 +01:00
Lukáš Lalinský
56fbe7e14d Make travis run tests also with clang 2012-11-10 20:51:17 +01:00
Lukáš Lalinský
c3f9c63542 Unify ByteVectorList::split methods 2012-11-04 10:08:18 +01:00
Lukáš Lalinský
aa801e58ec Unify String::toInt methods 2012-11-04 10:04:06 +01:00
Lukáš Lalinský
9e41939eb1 Rename MPEG::XingHeader::xingHeaderOffset 2012-11-04 10:03:02 +01:00
Lukáš Lalinský
0d49e6bff0 No longer needed methods in FLAC::File 2012-11-04 10:01:39 +01:00
Lukáš Lalinský
6e2d5bc1dc Unify FLAC::File constructors 2012-11-04 09:58:56 +01:00
Lukáš Lalinský
9cede44af6 Remove deprecated constructor from FLAC::Properties 2012-11-04 09:54:17 +01:00
Lukáš Lalinský
ae11b3db38 Default parameter values in RelativeVolumeFrame 2012-11-04 09:52:03 +01:00
Lukáš Lalinský
b3c112ed99 Remove obsolete constructor from WavPack::Properties 2012-11-04 09:49:28 +01:00
Lukáš Lalinský
5b604f41be Add default value for addFramingBit to XiphComment::render() 2012-11-04 09:46:50 +01:00
Lukáš Lalinský
8599c1bd38 These functions are now virtual, so the default implementation from TagLib::File can be used 2012-11-04 09:44:51 +01:00
Lukáš Lalinský
27a078fe9b Do not need this anymore 2012-11-04 09:33:11 +01:00