From 4aef8dd81aeb7698aae314c5fe8fc35016d3502b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 May 2026 14:35:30 +0200 Subject: Use std::atomic rather than boost::atomic. It's in C++11. --- src/lib/encode_server.h | 4 ++-- src/lib/hints.h | 4 ++-- src/lib/job.h | 4 ++-- src/lib/player.h | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/lib') diff --git a/src/lib/encode_server.h b/src/lib/encode_server.h index 276212583..ea769d4fe 100644 --- a/src/lib/encode_server.h +++ b/src/lib/encode_server.h @@ -32,9 +32,9 @@ #include "exception_store.h" #include "server.h" #include -#include #include #include +#include #include @@ -72,7 +72,7 @@ private: bool _verbose; int _num_threads; Waker _waker; - boost::atomic _frames_encoded; + std::atomic _frames_encoded; struct Broadcast { diff --git a/src/lib/hints.h b/src/lib/hints.h index b17da2c99..78cc615d3 100644 --- a/src/lib/hints.h +++ b/src/lib/hints.h @@ -26,8 +26,8 @@ #include "signaller.h" #include "text_type.h" #include "weak_film.h" -#include #include +#include #include #include @@ -111,7 +111,7 @@ private: bool _very_long_subtitle = false; boost::optional _last_subtitle; - boost::atomic _stop; + std::atomic _stop; bool _disable_audio_analysis = false; }; diff --git a/src/lib/job.h b/src/lib/job.h index f435d815a..34f7b0526 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -30,12 +30,12 @@ #include "signaller.h" #include -#include LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS #include #include +#include #include @@ -174,7 +174,7 @@ private: /** true to limit emissions of the progress signal so that they don't * come too often. */ - boost::atomic _rate_limit_progress; + std::atomic _rate_limit_progress; /** condition to signal changes to pause/resume so that we know when to wake; this could be a general _state_change if it made more sense. diff --git a/src/lib/player.h b/src/lib/player.h index 4a1cf5f55..df5db28f0 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -39,7 +39,7 @@ #include "player_text.h" #include "position_image.h" #include "shuffler.h" -#include +#include #include @@ -192,36 +192,36 @@ private: std::shared_ptr _playlist; /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */ - boost::atomic _suspended; + std::atomic _suspended; std::vector> _pieces; /** Size of the image we are rendering to; this may be the DCP frame size, or * the size of preview in a window. */ - boost::atomic _video_container_size; + std::atomic _video_container_size; mutable boost::mutex _black_image_mutex; std::shared_ptr _black_image; /** true if the player should ignore all video; i.e. never produce any */ - boost::atomic _ignore_video; - boost::atomic _ignore_audio; + std::atomic _ignore_video; + std::atomic _ignore_audio; /** true if the player should ignore all text; i.e. never produce any */ - boost::atomic _ignore_text; - boost::atomic _always_burn_open_subtitles; + std::atomic _ignore_text; + std::atomic _always_burn_open_subtitles; /** true if we should try to be fast rather than high quality */ - boost::atomic _fast; + std::atomic _fast; /** true if we should keep going in the face of `survivable' errors */ bool _tolerant; /** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */ - boost::atomic _play_referenced; + std::atomic _play_referenced; /** Time of the next video that we will emit, or the time of the last accurate seek */ boost::optional _next_video_time; /** Time of the next audio that we will emit, or the time of the last accurate seek */ boost::optional _next_audio_time; - boost::atomic> _dcp_decode_reduction; + std::atomic> _dcp_decode_reduction; EnumIndexedVector, dcpomatic::DCPTime>, Eyes> _last_video; @@ -250,7 +250,7 @@ private: std::shared_ptr _audio_processor; bool _disable_audio_processor = false; - boost::atomic _playback_length; + std::atomic _playback_length; /** Alignment for subtitle images that we create */ Image::Alignment _subtitle_alignment = Image::Alignment::PADDED; -- cgit v1.2.3