Commit Graph

14301 Commits

Author SHA1 Message Date
Moritz Bunkus
6ddd872713
convert video packetizers to take int64_t default duration, not double FPS 2021-07-05 15:56:21 +02:00
Moritz Bunkus
4c57df14ea
MPEG PS, ES readers: fix display width calculation on 32-bit platforms 2021-07-05 13:25:12 +02:00
Moritz Bunkus
89ae6c11d6
tests: re-do runtimes for each test case 2021-07-05 13:19:41 +02:00
Moritz Bunkus
eac9b4971f
tests: use shorter file for test 493 2021-07-04 22:36:23 +02:00
Moritz Bunkus
445306ca0f
cast mpq_rational to int64_t via int128_t
Casting directly from certain values of
`boost::multiprecision::mpq_rational` via `static_cast<int64_t>()`
fails on certain platforms (32-bit ones, mingw both 32 & 64-bit). A
workaround seems to be to convert to `boost::multiprecision::int128_t`
first.

See https://github.com/boostorg/multiprecision/issues/342
2021-07-04 21:08:35 +02:00
Moritz Bunkus
5344602025
fix compilation with older versions of Boost's multi-precision library
The older versions have incomplete constructors for
`boost::multiprecision::number` when used with the `gmp_rational`
backend. When trying to specify both a numerator and a denominator,
the numerator argument is supposed to be a `gmp_rational` while the
denominator can only be an (unsigned) int. This means that trying to
pass a 64-bit integer as the denominator will not work as no matching
constructor is found.

The workaround is to convert both the numerator and the denominator to
instances of `…number<gmp_rational>` and passing those to the
constructor of `…number<gmp_rational>`.
2021-07-04 16:56:35 +02:00
Moritz Bunkus
96268fa972
macOS build: build the gmp library 2021-07-04 14:03:39 +02:00
Moritz Bunkus
7a21dcc7ed
MXE setup: remove the file library 2021-07-04 12:50:34 +02:00
Moritz Bunkus
e285856943
MXE setup: compile the gmp library 2021-07-04 12:49:25 +02:00
Moritz Bunkus
95a1fa6ac8
MXE setup: use gcc 10 2021-07-04 12:49:17 +02:00
Moritz Bunkus
2f22fecc6d
use boost::multiprecision for rationals instead of boost::rational 2021-07-04 12:44:36 +02:00
Moritz Bunkus
32f3cdc2fd
rename type int64_rational_c to mtx_mp_rational_t 2021-07-04 12:44:36 +02:00
Moritz Bunkus
020f053ad7
include Boost's multi-precision type in common.h; declare own type for it 2021-07-04 12:44:36 +02:00
Moritz Bunkus
213ed8514a
use gmp backend for Boost Multiprecision 2021-07-04 12:44:36 +02:00
Moritz Bunkus
409bfbe460
Revert "GUI: source file: use = default for copy constructor"
This reverts commit b46089387c.

With the patch applied the default copy constructor only copies the
shared pointers to the other files & tracks & attachments — but we
need a deep copy here. Otherwise invalid memory access will happen (or
rather, the GUI's `MuxConfig::verifyStructure()` recognizes the
problem and aborts with the message "track->m_file == nullptr in level
0 file").

Fixes #3157.
2021-06-30 14:54:14 +02:00
Moritz Bunkus
282a86caf1
GUI: fix compilation 2021-06-29 20:00:39 +02:00
Moritz Bunkus
ee6e0816dc
remove unnecessary [[maybe_unused]] 2021-06-29 20:00:15 +02:00
Moritz Bunkus
7b94a3cef6
fix compilation 2021-06-29 17:01:45 +02:00
Andrei Stepanov
67aae7ba3f
translations: update Russian 2021-06-29 16:43:14 +02:00
Roberto Boriotti
db8146006c
translations: update Italian 2021-06-29 16:43:07 +02:00
TMTisFree
f237df4e7d
translations: update French 2021-06-29 16:43:01 +02:00
Israel Lucas Torrijos
521ac058b2
translations: update Spanish 2021-06-29 16:42:54 +02:00
Antoni Bella Pérez
1813edf205
translations: update Catalan 2021-06-29 16:42:43 +02:00
Симеон Цветков
198f9b3f83
translations: update Bulgarian 2021-06-29 16:42:20 +02:00
Симеон Цветков
c0f668caa8
man page translations: update Bulgarian 2021-06-29 16:42:13 +02:00
Moritz Bunkus
ba1e50e877
GUI: mux: show command line: use \ for cmd.exe, / for Linux shells
Fixes #3155.
2021-06-29 16:29:32 +02:00
Moritz Bunkus
c80a3b576b
NEWS: be more specific where to find newly added options 2021-06-27 19:14:11 +02:00
Moritz Bunkus
98fc252fa7
translations: update list of translatable strings; update German translation 2021-06-27 19:14:11 +02:00
Moritz Bunkus
450ac94fdd
GUI: prefs: make file/track colors configurable 2021-06-27 19:14:11 +02:00
Симеон Цветков
74b0e40efc
translations: update Serbian Cyrillic 2021-06-27 13:04:13 +02:00
Timofey Lisunov
387bdc5607
translations: update Russian 2021-06-27 13:04:01 +02:00
Roberto Boriotti
cde8ff7f1f
translations: update Italian 2021-06-27 13:03:52 +02:00
TMTisFree
b193b2adad
translations: update French 2021-06-27 13:03:46 +02:00
Симеон Цветков
77c24ffd86
translations: update Bulgarian 2021-06-27 13:03:36 +02:00
Симеон Цветков
ab01e8f346
man page translations: update Bulgarian 2021-06-27 13:03:30 +02:00
Moritz Bunkus
a8b1eab3dc
remove remaining occurrences of PCRE2 & JPCRE2 2021-06-27 12:53:38 +02:00
Moritz Bunkus
5b48216b27
convert usage of JPCRE2/PCRE2 to QRegularExpression, part 5 2021-06-27 12:48:13 +02:00
Moritz Bunkus
b7f90d744d
GUI: mux: show colored boxes to indicate which file each track comes from 2021-06-26 23:55:07 +02:00
Moritz Bunkus
ebc9d29e02
convert usage of JPCRE2/PCRE2 to QRegularExpression, part 4 2021-06-26 21:02:31 +02:00
Moritz Bunkus
5e5ea3c3a0
convert usage of JPCRE2/PCRE2 to QRegularExpression, part 3 2021-06-26 20:01:20 +02:00
Moritz Bunkus
60bcc34579
SRT reader: reencode when reading the lines, not in the packetizer
Two advantages:

1. This way invalid UTF-8 characters will be replaced by the Unicode
   Replacement Character U+FFFD instead of keeping invalid UTF-8
   encodings in text.

2. Preparation for the conversion from (J)PCRE2 to QRegularExpression
   which requires converting between UTF-8-encoded `std::string` and
   QString.
2021-06-26 19:44:09 +02:00
Moritz Bunkus
71352af1b1
convert usage of JPCRE2/PCRE2 to QRegularExpression, part 2 2021-06-26 16:53:49 +02:00
Moritz Bunkus
91edd12959
convert usage of JPCRE2/PCRE2 to QRegularExpression, part 1 2021-06-26 12:22:32 +02:00
Moritz Bunkus
16c42b5f30
translations: update list of translatable strings; update German translation 2021-06-26 11:35:04 +02:00
Burak Yavuz
826f4802b2
translations: update Turkish 2021-06-26 11:27:24 +02:00
Timofey Lisunov
9b71124f65
translations: update Russian 2021-06-26 11:27:20 +02:00
Roberto Boriotti
41d0dea1d0
translations: update Italian 2021-06-26 11:27:12 +02:00
Moritz Bunkus
98f9c4d94c
GUI: mux: detect file name sequences & append second&rest to first file
A sequence is detected as follows:

1. The current file name is split into three parts if possible: a
   prefix, a running number and a digit-less suffix.

2. If successful, the result is compared with the result of the same
   split for the previous file name. They're considered to be in
   sequence if the previous file name's prefix & suffix match the
   current file name's prefix & suffix and if the current running
   number is higher than the previous one by 1.

In such a case only the first file is added. The other files in the
same sequence will be appended to the first one.

Implements #2866.
2021-06-26 11:26:18 +02:00
Moritz Bunkus
f6c2f03048
translations: update list of translatable strings; update German translation 2021-06-25 22:22:56 +02:00
Moritz Bunkus
981515f501
GUI: mux: implement sorting files & tracks by track type when adding them
The order is: video first followed by audio, subtitles and other
types.

For files this means that a file without video tracks will be inserted
after one with one or more video tracks.

In general the files & tracks are inserted before the first
entry (file respectively track) that has a lower priority than the
entry to insert. For example, let's assume that the user has already
added one video, three audio and three subtitle tracks and they're
currently ordered as follows:

* existing video
* existing audio 1
* existing audio 2
* existing subtitles 1
* existing subtitles 2
* existing subtitles 3
* existing audio 3

When adding audio track number 4 the GUI will start comparing the
track priorities starting at the top. The first existing entry with a
priority lower than the new entry to add (a new audio track) is the
first subtitles track, "existing subtitles 1". The new order will
therefore look as follows:

* existing video
* existing audio 1
* existing audio 2
* newly added audio 4
* existing subtitles 1
* existing subtitles 2
* existing subtitles 3
* existing audio 3

This option only determines the initial order. The user can still
change the order manually as they see fit afterwards.

The option is enabled by default.

Implements #2366.
2021-06-25 22:16:36 +02:00