From 2ed3dadd6287859551fcbeaf85e09b0b3f1e8ff5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 24 Sep 2023 00:34:15 +0200 Subject: Rearrange encoder threading. Soon we'll add a new encoder type, and the existing structure was already creaking a bit at the seams while handling local and remote encodes. Here we split out an encoder thread and introduce the concept of a "sync" thread (which blocks while the encoding is happening). Later we'll have another type which submits the encode request to a GPU and receives the reply back later. --- src/lib/dcp_encoder.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/dcp_encoder.h') diff --git a/src/lib/dcp_encoder.h b/src/lib/dcp_encoder.h index 771679a98..ce0b72204 100644 --- a/src/lib/dcp_encoder.h +++ b/src/lib/dcp_encoder.h @@ -35,6 +35,8 @@ class Job; class Player; class PlayerVideo; +struct frames_not_lost_when_threads_disappear; + /** @class DCPEncoder */ class DCPEncoder : public Encoder @@ -58,6 +60,8 @@ public: private: + friend struct ::frames_not_lost_when_threads_disappear; + void video (std::shared_ptr, dcpomatic::DCPTime); void audio (std::shared_ptr, dcpomatic::DCPTime); void text (PlayerText, TextType, boost::optional, dcpomatic::DCPTimePeriod); -- cgit v1.2.3