dcpomatic.git
5 months agoAnother macOS std::list boost::thread SNAFU.
Carl Hetherington [Wed, 19 Feb 2020 21:22:23 +0000 (22:22 +0100)]
Another macOS std::list boost::thread SNAFU.

5 months agoCan't put boost::thread in a std::list with our macOS compiler.
Carl Hetherington [Wed, 19 Feb 2020 20:55:04 +0000 (21:55 +0100)]
Can't put boost::thread in a std::list with our macOS compiler.

5 months agoMerge branch 'v2.15.x' of ssh://git.carlh.net/home/carl/git/dcpomatic into v2.15.x
Carl Hetherington [Wed, 19 Feb 2020 19:13:53 +0000 (20:13 +0100)]
Merge branch 'v2.15.x' of ssh://git.carlh.net/home/carl/git/dcpomatic into v2.15.x

5 months agoIt may not be allowed to request a zero timeout on macOS.
Carl Hetherington [Wed, 19 Feb 2020 19:13:49 +0000 (20:13 +0100)]
It may not be allowed to request a zero timeout on macOS.

5 months agoNicer fix for 2D-labelled-3D checking from master.
Carl Hetherington [Wed, 19 Feb 2020 16:23:21 +0000 (17:23 +0100)]
Nicer fix for 2D-labelled-3D checking from master.

5 months agoRemove incorrect comment.
Carl Hetherington [Tue, 18 Feb 2020 19:21:56 +0000 (20:21 +0100)]
Remove incorrect comment.

5 months agoWrite logs during tests to a file.
Carl Hetherington [Tue, 18 Feb 2020 19:21:51 +0000 (20:21 +0100)]
Write logs during tests to a file.

5 months agoRemove unused variable.
Carl Hetherington [Tue, 18 Feb 2020 19:21:38 +0000 (20:21 +0100)]
Remove unused variable.

5 months agoMake a new AudioBuffers constructor and use it to avoid some use of the more complica...
Carl Hetherington [Sun, 16 Feb 2020 21:23:28 +0000 (22:23 +0100)]
Make a new AudioBuffers constructor and use it to avoid some use of the more complicated copy_from.

5 months agoBetter errors if butler doesn't give video during export.
Carl Hetherington [Sun, 16 Feb 2020 20:15:12 +0000 (21:15 +0100)]
Better errors if butler doesn't give video during export.

5 months agoNew test bits.
Carl Hetherington [Sun, 16 Feb 2020 19:44:13 +0000 (20:44 +0100)]
New test bits.

5 months agoJust having no specified lines value does not mean we definitely need place the subti...
Carl Hetherington [Sun, 16 Feb 2020 19:39:47 +0000 (20:39 +0100)]
Just having no specified lines value does not mean we definitely need place the subtitle ourselves.

5 months agoNudge L/R-aligned subs in from the edge of the screen; do our own placement of subs...
Carl Hetherington [Thu, 13 Feb 2020 23:28:15 +0000 (00:28 +0100)]
Nudge L/R-aligned subs in from the edge of the screen; do our own placement of subs with no screen height in lines specified.

5 months agoRename and extend check_packets.py
Carl Hetherington [Thu, 13 Feb 2020 16:29:47 +0000 (17:29 +0100)]
Rename and extend check_packets.py

6 months agoFix crash.
Carl Hetherington [Thu, 6 Feb 2020 20:56:49 +0000 (21:56 +0100)]
Fix crash.

6 months agoFix crash with bitmapped subs that have zero width or height.
Carl Hetherington [Thu, 6 Feb 2020 09:34:30 +0000 (10:34 +0100)]
Fix crash with bitmapped subs that have zero width or height.

6 months agoAdd new script.
Carl Hetherington [Tue, 28 Jan 2020 11:49:08 +0000 (12:49 +0100)]
Add new script.

6 months agoVarious improvements to make_dummy_files
Carl Hetherington [Tue, 28 Jan 2020 11:49:00 +0000 (12:49 +0100)]
Various improvements to make_dummy_files

6 months agoVarious thread cleanups.
Carl Hetherington [Thu, 30 Jan 2020 21:54:38 +0000 (22:54 +0100)]
Various thread cleanups.

6 months agoUse a non-pointer boost::thread and a std::atomic for the stop flag.
Carl Hetherington [Thu, 30 Jan 2020 21:19:17 +0000 (22:19 +0100)]
Use a non-pointer boost::thread and a std::atomic for the stop flag.

6 months agoMissing #include for previous.
Carl Hetherington [Tue, 28 Jan 2020 22:49:07 +0000 (23:49 +0100)]
Missing #include for previous.

6 months agoFix deadlock during content examination.
Carl Hetherington [Tue, 28 Jan 2020 22:23:47 +0000 (23:23 +0100)]
Fix deadlock during content examination.

Before this fix, the following situation could happen in threads
A and B:

A: Some DONE signal happens; this triggers setup_pieces which
   takes a lock on the player mutex.

B: FFmpegContent::examine takes a lock on the content mutex.
B: FFmpegContent::examine adds a stream
B: That causes STREAMS PENDING to be emitted.
B: This tries to take a lock on the player mutex so it can update _suspended

A: setup_pieces tries to access some content information, hence
   tries to take a lock on the content mutex.

Now B is holding the CL and awaiting the PL and A is holding
the PL and awaiting the CL.

It feels like the root cause of this is that while setup_pieces
is happening another change (which would itself cause setup_pieces)
is announced, and this isn't dealt with properly.

There are two steps here; _suspended is protected with an atomic
rather than using _mutex, and also it can cope with being updated
recursively.

6 months agoFix crash with sub-sample push parts in AudioMerger. v2.15.42
Carl Hetherington [Mon, 27 Jan 2020 23:19:52 +0000 (23:19 +0000)]
Fix crash with sub-sample push parts in AudioMerger.

Forward-ported from b86b15391074a68149f8c4a51958c7873d74def0 in master.

6 months agoFix missing preferences icon on macOS.
Carl Hetherington [Mon, 27 Jan 2020 19:27:52 +0000 (20:27 +0100)]
Fix missing preferences icon on macOS.

6 months agoWarn if doing a gain calculation might cause clipping.
Carl Hetherington [Sat, 25 Jan 2020 22:59:24 +0000 (23:59 +0100)]
Warn if doing a gain calculation might cause clipping.

6 months agoApply fader-based gain calculations to the current gain, not 0dB.
Carl Hetherington [Sat, 25 Jan 2020 22:26:31 +0000 (23:26 +0100)]
Apply fader-based gain calculations to the current gain, not 0dB.

6 months agoAnother thinko fix.
Carl Hetherington [Sat, 25 Jan 2020 20:13:33 +0000 (21:13 +0100)]
Another thinko fix.

6 months agoFix thinko two commits ago.
Carl Hetherington [Sat, 25 Jan 2020 09:05:34 +0000 (10:05 +0100)]
Fix thinko two commits ago.

6 months agoCache film length for Player::pass.
Carl Hetherington [Tue, 23 Jul 2019 21:55:15 +0000 (22:55 +0100)]
Cache film length for Player::pass.

6 months agoUse memset for zeroing float buffers; it's faster, and I think
Carl Hetherington [Tue, 23 Jul 2019 21:45:04 +0000 (22:45 +0100)]
Use memset for zeroing float buffers; it's faster, and I think
we get away with it on all the platforms we care about.

6 months agoSupport binary STL subtitle files.
Carl Hetherington [Thu, 23 Jan 2020 14:37:37 +0000 (15:37 +0100)]
Support binary STL subtitle files.

6 months agoAdd patron.
Carl Hetherington [Fri, 17 Jan 2020 00:21:44 +0000 (01:21 +0100)]
Add patron.

6 months agoMake FileError say what path the problem was with.
Carl Hetherington [Thu, 16 Jan 2020 15:41:19 +0000 (16:41 +0100)]
Make FileError say what path the problem was with.

6 months agoAdd some PT-style names to the guesswork on which channel a particular sound file...
Carl Hetherington [Tue, 14 Jan 2020 21:53:38 +0000 (22:53 +0100)]
Add some PT-style names to the guesswork on which channel a particular sound file belongs to.

6 months agoStop invalid dates causing boost::posix_time to raise exceptions.
Carl Hetherington [Sun, 12 Jan 2020 23:44:00 +0000 (00:44 +0100)]
Stop invalid dates causing boost::posix_time to raise exceptions.

7 months agoswaroop variant build fix.
Carl Hetherington [Sun, 12 Jan 2020 22:19:46 +0000 (23:19 +0100)]
swaroop variant build fix.

7 months agoDon't truncate active_video_frame_rate to an int otherwise setting fade on non-intege... v2.15.41
Carl Hetherington [Fri, 10 Jan 2020 14:20:17 +0000 (15:20 +0100)]
Don't truncate active_video_frame_rate to an int otherwise setting fade on non-integer-rate sources behaves oddly.

7 months agoFix deadlock.
Carl Hetherington [Fri, 10 Jan 2020 14:13:35 +0000 (15:13 +0100)]
Fix deadlock.

7 months agoGive DCPDecoder its own ::position which just returns its internal
Carl Hetherington [Thu, 9 Jan 2020 23:52:20 +0000 (23:52 +0000)]
Give DCPDecoder its own ::position which just returns its internal
_next time.

This is important because Decoder::position does the wrong thing
with DCPs in the following case.

1.  DCPDecoder emits a subtitle event (start/stop) at time t.
2.  There follows a long time T with no subtitle events.  During
    this time the DCPDecoder's position is reported as t (since
    TextDecoder notes its position as the time of the last thing
    it emitted --- which is all it reasonably can do, I think).
3.  During this T the DCPDecoder may be incorrectly pass()ed because
    its position is reported as earlier than it really is; this results
    in video/audio being emitted by the DCPDecoder but other contemporary
    sources may not be pass()ed.

The upshot of this can be that no audio is emitted, as a contemporary audio
source is not pass()ed and hence the merger is waiting for audio that will
take a long time to come.  When the butler is running this can result in
audio underruns as the video buffers overflow with no sign of any audio.

It is also simpler this way; DCPDecoder was already maintaining the required
information.

7 months agoUpdate text panel 'why not' note when film's standard is changed.
Carl Hetherington [Thu, 9 Jan 2020 22:22:22 +0000 (23:22 +0100)]
Update text panel 'why not' note when film's standard is changed.

Forward-ported from e8582393bd1367fff36bae8e053d799073d8b2ed in master.

7 months agoMake the 'why not' messages for VF a bit clearer.
Carl Hetherington [Thu, 9 Jan 2020 22:24:32 +0000 (23:24 +0100)]
Make the 'why not' messages for VF a bit clearer.

Before it sounded like just because we couldn't refer to (e.g.) the audio
we couldn't refer to any part of the DCP.

7 months agoMerge a set of changes which run the OpenGL video updates in a separate v2.15.40
Carl Hetherington [Wed, 8 Jan 2020 21:22:01 +0000 (22:22 +0100)]
Merge a set of changes which run the OpenGL video updates in a separate
thread, hopefully making things more elegant and robust.

7 months agoFirst version of player stress-test management script.
Carl Hetherington [Wed, 11 Dec 2019 23:45:16 +0000 (00:45 +0100)]
First version of player stress-test management script.

7 months agoSome comments.
Carl Hetherington [Mon, 25 Nov 2019 23:37:42 +0000 (00:37 +0100)]
Some comments.

7 months agoSome simple-video-view tidy-ups.
Carl Hetherington [Mon, 25 Nov 2019 23:33:46 +0000 (00:33 +0100)]
Some simple-video-view tidy-ups.

7 months agoFix problems when starting to play after a seek, if the start
Carl Hetherington [Mon, 25 Nov 2019 23:32:37 +0000 (00:32 +0100)]
Fix problems when starting to play after a seek, if the start
of playback happens while we are awaiting an idle handler to
go through to update the view after the seek.

If this idle handler has not gone through the viewer will report
an incorrect position, which is used by the FilmViewer to start
the audio stream at the wrong time.

7 months agoUse glTexSubImage2D when possible, as suggested by https://www.khronos.org/opengl...
Carl Hetherington [Mon, 25 Nov 2019 20:24:03 +0000 (21:24 +0100)]
Use glTexSubImage2D when possible, as suggested by https://khronos.org/opengl/wiki/Common_Mistakes

7 months agoBasic stress-test function for player.
Carl Hetherington [Sat, 23 Nov 2019 09:44:39 +0000 (10:44 +0100)]
Basic stress-test function for player.

7 months agoDon't busy-wait when there's nothing to play.
Carl Hetherington [Sat, 23 Nov 2019 09:42:16 +0000 (10:42 +0100)]
Don't busy-wait when there's nothing to play.

7 months agoSet up things correctly on initialisation.
Carl Hetherington [Sat, 23 Nov 2019 09:41:01 +0000 (10:41 +0100)]
Set up things correctly on initialisation.

7 months agoFix event handling (hopefully).
Carl Hetherington [Fri, 22 Nov 2019 20:04:14 +0000 (21:04 +0100)]
Fix event handling (hopefully).

7 months agoAdd assert.
Carl Hetherington [Fri, 22 Nov 2019 20:04:05 +0000 (21:04 +0100)]
Add assert.

7 months agoCheck that get_next_frame succeeds.
Carl Hetherington [Fri, 22 Nov 2019 00:52:53 +0000 (01:52 +0100)]
Check that get_next_frame succeeds.

7 months agoFix some crashes.
Carl Hetherington [Thu, 21 Nov 2019 23:37:36 +0000 (00:37 +0100)]
Fix some crashes.

7 months agoMore tidying up.
Carl Hetherington [Thu, 21 Nov 2019 23:10:35 +0000 (00:10 +0100)]
More tidying up.

7 months agoVarious cleanups and thread-safety.
Carl Hetherington [Thu, 21 Nov 2019 22:43:23 +0000 (23:43 +0100)]
Various cleanups and thread-safety.

7 months agoRemove some friends from FilmViewer.
Carl Hetherington [Thu, 21 Nov 2019 21:38:33 +0000 (22:38 +0100)]
Remove some friends from FilmViewer.

7 months agoRemove FilmViewer::refresh_view.
Carl Hetherington [Thu, 21 Nov 2019 21:07:26 +0000 (22:07 +0100)]
Remove FilmViewer::refresh_view.

7 months agoMove _state_timer into VideoView.
Carl Hetherington [Wed, 20 Nov 2019 23:05:12 +0000 (00:05 +0100)]
Move _state_timer into VideoView.

7 months agoAccessor for ClosedCaptionsDialog.
Carl Hetherington [Wed, 20 Nov 2019 22:46:40 +0000 (23:46 +0100)]
Accessor for ClosedCaptionsDialog.

7 months agoSame thing with inter_size.
Carl Hetherington [Wed, 20 Nov 2019 22:41:58 +0000 (23:41 +0100)]
Same thing with inter_size.

7 months agoMove _inter_position out of FilmViewer.
Carl Hetherington [Wed, 20 Nov 2019 22:36:56 +0000 (23:36 +0100)]
Move _inter_position out of FilmViewer.

7 months agoMove _dropped into VideoView.
Carl Hetherington [Wed, 20 Nov 2019 22:07:55 +0000 (23:07 +0100)]
Move _dropped into VideoView.

7 months agoSmall re-use cleanup.
Carl Hetherington [Wed, 20 Nov 2019 21:30:36 +0000 (22:30 +0100)]
Small re-use cleanup.

7 months agoImplement GLView::update.
Carl Hetherington [Wed, 20 Nov 2019 21:25:40 +0000 (22:25 +0100)]
Implement GLView::update.

7 months agoDon't try opening error dialogues from the GL thread.
Carl Hetherington [Wed, 20 Nov 2019 21:18:33 +0000 (22:18 +0100)]
Don't try opening error dialogues from the GL thread.

7 months agoFix display when there is no film.
Carl Hetherington [Wed, 20 Nov 2019 20:25:55 +0000 (21:25 +0100)]
Fix display when there is no film.

7 months agoAdd comment.
Carl Hetherington [Tue, 19 Nov 2019 23:57:37 +0000 (00:57 +0100)]
Add comment.

7 months agoStart thread when the window will have been created. Fix logic error.
Carl Hetherington [Tue, 19 Nov 2019 23:50:58 +0000 (00:50 +0100)]
Start thread when the window will have been created.  Fix logic error.

7 months agoUse VideoView::one_video_frame.
Carl Hetherington [Tue, 19 Nov 2019 23:34:01 +0000 (00:34 +0100)]
Use VideoView::one_video_frame.

7 months agoNicer protection of _player_video. Always run GL thread rather than starting/stoppin...
Carl Hetherington [Tue, 19 Nov 2019 22:57:14 +0000 (23:57 +0100)]
Nicer protection of _player_video.  Always run GL thread rather than starting/stopping it.

7 months agoRemove GL context accessor and hence lock.
Carl Hetherington [Tue, 19 Nov 2019 22:06:50 +0000 (23:06 +0100)]
Remove GL context accessor and hence lock.

7 months agoNaming tweak.
Carl Hetherington [Tue, 19 Nov 2019 16:13:25 +0000 (17:13 +0100)]
Naming tweak.

7 months agoClean up access to stuff from Film.
Carl Hetherington [Tue, 19 Nov 2019 16:07:35 +0000 (17:07 +0100)]
Clean up access to stuff from Film.

7 months agoA little thread safety.
Carl Hetherington [Sun, 17 Nov 2019 17:13:36 +0000 (18:13 +0100)]
A little thread safety.

7 months agoVarious timing hacks and development.
Carl Hetherington [Wed, 6 Nov 2019 00:09:13 +0000 (01:09 +0100)]
Various timing hacks and development.

7 months agoRemove PositionChanged in favour of consumers having their own GUI-thread timers.
Carl Hetherington [Tue, 5 Nov 2019 22:51:20 +0000 (23:51 +0100)]
Remove PositionChanged in favour of consumers having their own GUI-thread timers.

7 months agoHack around changes in main branch with respect to suspend/resume.
Carl Hetherington [Tue, 5 Nov 2019 22:26:22 +0000 (23:26 +0100)]
Hack around changes in main branch with respect to suspend/resume.

7 months agoBarely-functioning GL playback with new arrangement.
Carl Hetherington [Sun, 20 Oct 2019 22:55:52 +0000 (00:55 +0200)]
Barely-functioning GL playback with new arrangement.

7 months agoAdd FIXME.
Carl Hetherington [Sun, 20 Oct 2019 21:24:32 +0000 (23:24 +0200)]
Add FIXME.

7 months agoAdd FilmViewer::time_until_next_frame.
Carl Hetherington [Sun, 20 Oct 2019 21:24:15 +0000 (23:24 +0200)]
Add FilmViewer::time_until_next_frame.

7 months agoAdd accessor for butler.
Carl Hetherington [Sun, 20 Oct 2019 21:05:59 +0000 (23:05 +0200)]
Add accessor for butler.

7 months agoMove _player_video into VideoView.
Carl Hetherington [Sun, 20 Oct 2019 21:03:27 +0000 (23:03 +0200)]
Move _player_video into VideoView.

7 months agoMove display_player_video into SimpleVideoView.
Carl Hetherington [Sun, 20 Oct 2019 20:54:45 +0000 (22:54 +0200)]
Move display_player_video into SimpleVideoView.

7 months agoMove FilmViewer::get() into SimpleVideoView.
Carl Hetherington [Sun, 20 Oct 2019 20:49:07 +0000 (22:49 +0200)]
Move FilmViewer::get() into SimpleVideoView.

7 months agoRemove temporary access to timer() method.
Carl Hetherington [Sun, 20 Oct 2019 20:24:41 +0000 (22:24 +0200)]
Remove temporary access to timer() method.

7 months agoRemove redundant FilmViewer::video_position() and use FilmViewer::position() instead.
Carl Hetherington [Sun, 20 Oct 2019 20:20:06 +0000 (22:20 +0200)]
Remove redundant FilmViewer::video_position() and use FilmViewer::position() instead.

7 months agoUse FilmViewer::{film,playing,position}()
Carl Hetherington [Sun, 20 Oct 2019 20:14:53 +0000 (22:14 +0200)]
Use FilmViewer::{film,playing,position}()

7 months agoMove ::timer into SimpleVideoView.
Carl Hetherington [Sun, 20 Oct 2019 20:13:46 +0000 (22:13 +0200)]
Move ::timer into SimpleVideoView.

7 months agoFix typo causing failures to update the preview after changing
Carl Hetherington [Tue, 7 Jan 2020 14:42:00 +0000 (14:42 +0000)]
Fix typo causing failures to update the preview after changing
end trim (#1709 and probably #1434).

7 months agoExtend the amount of allowed disagreement between the audio
Carl Hetherington [Tue, 7 Jan 2020 12:30:56 +0000 (13:30 +0100)]
Extend the amount of allowed disagreement between the audio
coming from the content and the calculated periods of silence.

It sees that there is some scope for disagreements here when
trim start/end times are rounded to frame boundaries.

Fixes #1708.

7 months agoMove credentials settings into certificate download dialogue (#1480).
Carl Hetherington [Sun, 5 Jan 2020 14:25:58 +0000 (15:25 +0100)]
Move credentials settings into certificate download dialogue (#1480).

7 months agoHappy new year.
Carl Hetherington [Sun, 5 Jan 2020 13:41:35 +0000 (14:41 +0100)]
Happy new year.

7 months agoFix failure to save screen notes when making a new one (github bug #6).
Carl Hetherington [Fri, 3 Jan 2020 01:29:24 +0000 (02:29 +0100)]
Fix failure to save screen notes when making a new one (github bug #6).

7 months agoAdd --config option to dcpomatic2 (#1703).
Carl Hetherington [Fri, 27 Dec 2019 22:40:18 +0000 (23:40 +0100)]
Add --config option to dcpomatic2 (#1703).

7 months agoAdd --version option to main DCP-o-matic.
Carl Hetherington [Fri, 27 Dec 2019 22:16:05 +0000 (23:16 +0100)]
Add --version option to main DCP-o-matic.

7 months agoTweak certficate chain dialogue layout (#1530).
Carl Hetherington [Mon, 23 Dec 2019 23:56:36 +0000 (00:56 +0100)]
Tweak certficate chain dialogue layout (#1530).

7 months agoAnother comment typo.
Carl Hetherington [Mon, 23 Dec 2019 00:11:09 +0000 (01:11 +0100)]
Another comment typo.

7 months agoFix error when trying to make DCP-o-matic DKDMs due to attempts to make
Carl Hetherington [Mon, 23 Dec 2019 00:09:36 +0000 (01:09 +0100)]
Fix error when trying to make DCP-o-matic DKDMs due to attempts to make
the validity time wider than that of the signing certificate.

7 months agoComment typo.
Carl Hetherington [Thu, 19 Dec 2019 23:27:08 +0000 (00:27 +0100)]
Comment typo.