Commit Graph

50 Commits

Author SHA1 Message Date
Martchus a3dc63b677 Fix parsing flags of Matroska tracks
The default for the flags "default" and "enabled" is actually 1.
2022-04-05 21:27:58 +02:00
Martchus 4fca95afa3 Preserve implicit language setting "English" via ISO language code of MKV tracks 2021-04-07 21:21:52 +02:00
Martchus 9e2629a668 Fix crash when applying changes to Matroska file with track with IETF language 2021-04-07 09:22:33 +02:00
Martchus 0a041f6ad2 Fix warnings 2021-03-20 21:26:25 +01:00
Martchus 65597fd71e Add API to allow aborting overall/expensive parsing functions
* Not really implemented within the various code paths of the parsers at
  this point; this commit mainly adds the API.
* Adjust example in README
2021-02-04 23:21:50 +01:00
Martchus 64d98f5530 Use std::string_view where it makes sense 2021-01-30 21:53:06 +01:00
Martchus 6b469f1c26 Add Locale class to deal with differently specified languages/countries
Different media/tag formats specify languages and countries
differently. This change introduces a Locale class to keep track
of the format being used. So far there are no automatic conversions
implemented so it is entirely up to the user to pass valid values using
a format which matches the one required by the media/tag format.

This change also adds support for Matroska's IETF elements so at least the
raw value can be read, written and is preserved.
2020-12-16 17:48:08 +01:00
Martchus 4cc2dbd9e6 Use flags instead of tons of boolean fields in AbstractTrack 2020-12-16 17:48:08 +01:00
Martchus f371efe642 Don't support IETF language elements explicitely
For now let's just ignore these elements explicitely until they are
actually supported. This way the warnings are at least more specific and
there will be no inconsistency when updating the track language.
2020-11-26 23:18:14 +01:00
Martchus 25b567913b Detect Dolby Digital Plus in Matroska files 2020-03-18 17:48:23 +01:00
Martchus b2c02e9acc Fix childs -> children 2019-12-30 22:54:11 +01:00
Martchus 0c2056c2f9 Refactor WaveFormatHeader::parse() 2019-06-16 18:06:31 +02:00
Martchus c9e1dde70b Adapt to changes in c++utilities 2019-06-12 20:40:45 +02:00
Martchus 5ad00a083c Adapt to changes in c++utilities 2019-06-10 23:11:39 +02:00
Martchus 7efa7a0d5a Adapt to c++utilities v5 2019-05-04 16:04:21 +02:00
Martchus 3332314eb6 Prepare logging errors when parsing AVC config 2018-08-23 23:20:17 +02:00
Martchus 1dc8fb4839 Detect AV1 in MKV 2018-07-28 14:54:46 +02:00
Martchus 3265e0bea4 Fix documentation which was still using the old namespace 2018-06-03 20:38:32 +02:00
Martchus 0a640c9f7f Fix warnings, mostly about implicit int conversions
This should fix all non-erros, leaving only warnings which
are indeed potential problems.

The following warnings should be safe to ignore:

* Conversions of various offsets from uint64 to
  std::streamoff/int64 are safe because such offsets have
  been obtained via tellg() and other functions
  returning std::streamoff in the first place.
* It also works vice-versa since tellg() should not
  return negative offsets with exceptions enabled.
* Conversions from char to unsigned char are also ok.
* Unused diag arguments can be ignored (those might be
  useful later).
* Annotate all intended fallthoughs.
2018-06-02 23:04:53 +02:00
Martchus 2431889b64 Apply clang-format 2018-05-13 00:25:14 +02:00
Martchus 62999e0be6 Fix usage of enable_if with GCC 8
Seems like the trick with the three dots isn't working
with GCC 8 anymore. So let's make it a default template
parameter then.

Not sure whether GCC 8 is here correct and whether this
workaround causes further trouble.
2018-05-07 23:52:38 +02:00
Martchus c0336ed4bb Apply clang-format 2018-03-07 01:17:50 +01:00
Martchus 0e15c74103 Move everything into namespace TagParser 2018-03-06 23:09:15 +01:00
Martchus 36511fcc13 Add progress feedback and diagnostics replacing status provider 2018-03-06 22:44:01 +01:00
Martchus a1547f9365 Fix some style issues 2017-09-14 18:19:30 +02:00
Martchus ce92665848 Fix making TrackEntry element 2017-09-14 18:17:31 +02:00
Martchus a49c1cbbe9 Assume English as default language for Mkv tracks 2017-08-17 19:08:54 +02:00
Martchus 66532353c7 Read track statistics from Matroska tags 2017-06-27 00:36:32 +02:00
Martchus 6741e9ca0f Set Matroska track meta-data when element not present 2017-06-14 22:46:33 +02:00
Martchus 9b0d74b6ad Implement applying changed track meta-data for Mkv 2017-06-11 22:57:28 +02:00
Martchus 8d08314e3b Introduce MatroskaTrackHeaderMaker
First step to implement applying changed track
meta-data for Matroska
2017-06-11 01:21:56 +02:00
Martchus 6ff8a587ba Detect H.265 format in Matroska 2017-05-08 23:23:57 +02:00
Martchus 911026fb1c Add DVB subtitles format 2017-04-30 02:02:10 +02:00
Martchus 549028c0cf Calculate AVC pic size as soon as possible
so the size is calculated when further parsing fails
2016-08-06 21:54:35 +02:00
Martchus 58411bc8c5 Improve subtitle format names and media types 2016-07-11 20:58:12 +02:00
Martchus 56d13d326d use pixel size as display size if display size not specified 2016-03-13 18:23:13 +01:00
Martchus 488fce3ab8 parsing AVC config 2016-02-17 20:19:05 +01:00
Martchus 098a0bdef8 added Opus 2016-01-16 17:41:52 +01:00
Martchus 7ae0aee4f7 set extension channel config to stereo if PS is present 2015-09-24 01:15:27 +02:00
Martchus faa40944bf changed handling of SBR/PS AAC extension 2015-09-24 00:19:04 +02:00
Martchus cdb649653c added VP9 2015-09-16 17:25:45 +02:00
Martchus aa50c2d8b3 fixed includes 2015-09-06 19:57:33 +02:00
Martchus b1eb6faba6 fixed includes 2015-09-06 15:42:18 +02:00
Martchus 3d6c7f33d9 parse audio specific config for AAC tracks in MKV container (exposed API
in Mp4Track to do that)
renamed sampleRate to samplingFrequency
2015-08-13 03:23:28 +02:00
Martchus 8618172f81 improved detection of media formats in Matroska and MP4 files 2015-07-07 03:01:48 +02:00
Martchus 7106e8650b improved format detection 2015-06-12 02:35:50 +02:00
Martchus 5ceb7891e5 parse FOURCCs found in MKV files 2015-06-11 00:27:34 +02:00
Martchus 43c33adedf improved detection of format of MP4 audio tracks 2015-06-10 01:28:22 +02:00
Martchus c452b009ae improved media format detection; other minor improvements 2015-06-07 00:18:28 +02:00
Martchus 033e313c74 First commit 2015-04-22 19:22:01 +02:00