summaryrefslogtreecommitdiff
path: root/src/lib/butler.cc
AgeCommit message (Collapse)Author
2025-07-10Remove compose.hpp includes.Carl Hetherington
sed -i "/include.*compose.hpp/d;" src/lib/*.cc src/wx/*.cc src/wx/*.h src/tools/*.cc src/lib/*.h test/*.cc
2025-07-10Replace String::compose with fmt.Carl Hetherington
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
2025-05-26Remove functors for choosing pixel format output from make_image().Carl Hetherington
2025-04-16White space: butler.{cc,h}Carl Hetherington
2025-03-22Add abstraction of io_{context,service} and use it as appropriate.Carl Hetherington
2024-02-19Cleanup: use auto.Carl Hetherington
2022-10-17Remove some more unnecessary use of shared_ptr.Carl Hetherington
2022-05-26Fix race between the Butler thread starting and audio (perhaps) being disabled.Carl Hetherington
This could cause Butler::audio to be called with _audio_channels = 0 and _disable_audio = false, causing an exception in AudioBuffers when remap() tried to make an AudioBuffers object with a channel count of 0.
2022-04-20C++11 tidying.Carl Hetherington
2022-03-14C++11 tidying.Carl Hetherington
2021-10-16Always block waiting for audio when exporting.v2.15.169Carl Hetherington
Otherwise if there is non available we'll insert silence and potentially push the audio out of sync (late). May help with #2098.
2021-10-16Use an enum instead of a bool to specify blocking/non-blocking.Carl Hetherington
2021-10-11Cleanup: use enum class.Carl Hetherington
2021-09-27Replace aligned bool with enum Alignment.Carl Hetherington
2021-09-27Setup Butler::_prepare_only_proxy on construction.Carl Hetherington
2021-09-27When the player is used in OpenGL mode, pass unscaled XYZ data through to ↵Carl Hetherington
the shader and do colourspace conversion there.
2021-05-03C++11 tidying.Carl Hetherington
2021-05-01C++11 tidying.Carl Hetherington
2021-04-21Add some possibly-useful markers for debugging threads from coredumps.Carl Hetherington
2021-04-01C++11 cleanup.Carl Hetherington
2021-02-15Don't keep returning AGAIN from the butler when it is already dead/finished.Carl Hetherington
This causes, for example, player UI hangs when trying to play something unplayable (e.g. a DCP with no KDM).
2021-01-31More enum class additions.Carl Hetherington
2021-01-07std::shared_ptrCarl Hetherington
2020-12-01Changes to crop can be handled with a reset_metadata().Carl Hetherington
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).
2020-12-01Give Butler a weak_ptr<Film>Carl Hetherington
2020-11-16Make sure we use limited ("video") range data when exporting.Carl Hetherington
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.
2020-09-01Build fixes for Boost >= 1.73Carl Hetherington
Forward-ported-from: d1e9749ca290673639a49d693a8fe5c6557cc2de
2020-08-17Report better errors when the butler dies.Carl Hetherington
Adapted from d23f55d8cd73adda823d0a2fcabc129b8845a81 in master.
2020-07-29Fix bugs in thread termination causing occasional pthreadCarl Hetherington
assertion failures. Before this, it was possible for J2KEncoder::terminate_threads() to finish without terminating all threads if the thread _running_ terminate_threads() was itself interrupt()ed. This is because the thread_group::join_all() in terminate_threads() is an interruption point, so it was possible it not to complete but instead to throw interrupted_exception. Then the owning J2KEncoder would be torn down but the threads would still be running, causing use-after-frees. This commit adds some boost::this_thread::disable_interruption objects to ensure that the owning thread is not interrupted while it is being destroyed. Also tidy up code that does this stuff, assuming that it's safe to not call thread::joinable but instead do thread.interrupt(); try { thread.join(); } catch (...) {}
2020-07-05Improve butler error reporting during export.v2.15.88Carl Hetherington
2020-01-30Various thread cleanups.Carl Hetherington
2019-11-05Remove dubious _buffers_mutex and maintain a lock on _mutex forCarl Hetherington
the whole of ::audio. Otherwise changes to pending seeks can be mixed up with audio being put into the ringbuffer.
2019-07-24Optimise the feel of some GUI functions by doing the seek afterCarl Hetherington
many content changes in an idle handler, rather than blocking the UI update until the seek and image redisplay have finished.
2019-05-15Player::playlist_content_change will call setup_pieces() regardlessv2.15.5Carl Hetherington
of the state of frequent, so Butler::player_change must always seek regardless of the state of frequent. Otherwise setup_pieces() results in the next pass() output being at position 0, which causes problems when the audio from that output is pushed into the audio ring buffers.
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2019-04-20Comment tweaks.Carl Hetherington
2019-04-19Hopefully better errors on large video/audio disagreements.Carl Hetherington
2019-03-26Unset _awaiting on a regular seek. This fixes bad behaviour in the sequence:Carl Hetherington
- some player_change; _awaiting is set - regular seek occurs (perhaps to a time much earlier than _awaiting) - another player_change occurs; player_change handler wrongly seeks back to _awaiting May help with #1505.
2019-03-07Better reporting of errors in Butler::prepare.v2.13.125Carl Hetherington
2019-01-06Fix comment typo.Carl Hetherington
2018-12-22Fix assumption of 48kHz DCP audio in AudioRingBuffers consistency check (#1436).Carl Hetherington
2018-11-21Tidy and fix logging.Carl Hetherington
2018-11-06Do image crop/scale/window in the butler prepare threads.Carl Hetherington
2018-11-06Double up on DCP-decode prepare threads and readahead as I think it provides ↵v2.13.66Carl Hetherington
a slight performance improvement for playback.
2018-11-06Add some code to help with profiling the player.Carl Hetherington
2018-09-11Store audio/video even when suspended.Carl Hetherington
This is important for audio. _audio.put() must be called with sequential data, so if you're going to discard audio (as was happening when _suspended) you need to clear _audio before put()ting any more. This happens with seek; when _pending_seek_position is set _audio is cleared and then nothing more is added until the seek is done. _suspended may be set and then reset with no change having happened (type _CANCELLED) so I think you have to keep storing data in this case. It will be discarded when the seek comes around after a _DONE change.
2018-09-04Allow the butler to say "try again later" when get_video() is calledCarl Hetherington
while it's suspended. Then make the GUI follow that suggestion. Should
2018-08-29Basics of splitting CCAP streams into different assets.Carl Hetherington
2018-08-22Await video in get_video() if we are suspended.Carl Hetherington
Fix player_change to summon the butler if _suspended is changed, and ensure that the butler's Player::Change handler is the first to be called so that suspension is sorted out before any other Player::Change handlers might call get_video(). This is to prevent the sequence 1. player change-pending emitted 2. hence butler suspended -> 1 3. player change-done emitted 4. first handler is something which calls get_video() 5. get_video() awaits video which will never arrive because the butler is suspended. Here there is a pending change-done signal to butler. Ensuring this arrives before the handler which calls get_video() sorts it out.
2018-08-20Allow nested butler suspensions.Carl Hetherington