298 Commits

Author SHA1 Message Date
Tsuda Kageyu
b28784538a Merge pull request #565 from TsudaKageyu/audioprop-wav
(wishlist) WAV: AudioProperties improvements
2015-08-01 01:30:03 +09:00
Tsuda Kageyu
fdea096c8d Merge pull request #564 from TsudaKageyu/audioprop-aiff
(wishlist) AIFF: AudioProperties improvements
2015-08-01 01:29:46 +09:00
Tsuda Kageyu
a9d030544a Merge pull request #563 from TsudaKageyu/audioprop-vorbis
(wishlist) Ogg Vorbis: AudioProperties improvements
2015-08-01 01:29:35 +09:00
Tsuda Kageyu
8344c4d7f8 Merge pull request #562 from TsudaKageyu/audioprop-speex
(wishlist) Ogg Speex: AudioProperties improvements
2015-08-01 01:29:22 +09:00
Tsuda Kageyu
8b1e872f81 Merge pull request #561 from TsudaKageyu/audioprop-opus
(wishlist) Ogg Opus: AudioProperties improvements
2015-08-01 01:29:13 +09:00
Tsuda Kageyu
6a778751ee Merge pull request #560 from TsudaKageyu/audioprop-mpeg
(wishlist) MPEG: AudioProperties improvements
2015-08-01 01:29:06 +09:00
Tsuda Kageyu
4328a830f9 Merge pull request #559 from TsudaKageyu/audioprop-mpc
(wishlist) MusePak: AudioProperties improvements
2015-08-01 01:27:20 +09:00
Tsuda Kageyu
ae99cbe64e Merge pull request #558 from TsudaKageyu/audioprop-mp4
(wishlist) MP4: AudioProperties improvements
2015-08-01 01:27:15 +09:00
Tsuda Kageyu
692ce897cb Merge pull request #557 from TsudaKageyu/audioprop-flac
(wishlist) FLAC: AudioProperties improvements
2015-08-01 01:27:06 +09:00
Tsuda Kageyu
0ed1c29acc Merge pull request #556 from TsudaKageyu/audioprop-asf
(wishlist) ASF: AudioProperties improvements
2015-08-01 01:26:52 +09:00
Tsuda Kageyu
3c59b7858a Merge pull request #555 from TsudaKageyu/audioprop-ape
(wishlist) APE: AudioProperties improvements
2015-08-01 01:21:59 +09:00
Tsuda Kageyu
21412e2ba2 FLAC: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add bitsPerSample() property besides sampleWidth(). (#360)
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-08-01 00:49:21 +09:00
Tsuda Kageyu
88947e7a48 Silence some MSVC specific warnings in tests. 2015-07-31 20:55:23 +09:00
Tsuda Kageyu
a197f45ca8 Merge pull request #595 from TsudaKageyu/gcc-warning-test
Silence a GCC warning about ignoring a return value in test.
2015-07-30 23:39:04 +09:00
Tsuda Kageyu
6f944b0291 Make FLAC::File tolerant to zero-sized padding blocks. 2015-07-29 20:52:56 +09:00
Tsuda Kageyu
91ed3548f1 ASF: Enable ASF::Properties to get the audio codec information. 2015-06-21 02:42:47 +09:00
Tsuda Kageyu
ed25204d75 WAV: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add bitsPerSample() property besides sampleWidth(). (#360)
Add format() property. (#360)
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:43:09 +09:00
Tsuda Kageyu
03fd0a3ead AIFF: Calculate the actual average bitrate even if a file is compressed.
Move property parsing code to Properties.
2015-06-18 17:38:41 +09:00
Tsuda Kageyu
aede4ac851 AIFF: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add bitsPerSample() property besides sampleWidth(). (#360)
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:30:58 +09:00
Tsuda Kageyu
3823afcc87 Ogg Vorbis: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:24:31 +09:00
Tsuda Kageyu
4dba88fa31 Ogg Speex: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add bitrateNominal() property.
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:23:03 +09:00
Tsuda Kageyu
f3d8100c7b Ogg Opus: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:19:23 +09:00
Tsuda Kageyu
f82be353b4 MPEG: Properties::xingHeader() should return null if a VBR header is not found. 2015-06-18 17:14:12 +09:00
Tsuda Kageyu
9ec6d28239 MPEG: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Support VBRI header in addition to Xing. (#136)
Fix MPEG frame seeker functions. (maybe #190)
Calculate MPEG frame length accurately.
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:14:04 +09:00
Tsuda Kageyu
4a014c8113 MusePak: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 17:05:58 +09:00
Tsuda Kageyu
da14f67e2c MP4: Do rounding when calculating the bit rate. 2015-06-18 17:00:10 +09:00
Tsuda Kageyu
9226fa76b3 MP4: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add some tests for audio properties.
Add some supplementary comments.
Move parsing code to read() for consistency with other classes.
2015-06-18 17:00:10 +09:00
Tsuda Kageyu
ff36648e92 ASF: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Add bitsPerSample() property. (#360)
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 16:33:56 +09:00
Tsuda Kageyu
f15fe869a5 Add a test for APE files with an ID3v2 tag. 2015-06-18 14:41:37 +09:00
Tsuda Kageyu
125d887b85 APE: Use the audio stream length in calculating the bit rate. 2015-06-18 14:41:37 +09:00
Tsuda Kageyu
9a8e41b9d6 APE: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503)
Enable to read bit depth from older version files. (#360)
Remove some data members which are not needed to carry.
Add some tests for audio properties.
Add some supplementary comments.
2015-06-18 14:41:37 +09:00
Tsuda Kageyu
75159d5d8a Silence a GCC warning about ignoring a return value in test. 2015-06-10 03:44:30 +09:00
Scott Wheeler
a06d55ae6f Merge pull request #577 from TsudaKageyu/frameoffset
Fix MPEG::File::firstFrameOffset() and lastFrameOffset(). (#190)
2015-05-26 17:53:24 +02:00
Tsuda Kageyu
2d778d5a0a A lot of zero-sized temporary files are left after a test session on Windows. 2015-05-25 15:51:19 +09:00
Tsuda Kageyu
618a939c56 Fix MPEG::File::firstFrameOffset() and lastFrameOffset(). (#190) 2015-05-25 02:41:27 +09:00
Tsuda Kageyu
3094540a4b Avoid an infinite loop when reading fuzzed WavPack files. (#482) 2015-05-22 14:15:10 +09:00
Stephen F. Booth
48ca54de1f Merge pull request #484 from TsudaKageyu/fix-rfind
Fix File::rfind() for small files.
2015-05-21 22:44:10 -04:00
Tsuda Kageyu
bb9679b51a Fix test code to work on some environments.
const char * is more preferable than string for ifstream constructor.
2015-05-21 02:03:06 +09:00
Scott Wheeler
e4cf012522 Bring the API more in line with the rest of TagLib
Like in #255, this also makes it possible to read values from the
tag in a const function.
2015-05-20 14:26:53 +02:00
Tsuda Kageyu
88a4cf34b8 Modify the test code to work on MSVC/Windows. 2015-05-20 20:19:20 +09:00
Scott Wheeler
81261dd128 This should also work Windows and has less duplicated code 2015-05-20 11:53:32 +02:00
Scott Wheeler
3bea9f6bee Don't use tempnam on UNIX
This silences the huge stream of warnings when building the tests.

I think I didn't break the Windows version in the process (though
it may make sense to use the built in Windows functions there
instead), but I don't have a Windows build environment here, so
I can't test.
2015-05-20 11:45:32 +02:00
Tsuda Kageyu
2268efb49e Add a test for strings that contains surrogate pairs. 2015-05-19 09:01:47 +09:00
Scott Wheeler
bd3c4dc1b2 Merge pull request #515 from TsudaKageyu/empty-id3v2-frame
Skip empty ID3v2 frames when saving an ID3v2 tag.
2015-05-18 21:36:37 +02:00
Scott Wheeler
bba562b557 Add accessors to manipulate MP4 tags without modifying the internal structure
This brings the MP4 API in line closer to other tag formats and makes it
possible to access the tag data from const functions.

"ItemListMap" has been renamed to "ItemMap" (with the old version
deprecated).  It seems that the "ListMap" notion was copied probably
from Allan's ApeTag implementation, which incorrectly copied the term
from the XiphTag.  Notably, in XiphTag, because a field can have multiple
values, the "ListMap" is a map of lists.  Calling things a "ListMap" where
there can be only one value doesn't fit.

Closes #255
2015-05-18 21:18:33 +02:00
Scott Wheeler
451d23ca37 Add isEmpty() to MP4
Closes #457
2015-05-18 20:30:19 +02:00
Scott Wheeler
d248f77ab9 Show something useful for ChapterFrame::toString()
Closes #517
2015-05-18 19:51:18 +02:00
Tsuda Kageyu
727a11573a Fix File::rfind() for small files to work just like ByteVector::rfind(). 2015-05-19 01:24:37 +09:00
Scott Wheeler
7316cd331d Remove the null termination stuff from the ToC frames too 2015-05-18 18:17:10 +02:00
Scott Wheeler
3a977c55c4 We've moved away from including the null byte in the returned value
This does change previous behavior, but the previous behavior was
particularly stupid and inconsistent with everything else in TagLib.

It should be possible to mitigate this by putting the same safety
guards in the TableOfContents
2015-05-18 17:29:52 +02:00