+ std::thread jpeg_decoder_thread;
+ movit::ResourcePool *resource_pool = nullptr;
+
+ struct PendingDecode {
+ // For actual decodes (only if frame below is nullptr).
+ FrameOnDisk primary, secondary;
+ float fade_alpha; // Irrelevant if secondary.stream_idx == -1.
+
+ // Already-decoded frames are also sent through PendingDecode,
+ // so that they get drawn in the right order. If frame is nullptr,
+ // it's a real decode.
+ std::shared_ptr<Frame> frame;
+ };
+
+ std::condition_variable any_pending_decodes;
+ std::deque<PendingDecode> pending_decodes; // Under cache_mu.