X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_encoder.h;h=ad77f6951312c03ace8fe91e7fe4d91608f2f743;hb=7274622a833c05eee36b7e59d8ec2ca3e136d140;hp=b1514efdc7d0715070c76445dee8ecae32ec528b;hpb=2d57296a24c2eb4f6d99325add0e986de04f7e7d;p=dcpomatic.git diff --git a/src/lib/dcp_encoder.h b/src/lib/dcp_encoder.h index b1514efdc..ad77f6951 100644 --- a/src/lib/dcp_encoder.h +++ b/src/lib/dcp_encoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2017 Carl Hetherington + Copyright (C) 2012-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -18,46 +18,55 @@ */ -#include "types.h" -#include "player_subtitles.h" + +#include "atmos_metadata.h" +#include "dcp_text_track.h" +#include "dcpomatic_time.h" #include "encoder.h" -#include +#include "player_text.h" +#include "j2k_encoder.h" +#include "writer.h" +#include + +class AudioBuffers; class Film; -class J2KEncoder; -class Player; -class Writer; class Job; +class Player; class PlayerVideo; -class AudioBuffers; + /** @class DCPEncoder */ class DCPEncoder : public Encoder { public: - DCPEncoder (boost::shared_ptr film, boost::weak_ptr job); + DCPEncoder (std::shared_ptr film, std::weak_ptr job); ~DCPEncoder (); - void go (); + void go () override; - float current_rate () const; - Frame frames_done () const; + boost::optional current_rate () const override; + Frame frames_done () const override; /** @return true if we are in the process of calling Encoder::process_end */ - bool finishing () const { + bool finishing () const override { return _finishing; } private: - void video (boost::shared_ptr, DCPTime); - void audio (boost::shared_ptr, DCPTime); - void subtitle (PlayerSubtitles, DCPTimePeriod); + void video (std::shared_ptr, dcpomatic::DCPTime); + void audio (std::shared_ptr, dcpomatic::DCPTime); + void text (PlayerText, TextType, boost::optional, dcpomatic::DCPTimePeriod); + void atmos (std::shared_ptr, dcpomatic::DCPTime, AtmosMetadata metadata); - boost::shared_ptr _film; - boost::weak_ptr _job; - boost::shared_ptr _writer; - boost::shared_ptr _j2k_encoder; + Writer _writer; + J2KEncoder _j2k_encoder; bool _finishing; bool _non_burnt_subtitles; + + boost::signals2::scoped_connection _player_video_connection; + boost::signals2::scoped_connection _player_audio_connection; + boost::signals2::scoped_connection _player_text_connection; + boost::signals2::scoped_connection _player_atmos_connection; };