]> granicus.if.org Git - taglib/log
taglib
4 years agoNeeds to be defined to nothing if none of the #if blocks match master
Scott Wheeler [Fri, 20 Sep 2019 08:32:33 +0000 (10:32 +0200)]
Needs to be defined to nothing if none of the #if blocks match

4 years agoUse newer function signatures
Scott Wheeler [Thu, 19 Sep 2019 13:23:34 +0000 (15:23 +0200)]
Use newer function signatures

4 years agoUse new method signatures
Scott Wheeler [Thu, 19 Sep 2019 13:19:17 +0000 (15:19 +0200)]
Use new method signatures

4 years agoCorrectly decode signed values
Scott Wheeler [Thu, 12 Sep 2019 10:13:24 +0000 (12:13 +0200)]
Correctly decode signed values

In SV7 these are a mix of signed and unsigned shorts; in SV8 they're all
signed.  Storing them as an int is fine for signed or unsigned shorts as
it's wide enough to contain either of them.

Unfortunately there are no explicit tests for SV7 at the moment; that
would be ideal to add before the next release.

CC @carewolf

4 years agoCompletely remove `StripAll` from the API
Scott Wheeler [Thu, 12 Sep 2019 09:19:39 +0000 (11:19 +0200)]
Completely remove `StripAll` from the API

I'd imagined it being useful for calls to `strip()`, but it's not
actually used there since that's an OR-ed together set of flags
representing which tags to strip.

4 years agoUnsaved (and incorrect looking) field
Scott Wheeler [Thu, 12 Sep 2019 08:35:56 +0000 (10:35 +0200)]
Unsaved (and incorrect looking) field

4 years agoStripAll should be treated as equivalent to StripOthers in `save()` v1.12-beta-1
Scott Wheeler [Thu, 12 Sep 2019 05:57:16 +0000 (07:57 +0200)]
StripAll should be treated as equivalent to StripOthers in `save()`

4 years agoRemove DSF and DSDIFF from master to a feature branch
Scott Wheeler [Thu, 12 Sep 2019 05:26:18 +0000 (07:26 +0200)]
Remove DSF and DSDIFF from master to a feature branch

These can be merged back into master once they're in a more mature state.

4 years agoUnify File::save(...) APIs between file formats that support ID3v2
Scott Wheeler [Wed, 11 Sep 2019 03:55:30 +0000 (05:55 +0200)]
Unify File::save(...) APIs between file formats that support ID3v2

Closes #922

4 years agoRevert switch to other static size method
Scott Wheeler [Tue, 10 Sep 2019 22:58:18 +0000 (00:58 +0200)]
Revert switch to other static size method

This was based on a misread of the header:  at present there is no
non-static size() method, so removing the argument makes the behavior
incorrect.

4 years agoMissing header that should have been added in b8dc105
Scott Wheeler [Tue, 10 Sep 2019 22:42:15 +0000 (00:42 +0200)]
Missing header that should have been added in b8dc105

4 years agoMark deprected methods and remove internal usage
Scott Wheeler [Tue, 10 Sep 2019 22:37:02 +0000 (00:37 +0200)]
Mark deprected methods and remove internal usage

This does not put the deprecated marker on methods that will or could resolve
to the same overload, e.g.:

void foo(bool bar = true); // <-- not marked
void foo(Bar bar) // <-- since this will have a default argument in the new version

4 years agoDeprecate calls to MPEG::File::save(...) that use boolean params
Scott Wheeler [Tue, 10 Sep 2019 13:27:44 +0000 (15:27 +0200)]
Deprecate calls to MPEG::File::save(...) that use boolean params

This uses explicit enums for e.g. the ID3v2 version, making calls more
readable:

  file.save(ID3v1 | ID3v2, StripOthers, ID3v2::v4, Duplicate);

Instead of:

  file.save(ID3v1 | ID3v2, true, 4, true);

Needs to be ported to other types, per #922

4 years agoAdd docs for this method
Scott Wheeler [Tue, 10 Sep 2019 11:31:44 +0000 (13:31 +0200)]
Add docs for this method

4 years agoNo tabs in TagLib
Scott Wheeler [Tue, 10 Sep 2019 11:08:11 +0000 (13:08 +0200)]
No tabs in TagLib

4 years agoRequire at least CMake 3
Scott Wheeler [Tue, 10 Sep 2019 10:45:36 +0000 (12:45 +0200)]
Require at least CMake 3

4 years agoAdd -lz to taglib.pc and taglib-config when built with zlib
Scott Wheeler [Tue, 10 Sep 2019 10:41:11 +0000 (12:41 +0200)]
Add -lz to taglib.pc and taglib-config when built with zlib

Closes #872

4 years agoClear valid flag for invalid Speex files
StefanBruens [Tue, 30 Apr 2019 02:10:57 +0000 (04:10 +0200)]
Clear valid flag for invalid Speex files

This matches the corresponding code in vorbisfile.cpp, opusfile.cpp and flagfile.cpp, and fixes taglib/taglib#902.

4 years agoMerge pull request #883 from ufleisch/riff-padding
Scott Wheeler [Tue, 10 Sep 2019 09:25:46 +0000 (11:25 +0200)]
Merge pull request #883 from ufleisch/riff-padding

Do not ignore non zero RIFF padding if leading to parse error (#882)

4 years agoMerge pull request #917 from ufleisch/ogg-bitrate
Scott Wheeler [Tue, 10 Sep 2019 09:14:15 +0000 (11:14 +0200)]
Merge pull request #917 from ufleisch/ogg-bitrate

Calculate Ogg bitrate without comment size (#874)

4 years agoTests need C++11
Scott Wheeler [Thu, 5 Sep 2019 15:29:31 +0000 (17:29 +0200)]
Tests need C++11

4 years agoCalculate Ogg bitrate without overhead size (#874)
Urs Fleisch [Mon, 2 Sep 2019 20:14:41 +0000 (22:14 +0200)]
Calculate Ogg bitrate without overhead size (#874)

4 years agoMerge pull request #910 from joerg-krause/patch-1
Scott Wheeler [Mon, 26 Aug 2019 21:37:24 +0000 (23:37 +0200)]
Merge pull request #910 from joerg-krause/patch-1

Drop CMAKE_SYSROOT from taglib-config

4 years agoMerge pull request #909 from williamjcm/patch-1
Scott Wheeler [Mon, 26 Aug 2019 21:34:47 +0000 (23:34 +0200)]
Merge pull request #909 from williamjcm/patch-1

Make TagLib seach in its source dir for utf8-cpp.

4 years agoMerge pull request #912 from whatdoineed2do/m4a-track-year-equal0-bugfix
Scott Wheeler [Mon, 26 Aug 2019 21:32:44 +0000 (23:32 +0200)]
Merge pull request #912 from whatdoineed2do/m4a-track-year-equal0-bugfix

MP4 - setTrack()/setYear() accepts 0 to remove the tag

4 years agoMerge pull request #919 from jonaski/spelling
Scott Wheeler [Mon, 26 Aug 2019 21:26:55 +0000 (23:26 +0200)]
Merge pull request #919 from jonaski/spelling

Fix spelling and typos

4 years agoFix spelling and typos
Jonas Kvinge [Mon, 26 Aug 2019 21:23:33 +0000 (23:23 +0200)]
Fix spelling and typos

4 years agoCall fflush() before ftruncate() to drop all buffered data (#914)
whatdoineed2do [Thu, 25 Jul 2019 02:57:49 +0000 (03:57 +0100)]
Call fflush() before ftruncate() to drop all buffered data (#914)

This avoids stale data presented to caller via a fread()

Current bug due to the buffered data can be seen in stripping mp3s of tags

    f.strip(ID3v1);
    f.strip(APE);

The ID3v1 tag sits at the end of file (strip calls ftruncate()) and the APE
strip performs a readFile() that would return the stream buffered/truncated data
and reinsert

4 years agosetTrack()/setYear() accepts 0 to remove the tag as per
whatdoineed2do/Ray [Sat, 13 Jul 2019 15:00:58 +0000 (16:00 +0100)]
setTrack()/setYear() accepts 0 to remove the tag as per
documentation/functionality across other tpyes (mp3/flac/...); m4a do not honour
this and instead sets the underlying value to 0.

This commit fixes this issue (#911)

4 years agoDrop CMAKE_SYSROOT from taglib-config
Jörg Krause [Sun, 16 Jun 2019 13:33:52 +0000 (15:33 +0200)]
Drop CMAKE_SYSROOT from taglib-config

Commit d4c938cbc766ffb400c09efb9e696fce2537d81e is about fixing taglib-config for proper cross-compilation. The fix is right in principle, but wrong about adding `CMAKE_SYSROOT`. The correct prefix path should be set outside of the config file as some embedded Linux distros like OpenWrt or OpenEmbedded install with a different DESTDIR, and dependent packages see a different sysroot.

4 years agoMake TagLib seach in its source dir for utf8-cpp.
Guillaume Jacquemin [Sat, 1 Jun 2019 08:19:27 +0000 (10:19 +0200)]
Make TagLib seach in its source dir for utf8-cpp.

Without this change, TagLib is unusable as part of CMake projects that rely on `add_subdirectory()` for dependencies.

4 years agoRespect atom type when converting rate tag (#896)
StefanBruens [Fri, 31 May 2019 11:21:16 +0000 (13:21 +0200)]
Respect atom type when converting rate tag (#896)

* Respect atom type when converting rate tag

TagLib prior to #818 (commit ff28cf276c60) read and wrote the "rate" tag as
text, and switched to reading it as integer value even when the atom class
is a text type. This breaks reading existing files, and can be avoided by
taking the atom type into account.

This fixes issue #885.

* Respect MP4::Item type when writing the rate tag

TagLib prior to #818 (commit ff28cf276c60) read and wrote the "rate" tag
as text, and switched to writing the integer value of the MP4::Item.
This breaks writing from applications which supply the value as
StringList, which was the previously implemented API. Applications using
an MP4::Item(UInt) are still supported without changes on the application
side.

This is the complementary writing part for issue #885.

4 years agoSupport ID3v2 GRP1 frame introduced with iTunes 12.5.4.42, #903. (#904)
Urs Fleisch [Fri, 17 May 2019 11:15:48 +0000 (13:15 +0200)]
Support ID3v2 GRP1 frame introduced with iTunes 12.5.4.42, #903. (#904)

4 years agofix taglib-config file for cross compiling (#906)
Jörg Krause [Fri, 17 May 2019 11:13:35 +0000 (13:13 +0200)]
fix taglib-config file for cross compiling (#906)

5 years agoUpdate mp4properties.cpp (#893)
Tim Malseed [Sun, 17 Mar 2019 13:22:19 +0000 (00:22 +1100)]
Update mp4properties.cpp (#893)

When parsing mp4 media header version 1 (mdhd) atoms, the timescale (unit) is parsed as a `LongLong` (8 bytes), but instead should be a `UInt` (4 bytes). This results in an incorrect timescale, and also pushes the offset of the duration (length) off by 4 bytes.

The end result being that the AudioProperties track length for mp4's with mdhd v1 comes back as 0.

See: https://wiki.multimedia.cx/index.php/QuickTime_container

|  Entry | Bytes (v0) | Bytes (v1) |
| :---         |     :---:      | :---: |
| size  | 4  | 4 |
| type  | 4  | 4 |
| version | 1 | 1 |
| flags | 3 | 3 |
| creation time* | 4 | **8** |
| modification time* | 4 | **8** |
| time scale | 4 | 4 |
| duration* | 4 | **8** |
| language | 2 | 2 |
| quality | 2 | 2 |

5 years agoMinor fix for mp4 media header v0 minimum size check (#895)
Tim Malseed [Sun, 17 Mar 2019 13:20:43 +0000 (00:20 +1100)]
Minor fix for mp4 media header v0 minimum size check (#895)

Mp4 media header (mdhd) v0 atoms are a minimum of 8 bytes for size & type information, plus 24 bytes for remaining entries (`24 +8`) bytes in total, rather than (`24 + 4`).

See https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25615

5 years agoDo not ignore non zero RIFF padding if leading to parse error (#882)
Urs Fleisch [Wed, 19 Dec 2018 15:41:28 +0000 (16:41 +0100)]
Do not ignore non zero RIFF padding if leading to parse error (#882)

5 years agoUpdated NEWS for the latest changes
Stephen F. Booth [Sun, 28 Oct 2018 13:43:45 +0000 (08:43 -0500)]
Updated NEWS for the latest changes

5 years agoAdded APE, DSF, and DFF formats to the list
Stephen F. Booth [Sun, 28 Oct 2018 13:42:19 +0000 (08:42 -0500)]
Added APE, DSF, and DFF formats to the list

5 years agoAdded DSF and DSDIFF authors
Stephen F. Booth [Sun, 28 Oct 2018 13:35:15 +0000 (08:35 -0500)]
Added DSF and DSDIFF authors

5 years agoAdd DSF and DSDIFF file types management (#878)
Jonas Kvinge [Sat, 27 Oct 2018 00:45:49 +0000 (02:45 +0200)]
Add DSF and DSDIFF file types management (#878)

* Add DSF and DSDIFF file types management

* Fixes for some build chains

* unit64_t replaced by unsigned long long, warning fixes

* Remove C++11 extension incompatible with some build chains (enumeration in a nested name specifier)

* Change typedef types (uint, ulong, ...) to standard types
remove BUILD_FRAMEWORK changes from this pull request

* Replace deprecated String::null and ByteVector::null by String() and ByteVector()
Styling update, thanks to FestusHagen

* Restyling

* Restyling to reduce length of excessively long lines

* Add to detectByExtension

* Added `isSupported(IOStream *stream)` to `DSF::File` and `DSDIFF::File`

5 years agoImprove CMake VISIBILITY_HIDDEN option handling (#810)
evpobr [Sat, 27 Oct 2018 00:26:53 +0000 (05:26 +0500)]
Improve CMake VISIBILITY_HIDDEN option handling (#810)

Use standard CMake's CXX_VISIBILITY_PRESET property.

5 years agoadded OS X built files to .gitignore (#828)
Ola Nordstrom [Sat, 27 Oct 2018 00:23:44 +0000 (17:23 -0700)]
added OS X built files to .gitignore (#828)

5 years agoFill `TableOfContentsFrame::toString()`. (#852)
Bert Wesarg [Sat, 27 Oct 2018 00:21:18 +0000 (02:21 +0200)]
Fill `TableOfContentsFrame::toString()`. (#852)

5 years agoFollow TagLib's brace style
Scott Wheeler [Wed, 10 Oct 2018 17:24:44 +0000 (19:24 +0200)]
Follow TagLib's brace style

5 years agoAdd support for file descriptor to FileStream (#832)
safu9 [Wed, 10 Oct 2018 16:25:02 +0000 (01:25 +0900)]
Add support for file descriptor to FileStream (#832)

Add support for file descriptor

5 years agoDon't list the description twice in `UserTextIdentificationFrame::toString()` (#853)
Bert Wesarg [Tue, 9 Oct 2018 23:55:02 +0000 (01:55 +0200)]
Don't list the description twice in `UserTextIdentificationFrame::toString()` (#853)

5 years agoFixed OOB read when loading invalid ogg flac file. (#868) (#869)
Scott Gayou [Tue, 9 Oct 2018 23:46:55 +0000 (18:46 -0500)]
Fixed OOB read when loading invalid ogg flac file. (#868) (#869)

CVE-2018-11439 is caused by a failure to check the minimum length
of a ogg flac header. This header is detailed in full at:
https://xiph.org/flac/ogg_mapping.html. Added more strict checking
for entire header.

6 years agoAdd support for cmID, purl, egid MP4 atoms (#862). (#863)
Urs Fleisch [Mon, 9 Apr 2018 13:32:05 +0000 (15:32 +0200)]
Add support for cmID, purl, egid MP4 atoms (#862). (#863)

6 years agoUpdate links
Scott Wheeler [Sun, 19 Nov 2017 23:03:52 +0000 (00:03 +0100)]
Update links

6 years agoFix crash when loading an empty mpeg file (#830)
Xijian Yan [Mon, 6 Nov 2017 15:48:17 +0000 (23:48 +0800)]
Fix crash when loading an empty mpeg file (#830)

When loading an empty file (empty.txt -> empty.mp3 ), TagLib will crash.
buffer.size() is 0, then buffer.size() - 1 is undefined (unsigned int)

6 years agoDon't assume TDRC is an instance of TextIdentificationFrame (#831)
Stephen F. Booth [Sat, 30 Sep 2017 15:15:41 +0000 (10:15 -0500)]
Don't assume TDRC is an instance of TextIdentificationFrame (#831)

If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
which causes problems in rebuildAggregateFrames() when it is assumed
that TDRC is a TextIdentificationFrame

6 years agotaglib: fix test build failure on powerpc/c++11 (#834)
Sergei Trofimovich [Tue, 19 Sep 2017 01:06:55 +0000 (02:06 +0100)]
taglib: fix test build failure on powerpc/c++11 (#834)

powerpc is a platform with 'char' == 'unsigned char'.
As a result '-1' is not expressible in char and build fails as:

```
    # '-funsigned-char' to force test build failure on other platforms
    $ cmake .. -DBUILD_TESTS=YES -DCMAKE_CXX_FLAGS="-O2 -funsigned-char" -DCMAKE_C_FLAGS="-O2 -funsigned-char"
    ...
    $ make check
    tests/test_synchdata.cpp: In member function 'void TestID3v2SynchData::testToUIntBroken()':
    tests/test_synchdata.cpp:78:33: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
     char data[] = { 0, 0, 0, -1 };
                                 ^
```

The fix is to expliticly cast -1 to 'char'.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
6 years agoCheck if mandatory header objects are present when opening ASF files.
Tsuda Kageyu [Tue, 13 Jun 2017 08:22:00 +0000 (17:22 +0900)]
Check if mandatory header objects are present when opening ASF files.

Also removes some assignments of "this".
It feels too tricky when it is not absolutely necessary.

6 years agoUse a macro to pretend virtual functions.
Tsuda Kageyu [Tue, 13 Jun 2017 08:01:53 +0000 (17:01 +0900)]
Use a macro to pretend virtual functions.

6 years agoFix some typos in debug messages.
Tsuda Kageyu [Tue, 13 Jun 2017 06:05:25 +0000 (15:05 +0900)]
Fix some typos in debug messages.

6 years agoUpdate NEWS.
Tsuda Kageyu [Mon, 12 Jun 2017 04:07:21 +0000 (13:07 +0900)]
Update NEWS.

6 years agoMerge pull request #799 from TsudaKageyu/filetype-detection
Tsuda Kageyu [Mon, 12 Jun 2017 04:04:15 +0000 (13:04 +0900)]
Merge pull request #799 from TsudaKageyu/filetype-detection

Enable FileRef to detect file types by the actual content of a stream.

6 years agoTableOfContentsFrame depends on ByteVectorList.
Tsuda Kageyu [Fri, 9 Jun 2017 08:52:56 +0000 (17:52 +0900)]
TableOfContentsFrame depends on ByteVectorList.

6 years agoMerge pull request #824 from evpobr/fix-createfile2
Tsuda Kageyu [Thu, 8 Jun 2017 23:53:25 +0000 (08:53 +0900)]
Merge pull request #824 from evpobr/fix-createfile2

Fix WinRT configuring

6 years agoMerge pull request #823 from TsudaKageyu/isolate-3rdparty-lib
Tsuda Kageyu [Thu, 8 Jun 2017 23:53:10 +0000 (08:53 +0900)]
Merge pull request #823 from TsudaKageyu/isolate-3rdparty-lib

Isolate 3rdparty library for easier maintenance.

6 years agoFix WinRT configuring
evpobr [Thu, 8 Jun 2017 13:59:14 +0000 (18:59 +0500)]
Fix WinRT configuring

Don't rely on _WIN32_WINNT value to enable WinRT support.

if _WIN32_WINNT is not set manually, it is defaulted to SDK version. So
if you use SDK > 8 you cannot use TagLib under Win7 and lower because of
CreateFile2 function dependency.

PLATFORM_WINRT option (OFF by default) was introduced to enable WinRT
build.

Related issues: https://github.com/Microsoft/vcpkg/issues/1240

6 years agoIsolate 3rdparty library for easier maintenance.
Tsuda Kageyu [Wed, 7 Jun 2017 03:49:44 +0000 (12:49 +0900)]
Isolate 3rdparty library for easier maintenance.

6 years agoUpdate UTF8-CPP to v2.3.5.
Tsuda Kageyu [Wed, 7 Jun 2017 03:12:31 +0000 (12:12 +0900)]
Update UTF8-CPP to v2.3.5.

6 years agoRemove an unused include directory from taglib/CMakeLists.txt.
Tsuda Kageyu [Wed, 7 Jun 2017 02:38:46 +0000 (11:38 +0900)]
Remove an unused include directory from taglib/CMakeLists.txt.

6 years agoRestore FileRef::create() in order not to change the previous behavior.
Tsuda Kageyu [Tue, 6 Jun 2017 00:17:34 +0000 (09:17 +0900)]
Restore FileRef::create() in order not to change the previous behavior.

6 years agoUpdate INSTALL.md
Michael Helmling [Mon, 5 Jun 2017 12:49:09 +0000 (14:49 +0200)]
Update INSTALL.md

Added a note that with MS Visual Studio 2017 one can directly open the CMake project.

6 years agoMerge pull request #821 from supermihi/master
Stephen F. Booth [Mon, 5 Jun 2017 11:37:12 +0000 (07:37 -0400)]
Merge pull request #821 from supermihi/master

Fix Markdown syntax of INSTALL file and rename it to *.md

6 years agoFix Markdown syntax of INSTALL file and rename it to *.md
Michael Helmling [Mon, 5 Jun 2017 09:09:16 +0000 (11:09 +0200)]
Fix Markdown syntax of INSTALL file and rename it to *.md

This enables proper formatted display of the file on e.g. GitHub, increasing readability.

6 years agoMention that FileRef::create no longer works.
Tsuda Kageyu [Wed, 31 May 2017 00:41:41 +0000 (09:41 +0900)]
Mention that FileRef::create no longer works.

6 years agoUpdate NEWS.
Tsuda Kageyu [Wed, 31 May 2017 00:28:30 +0000 (09:28 +0900)]
Update NEWS.

6 years agoMerge pull request #818 from LindyBalboa/add_rate_atom_support
Tsuda Kageyu [Wed, 31 May 2017 00:20:27 +0000 (09:20 +0900)]
Merge pull request #818 from LindyBalboa/add_rate_atom_support

Add direct support for "rate" atom

6 years agoFix memory leaks in a test.
Tsuda Kageyu [Fri, 26 May 2017 07:49:36 +0000 (16:49 +0900)]
Fix memory leaks in a test.

6 years agoFix MSVC warnings about unreferenced variables.
Tsuda Kageyu [Tue, 23 May 2017 08:39:25 +0000 (17:39 +0900)]
Fix MSVC warnings about unreferenced variables.

6 years agoFix the Travis-CI testing on OS X.
Tsuda Kageyu [Tue, 23 May 2017 07:52:56 +0000 (16:52 +0900)]
Fix the Travis-CI testing on OS X.

AppleClang 7.3 doesn't get along with CppUnit by default.

7 years agoAdd direct support for "rate" atom
Conner R. Phillips [Sat, 22 Apr 2017 05:31:52 +0000 (07:31 +0200)]
Add direct support for "rate" atom

Resolves #817

7 years agoRemove an useless UTF-8 BOM.
Tsuda Kageyu [Fri, 24 Feb 2017 06:47:30 +0000 (15:47 +0900)]
Remove an useless UTF-8 BOM.

7 years agoAllow SYLT frames to have a timestamp with no text.
Tsuda Kageyu [Fri, 24 Feb 2017 06:40:30 +0000 (15:40 +0900)]
Allow SYLT frames to have a timestamp with no text.

Thanks to lemonboy999.

7 years agoFilePrivate is responsible to delete a stream pointer instead of File.
Tsuda Kageyu [Wed, 8 Feb 2017 08:45:46 +0000 (17:45 +0900)]
FilePrivate is responsible to delete a stream pointer instead of File.

Generally, TagLib leaves the Private classes to delete their members.

7 years agoMerge branch 'filetype-detection' of https://github.com/TsudaKageyu/taglib into filet...
Tsuda Kageyu [Tue, 7 Feb 2017 13:37:13 +0000 (22:37 +0900)]
Merge branch 'filetype-detection' of https://github.com/TsudaKageyu/taglib into filetype-detection

7 years agoRename the functions 'isValidStream' to 'isSupported'.
Tsuda Kageyu [Tue, 7 Feb 2017 13:36:56 +0000 (22:36 +0900)]
Rename the functions 'isValidStream' to 'isSupported'.

The name 'isValidStream' is a little misleading because it doesn't check if the stream is really valid. Additionally, 'isSupported' can be naturally overloaded.

7 years agoRemove some redundant code.
Tsuda Kageyu [Mon, 6 Feb 2017 01:35:49 +0000 (10:35 +0900)]
Remove some redundant code.

7 years agoFix wrong endian of boolean values when saving ASF files.
Tsuda Kageyu [Mon, 6 Feb 2017 01:06:10 +0000 (10:06 +0900)]
Fix wrong endian of boolean values when saving ASF files.

7 years agoRestore the layout of the copyright header of test_fileref.cpp.
Tsuda Kageyu [Sat, 4 Feb 2017 14:45:15 +0000 (23:45 +0900)]
Restore the layout of the copyright header of test_fileref.cpp.

7 years agoEnable FileRef to detect file types by the actual content of a stream.
Tsuda Kageyu [Fri, 3 Feb 2017 08:52:27 +0000 (17:52 +0900)]
Enable FileRef to detect file types by the actual content of a stream.

FileRef doesn't work with ByteVectorStream as reported at #796, since ByteVectorStream is not associated with a file name and FileRef detects file types based on file extensions.
This commit makes FileRef to work with ByteVectorStream by enabling it to detect file types based on the actual content of a stream.

7 years agoRemove obsolete comments.
Tsuda Kageyu [Fri, 3 Feb 2017 16:31:20 +0000 (01:31 +0900)]
Remove obsolete comments.

The bug mentioned in the comments are already fixed.

7 years agoIgnore warnings about OSAtomicIncrement32Barrier
Scott Wheeler [Fri, 3 Feb 2017 13:56:02 +0000 (13:56 +0000)]
Ignore warnings about OSAtomicIncrement32Barrier

The warnings suggest moving to std::atomic functions, but those are only
available in C++11.  It would be possible to switch to the C versions of
those functions, which are now provided in stdatoic.h (in C11), but
let's wait until we actually hit problems with this function and are a
few more OS versions into C11 headers being included by default.

7 years agoAvoid searching the same area twice in MPEG::File::previousFrameOffset().
Tsuda Kageyu [Wed, 1 Feb 2017 05:23:03 +0000 (14:23 +0900)]
Avoid searching the same area twice in MPEG::File::previousFrameOffset().

7 years agoAdd some test cases for invalid UTF-8 sequences.
Tsuda Kageyu [Tue, 31 Jan 2017 05:27:23 +0000 (14:27 +0900)]
Add some test cases for invalid UTF-8 sequences.

7 years agoFix and add some test cases for invalid surrogate pairs.
Tsuda Kageyu [Tue, 31 Jan 2017 05:19:30 +0000 (14:19 +0900)]
Fix and add some test cases for invalid surrogate pairs.

7 years agoUpdate NEWS.
Tsuda Kageyu [Mon, 30 Jan 2017 15:21:41 +0000 (00:21 +0900)]
Update NEWS.

7 years agoRemove redundant functions in tstring.cpp.
Tsuda Kageyu [Mon, 30 Jan 2017 13:38:08 +0000 (22:38 +0900)]
Remove redundant functions in tstring.cpp.

Two versions of copyFromUTF16() are almost the same.

7 years agoRemove function bodies of some non-specialized template functions.
Tsuda Kageyu [Mon, 30 Jan 2017 07:11:59 +0000 (16:11 +0900)]
Remove function bodies of some non-specialized template functions.

The code won't link when a wrong version is used. It's better than showing a debug message.

7 years agoAdd a few more test cases for invalid UTF-8 sequences.
Tsuda Kageyu [Mon, 30 Jan 2017 03:56:53 +0000 (12:56 +0900)]
Add a few more test cases for invalid UTF-8 sequences.

7 years agoMerge pull request #794 from TsudaKageyu/utf8-library
Tsuda Kageyu [Mon, 30 Jan 2017 03:54:43 +0000 (12:54 +0900)]
Merge pull request #794 from TsudaKageyu/utf8-library

Replace unicode.h/unicode.cpp by the UTF8-CPP library.

7 years agoCheck an invalid UTF-8 sequence consists of single char.
Tsuda Kageyu [Mon, 30 Jan 2017 02:35:39 +0000 (11:35 +0900)]
Check an invalid UTF-8 sequence consists of single char.

Single char can be an invalid UTF sequence. For example, { 0x80 } is invalid.

7 years agoStop assuming that std::wstring has a contiguous and null-terminated buffer.
Tsuda Kageyu [Sun, 29 Jan 2017 15:36:38 +0000 (00:36 +0900)]
Stop assuming that std::wstring has a contiguous and null-terminated buffer.

7 years agoReduce useless memory reallocation in String::upper().
Tsuda Kageyu [Fri, 27 Jan 2017 16:17:21 +0000 (01:17 +0900)]
Reduce useless memory reallocation in String::upper().

7 years agoRemove a duplicate test file.
Tsuda Kageyu [Fri, 27 Jan 2017 13:10:02 +0000 (22:10 +0900)]
Remove a duplicate test file.

7 years agoRemove some redundant code in tstring.cpp.
Tsuda Kageyu [Fri, 27 Jan 2017 06:11:08 +0000 (15:11 +0900)]
Remove some redundant code in tstring.cpp.