dcpomatic.git
3 years agoAdd basic unit test for the disk writer code.
Carl Hetherington [Tue, 1 Dec 2020 23:41:03 +0000 (00:41 +0100)]
Add basic unit test for the disk writer code.

3 years agoAllow nanomsg to be null.
Carl Hetherington [Tue, 1 Dec 2020 23:40:44 +0000 (00:40 +0100)]
Allow nanomsg to be null.

3 years agoAllow PrivilegeEscalator to be disabled during tests.
Carl Hetherington [Tue, 1 Dec 2020 23:34:09 +0000 (00:34 +0100)]
Allow PrivilegeEscalator to be disabled during tests.

3 years agoEnable TYPE_DISK logging by default.
Carl Hetherington [Tue, 1 Dec 2020 23:33:51 +0000 (00:33 +0100)]
Enable TYPE_DISK logging by default.

3 years agoMove a load of disk writing code to src/lib/ext.cc.
Carl Hetherington [Tue, 1 Dec 2020 22:12:18 +0000 (23:12 +0100)]
Move a load of disk writing code to src/lib/ext.cc.

3 years agoBump libdcp for SoundAsset::equals() fix.
Carl Hetherington [Sun, 29 Nov 2020 20:07:54 +0000 (21:07 +0100)]
Bump libdcp for SoundAsset::equals() fix.

3 years agoObey audio timestamps if they don't deviate by more than some threshold.
Carl Hetherington [Sat, 28 Nov 2020 23:51:38 +0000 (00:51 +0100)]
Obey audio timestamps if they don't deviate by more than some threshold.

Previously we would ignore audio timestamps because they are not
contiguous in a sample-accurate way.

However with bugs like #1833 we do need to obey large discontinuities
in audio timestamps, otherwise we get large sync errors.

Here we change timestamp handling to ignore small discontinuities
in timestamps but not larger ones.

3 years agoMissing #includes from previous.
Carl Hetherington [Wed, 2 Dec 2020 09:56:33 +0000 (10:56 +0100)]
Missing #includes from previous.

3 years agoLimit video frame rate text control to numbers.
Carl Hetherington [Tue, 1 Dec 2020 20:44:32 +0000 (21:44 +0100)]
Limit video frame rate text control to numbers.

3 years agoRename refresh_metadata -> reset_metadata.
Carl Hetherington [Tue, 1 Dec 2020 10:36:52 +0000 (11:36 +0100)]
Rename refresh_metadata -> reset_metadata.

3 years agoChanges to crop can be handled with a reset_metadata().
Carl Hetherington [Tue, 1 Dec 2020 10:32:36 +0000 (11:32 +0100)]
Changes to crop can be handled with a reset_metadata().

While playback is happening we need to do that in the butler's
buffers and in the little delay inside Player.

This removes the seek on every crop change, making it a lot
quicker (#1758).

3 years agoAdd VideoRingBuffers::reset_metadata().
Carl Hetherington [Tue, 1 Dec 2020 10:32:11 +0000 (11:32 +0100)]
Add VideoRingBuffers::reset_metadata().

3 years agoAdd missing lock.
Carl Hetherington [Tue, 1 Dec 2020 10:24:41 +0000 (11:24 +0100)]
Add missing lock.

3 years agoGive Butler a weak_ptr<Film>
Carl Hetherington [Mon, 30 Nov 2020 22:49:04 +0000 (23:49 +0100)]
Give Butler a weak_ptr<Film>

3 years agoChange re{set,fresh}_metadata to take a film and a size from the player.
Carl Hetherington [Mon, 30 Nov 2020 22:38:39 +0000 (23:38 +0100)]
Change re{set,fresh}_metadata to take a film and a size from the player.

3 years agoFix loading very (very) old metadata files.
Carl Hetherington [Mon, 30 Nov 2020 20:39:53 +0000 (21:39 +0100)]
Fix loading very (very) old metadata files.

3 years agoFix build error. v2.15.111
Carl Hetherington [Mon, 30 Nov 2020 01:53:05 +0000 (02:53 +0100)]
Fix build error.

3 years agoHide some wx warnings. v2.15.110
Carl Hetherington [Sun, 29 Nov 2020 23:49:50 +0000 (00:49 +0100)]
Hide some wx warnings.

3 years agoFix overlapping group labels in the audio matrix (#1882). v2.15.109
Carl Hetherington [Sun, 29 Nov 2020 23:19:32 +0000 (00:19 +0100)]
Fix overlapping group labels in the audio matrix (#1882).

3 years agoFix test build.
Carl Hetherington [Sun, 29 Nov 2020 23:19:14 +0000 (00:19 +0100)]
Fix test build.

3 years agoBetter progress reporting during DCP validation (#1812). v2.15.108
Carl Hetherington [Sat, 28 Nov 2020 01:42:50 +0000 (02:42 +0100)]
Better progress reporting during DCP validation (#1812).

3 years agoMove some test references into test-private.
Carl Hetherington [Sun, 29 Nov 2020 21:49:05 +0000 (22:49 +0100)]
Move some test references into test-private.

3 years agoFix over-read behaviour of FileGroup to be the same on all platforms.
Carl Hetherington [Fri, 27 Nov 2020 22:30:13 +0000 (23:30 +0100)]
Fix over-read behaviour of FileGroup to be the same on all platforms.

Instead of relying on the operating system's behaviour when seeking
off the end of a file, keep our own _position.  This normalises
the behaviour between POSIX and Windows.

3 years agoFix running single tests on Windows.
Carl Hetherington [Fri, 27 Nov 2020 22:27:14 +0000 (23:27 +0100)]
Fix running single tests on Windows.

3 years agoMore macOS build fixes.
Carl Hetherington [Thu, 26 Nov 2020 20:14:22 +0000 (21:14 +0100)]
More macOS build fixes.

3 years agomacOS build fix.
Carl Hetherington [Thu, 26 Nov 2020 19:11:57 +0000 (20:11 +0100)]
macOS build fix.

3 years agoIf we don't query a server (because we already know about it)
Carl Hetherington [Thu, 26 Nov 2020 01:05:25 +0000 (02:05 +0100)]
If we don't query a server (because we already know about it)
the "last seen time" will never be updated, so the server will
be discarded.

It seems that we should always ping servers (so that set_seen gets
called on receipt of the response), no matter whether
"auto-discovered" or configured, so that the "discard" code doesn't
kick in.

Otherwise we remove and re-add our configured servers every
10 seconds, which is inefficient and which possibly triggers
other bugs.

3 years agoIt feels unsafe not to lock _threads_mutex between terminate_threads()
Carl Hetherington [Thu, 26 Nov 2020 01:04:25 +0000 (02:04 +0100)]
It feels unsafe not to lock _threads_mutex between terminate_threads()
and _threads.reset(); move the lock.

3 years agoRemove accidentally-added file.
Carl Hetherington [Wed, 25 Nov 2020 21:46:22 +0000 (22:46 +0100)]
Remove accidentally-added file.

3 years agoCalculate hashes for any referenced assets that do not already have one.
Carl Hetherington [Tue, 24 Nov 2020 00:29:11 +0000 (01:29 +0100)]
Calculate hashes for any referenced assets that do not already have one.

This is necessary so that we always include <Hash> in CPLs even
when referencing DCPs that do not have it.

3 years agoUse a foreach.
Carl Hetherington [Thu, 26 Nov 2020 00:22:13 +0000 (01:22 +0100)]
Use a foreach.

3 years agoDisallow referring to subtitles / closed captions with start trim.
Carl Hetherington [Wed, 25 Nov 2020 22:58:25 +0000 (23:58 +0100)]
Disallow referring to subtitles / closed captions with start trim.

Since per Bv2.1 we can't have subs / closed captions with non-zero
entry point I think we have no choice but to rewrite in that case
(#1802).

3 years agoCheck for inconsistency in settings for referring to text.
Carl Hetherington [Wed, 25 Nov 2020 22:57:52 +0000 (23:57 +0100)]
Check for inconsistency in settings for referring to text.

Just as we do for picture / sound.

3 years agoRemove unused method.
Carl Hetherington [Wed, 25 Nov 2020 12:14:44 +0000 (13:14 +0100)]
Remove unused method.

3 years agoFix corrupted image when over-cropping black filler frames.
Carl Hetherington [Tue, 24 Nov 2020 23:11:55 +0000 (00:11 +0100)]
Fix corrupted image when over-cropping black filler frames.

FFmpegDecoder can emit small black frames (128x128 pixels) when it
wants to fill in a gap.  Image::crop_scale_window would do the wrong
thing if we then applied a crop of greater than 128 in either direction;
though cropped_size is correctly clamped, the crop value itself was
not and is used to calculate the input data pointers.

This would result in random frames, usually at the end of DCPs,
often made up of blurry colour washes.

3 years agoFix the behaviour of FileGroup when seeking too far.
Carl Hetherington [Tue, 24 Nov 2020 22:01:04 +0000 (23:01 +0100)]
Fix the behaviour of FileGroup when seeking too far.

Previously, if you did a seek off the end of the file group,
the seek would return an error.

This is not what fseek() does; it returns no error, and preserves
the file pointer (returned by ftell()) as if the seek had been
successful.  fread()s after a too-far seek return no data, of
course.

Parsing some files (the example used to find the bug was a
H264 MP4) involves a seek which is to the byte after the end
of the mp4 file.  If this fails the whole header parsing fails
and DCP-o-matic refuses to use the file.

3 years agoFix uninitialised variable.
Carl Hetherington [Tue, 24 Nov 2020 21:50:39 +0000 (22:50 +0100)]
Fix uninitialised variable.

3 years agoUpdated nl_NL translation from Rob van Nieuwkerk.
Carl Hetherington [Tue, 24 Nov 2020 02:00:39 +0000 (03:00 +0100)]
Updated nl_NL translation from Rob van Nieuwkerk.

3 years agoBump libdcp for ExtensionMetadata tags (#1808).
Carl Hetherington [Sun, 22 Nov 2020 22:42:51 +0000 (23:42 +0100)]
Bump libdcp for ExtensionMetadata tags (#1808).

3 years agoRemove swaroop variant.
Carl Hetherington [Mon, 23 Nov 2020 12:58:33 +0000 (13:58 +0100)]
Remove swaroop variant.

3 years agopot/merge.
Carl Hetherington [Sat, 21 Nov 2020 22:59:24 +0000 (23:59 +0100)]
pot/merge.

3 years agoUpdate ISDCF name when subtitle language metadata changes (related to #1737).
Carl Hetherington [Sat, 21 Nov 2020 22:09:57 +0000 (23:09 +0100)]
Update ISDCF name when subtitle language metadata changes (related to #1737).

3 years agoRemove the "simple" UI (#1868).
Carl Hetherington [Sat, 21 Nov 2020 22:00:55 +0000 (23:00 +0100)]
Remove the "simple" UI (#1868).

It just seemed to cause more problems than it solved; mainly people
enabling it by mistake and then being told to click buttons that
they could not see.

3 years agoAdd hint when making a FTR without FFEC/FFMC markers (#1804).
Carl Hetherington [Sat, 21 Nov 2020 21:38:45 +0000 (22:38 +0100)]
Add hint when making a FTR without FFEC/FFMC markers (#1804).

3 years agoTidy up Hints a bit.
Carl Hetherington [Fri, 20 Nov 2020 23:04:52 +0000 (00:04 +0100)]
Tidy up Hints a bit.

3 years agoTest update for auto-addition of markers.
Carl Hetherington [Sat, 21 Nov 2020 13:43:28 +0000 (14:43 +0100)]
Test update for auto-addition of markers.

3 years agoSubtitle language test updates.
Carl Hetherington [Sat, 21 Nov 2020 01:31:12 +0000 (02:31 +0100)]
Subtitle language test updates.

3 years agoUpdate test data now that empty Language tags are not written.
Carl Hetherington [Fri, 20 Nov 2020 22:46:40 +0000 (23:46 +0100)]
Update test data now that empty Language tags are not written.

3 years agoBump libdcp.
Carl Hetherington [Fri, 20 Nov 2020 20:32:17 +0000 (21:32 +0100)]
Bump libdcp.

3 years agoDon't try to set empty languages on CCAP tracks.
Carl Hetherington [Fri, 20 Nov 2020 20:19:04 +0000 (21:19 +0100)]
Don't try to set empty languages on CCAP tracks.

3 years agoUse a LanguageTag for closed caption tracks.
Carl Hetherington [Fri, 20 Nov 2020 15:52:56 +0000 (16:52 +0100)]
Use a LanguageTag for closed caption tracks.

3 years agoSubtitle language handling tweaks; write multiple subtitle languages
Carl Hetherington [Thu, 19 Nov 2020 23:53:20 +0000 (00:53 +0100)]
Subtitle language handling tweaks; write multiple subtitle languages
to SMPTE extended metadata.

3 years agoFix potential crash if maybe_add_text() fails.
Carl Hetherington [Thu, 19 Nov 2020 23:40:02 +0000 (00:40 +0100)]
Fix potential crash if maybe_add_text() fails.

3 years agoRecover subtitle language metadata from the places is was written
Carl Hetherington [Thu, 19 Nov 2020 14:04:28 +0000 (15:04 +0100)]
Recover subtitle language metadata from the places is was written
in older films.

3 years agoRemove subtitle language from text content.
Carl Hetherington [Wed, 18 Nov 2020 00:31:30 +0000 (01:31 +0100)]
Remove subtitle language from text content.

3 years agoFix label alignment.
Carl Hetherington [Wed, 18 Nov 2020 00:12:09 +0000 (01:12 +0100)]
Fix label alignment.

3 years agoStore subtitle language(s) in Film, and allow setup of those
Carl Hetherington [Wed, 18 Nov 2020 00:06:49 +0000 (01:06 +0100)]
Store subtitle language(s) in Film, and allow setup of those
languages from the Interop/SMPTE metadata dialogues.

3 years agoTidy up button alignment.
Carl Hetherington [Tue, 17 Nov 2020 22:19:19 +0000 (23:19 +0100)]
Tidy up button alignment.

3 years agoMove labelling out of LanguageTagWidget.
Carl Hetherington [Tue, 17 Nov 2020 21:06:49 +0000 (22:06 +0100)]
Move labelling out of LanguageTagWidget.

3 years agoMove make_black_test into image_test.
Carl Hetherington [Fri, 20 Nov 2020 21:53:34 +0000 (22:53 +0100)]
Move make_black_test into image_test.

3 years agoSome tidying up of test Doxygen.
Carl Hetherington [Fri, 20 Nov 2020 21:53:10 +0000 (22:53 +0100)]
Some tidying up of test Doxygen.

3 years agoAlways add FFOC and LFOC markers (#1805).
Carl Hetherington [Fri, 20 Nov 2020 21:51:15 +0000 (22:51 +0100)]
Always add FFOC and LFOC markers (#1805).

3 years agoTweak comment containing Doxygen text group name.
Carl Hetherington [Fri, 20 Nov 2020 21:25:55 +0000 (22:25 +0100)]
Tweak comment containing Doxygen text group name.

3 years agoDisable video range control for DCP content (#1821).
Carl Hetherington [Fri, 20 Nov 2020 20:59:02 +0000 (21:59 +0100)]
Disable video range control for DCP content (#1821).

3 years agoTry to enable all streams in MOV exports.
Carl Hetherington [Fri, 7 Aug 2020 21:41:15 +0000 (23:41 +0200)]
Try to enable all streams in MOV exports.

This is a speculative fix which I haven't tested.

3 years agoMake the default disk writer window wider.
Carl Hetherington [Wed, 18 Nov 2020 00:46:21 +0000 (01:46 +0100)]
Make the default disk writer window wider.

3 years agoFix strange OR operator.
Carl Hetherington [Mon, 16 Nov 2020 23:24:47 +0000 (00:24 +0100)]
Fix strange OR operator.

3 years agoFix cropping of subsampled images.
Carl Hetherington [Mon, 16 Nov 2020 23:00:50 +0000 (00:00 +0100)]
Fix cropping of subsampled images.

The calculations for how to crop subsampled components of YUV images
were wrong, causing strange effects like misregistration of colour
components in cropped images.  Should fix #1872.

3 years agoAdd some lrintf() calls to be sure.
Carl Hetherington [Mon, 16 Nov 2020 22:58:53 +0000 (23:58 +0100)]
Add some lrintf() calls to be sure.

3 years agoUse 64-byte alignment for aligned image memory.
Carl Hetherington [Mon, 16 Nov 2020 22:56:11 +0000 (23:56 +0100)]
Use 64-byte alignment for aligned image memory.

FFmpeg uses this values if AVX512 is available, and with only
32-byte alignment I am seeing strange scaling effects whereby
crop_scale_window_test7 gives black bars down the right side of
cropped images (when run on an i7 7700).

3 years agoBump libdcp for const fix.
Carl Hetherington [Sun, 15 Nov 2020 23:38:23 +0000 (00:38 +0100)]
Bump libdcp for const fix.

3 years agoUpdate test references following 26bd62d1e49b63e47fca820c5b4d36c5dacb9bfd
Carl Hetherington [Sun, 15 Nov 2020 23:32:41 +0000 (00:32 +0100)]
Update test references following 26bd62d1e49b63e47fca820c5b4d36c5dacb9bfd

3 years agoAdd tests of video range.
Carl Hetherington [Sun, 15 Nov 2020 19:50:39 +0000 (20:50 +0100)]
Add tests of video range.

These should hopefully cover all combinations of input and output
range.  Fixes #1851.

3 years agoMake sure we use limited ("video") range data when exporting.
Carl Hetherington [Sun, 15 Nov 2020 19:47:42 +0000 (20:47 +0100)]
Make sure we use limited ("video") range data when exporting.

Our export formats all currently use limited range but we weren't
making sure data fed to the encoders was limited range.

Should fix #1832.

3 years agoAdd catch-all assertion.
Carl Hetherington [Mon, 9 Nov 2020 00:12:10 +0000 (01:12 +0100)]
Add catch-all assertion.

3 years agoFix unnecessary condition.
Carl Hetherington [Mon, 9 Nov 2020 00:12:05 +0000 (01:12 +0100)]
Fix unnecessary condition.

3 years agoFix thinko-ed logic causing all subtitles to be treated as though
Carl Hetherington [Mon, 9 Nov 2020 00:11:20 +0000 (01:11 +0100)]
Fix thinko-ed logic causing all subtitles to be treated as though
they have borders.  This fix will cause some movement of border-less
subtitles (in existing projects) within the video frame.

3 years agoRemove unused code.
Carl Hetherington [Mon, 9 Nov 2020 00:09:22 +0000 (01:09 +0100)]
Remove unused code.

3 years agoFix limited value ranges in properties.
Carl Hetherington [Sun, 8 Nov 2020 22:36:58 +0000 (23:36 +0100)]
Fix limited value ranges in properties.

3 years agoRemove pointless comment.
Carl Hetherington [Sun, 8 Nov 2020 21:37:34 +0000 (22:37 +0100)]
Remove pointless comment.

3 years agoObey requests to change the video range of RGB content.
Carl Hetherington [Sun, 8 Nov 2020 21:34:18 +0000 (22:34 +0100)]
Obey requests to change the video range of RGB content.

Video that comes in with RGB pixels will not have its video level
ranges changed by libswscale (it only does this for YUV and greyscale).
Here we add code to do it ourselves for RGB content coming in
via image files (e.g. PNG/DPX etc).  Part of #1851.

3 years agoAdd some more pixel formats to hack/pixfmts.c
Carl Hetherington [Sun, 8 Nov 2020 21:28:24 +0000 (22:28 +0100)]
Add some more pixel formats to hack/pixfmts.c

3 years agoAdd LanguageTagWidget and use it for the SMPTE metadata.
Carl Hetherington [Sun, 15 Nov 2020 22:16:56 +0000 (23:16 +0100)]
Add LanguageTagWidget and use it for the SMPTE metadata.

3 years agoFix invisible subtag lists in some cases.
Carl Hetherington [Sun, 15 Nov 2020 22:15:57 +0000 (23:15 +0100)]
Fix invisible subtag lists in some cases.

On Debian 10 / GTK3 (at least) sometimes when you add a new subtag
the searchable list isn't displayed until you scroll it a little.

This hack seems to fix that.

3 years agoAdd Remove button to language tag dialogue.
Carl Hetherington [Sun, 15 Nov 2020 21:36:59 +0000 (22:36 +0100)]
Add Remove button to language tag dialogue.

3 years agoImprove text panel layout with GTK3's enormous spin controls.
Carl Hetherington [Sun, 15 Nov 2020 20:25:09 +0000 (21:25 +0100)]
Improve text panel layout with GTK3's enormous spin controls.

3 years agoFix uninitialised variable (affecting tests only).
Carl Hetherington [Sat, 14 Nov 2020 16:22:26 +0000 (17:22 +0100)]
Fix uninitialised variable (affecting tests only).

3 years agoFix finding of subtitles when clicking in the list view.
Carl Hetherington [Fri, 13 Nov 2020 16:37:08 +0000 (17:37 +0100)]
Fix finding of subtitles when clicking in the list view.

I didn't look into this as deeply as I probably should have, but
it seems there's some rounding error which means we don't always
hit the subtitle's frame unless we add one on.

3 years agoMore vertical alignment fixes.
Carl Hetherington [Fri, 13 Nov 2020 16:37:04 +0000 (17:37 +0100)]
More vertical alignment fixes.

3 years agoRemove assertion checking that rotations are a multiple of 90.
Carl Hetherington [Wed, 11 Nov 2020 22:35:32 +0000 (23:35 +0100)]
Remove assertion checking that rotations are a multiple of 90.

This is checked later, anyway (without asserting) and we have seen
files in the wild with other rotations (e.g. -135.62) which do not
appear to need rotation to be applied.

Fixes #1871.

Backported-from-commit: f235ed07f969e1b8b9d3d05082dcdd68ceae771e
Backported-from-branch: master

3 years agoRemove references to / support for old RtError class (now RtAudioError).
Carl Hetherington [Sun, 8 Nov 2020 21:13:34 +0000 (22:13 +0100)]
Remove references to / support for old RtError class (now RtAudioError).

3 years agoFix start_player() on macOS (#1870). v2.15.107
Carl Hetherington [Thu, 5 Nov 2020 20:36:32 +0000 (21:36 +0100)]
Fix start_player() on macOS (#1870).

3 years agoRename a variable and add some logging to start_tool on macOS.
Carl Hetherington [Thu, 5 Nov 2020 20:36:16 +0000 (21:36 +0100)]
Rename a variable and add some logging to start_tool on macOS.

3 years agoFix video waveform view with GL backend.
Carl Hetherington [Thu, 5 Nov 2020 21:12:27 +0000 (22:12 +0100)]
Fix video waveform view with GL backend.

3 years agoFix some alignment.
Carl Hetherington [Thu, 5 Nov 2020 20:52:07 +0000 (21:52 +0100)]
Fix some alignment.

3 years agoRe-add mutex that was taken away in
Carl Hetherington [Wed, 4 Nov 2020 22:33:10 +0000 (23:33 +0100)]
Re-add mutex that was taken away in
73ebb92e9df01ba7afb97121b6e2cef6ca13a18e

I'm not sure why it was removed, and it seems necessary;
servers_list_changed() can be called from a variety of different places
(the constructor and two different EncodeServerFinder threads).

May help with #1854.

3 years agoMove video frame rate override into advanced prefs (#1852).
Carl Hetherington [Tue, 3 Nov 2020 23:17:53 +0000 (00:17 +0100)]
Move video frame rate override into advanced prefs (#1852).

3 years agoFix crash on Linux (and maybe others).
Carl Hetherington [Tue, 3 Nov 2020 23:15:30 +0000 (00:15 +0100)]
Fix crash on Linux (and maybe others).

Calling _canvas->SetCurrent() without the canvas being on screen
causes a crash on Linux (and maybe elsewhere).

3 years agoRevert "Re-allow audio channel 15 to be mapped so that users can add"
Carl Hetherington [Tue, 3 Nov 2020 19:52:56 +0000 (20:52 +0100)]
Revert "Re-allow audio channel 15 to be mapped so that users can add"

This reverts commit 4cf45229bf55344e708fead769f694f13bacf39c.
It's wrong - the sign language channel is 15 (1-indexed) not 15
(0-indexed) as in this commit.

3 years agoAdd some tests. v2.15.106
Carl Hetherington [Sun, 1 Nov 2020 23:11:50 +0000 (00:11 +0100)]
Add some tests.