diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-01-18 00:40:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-01-18 00:40:49 +0000 |
| commit | 479b67ec506289a4763b2dd4f07e72d1dd676483 (patch) | |
| tree | 8a4570b83af694189f8035c77cfdbcb07f40dc5b /src/lib/encoder.h | |
| parent | d4024b9f794823a2808724ae9fae74195f1a0824 (diff) | |
Add writer class to pull some stuff out of Encoder.
Diffstat (limited to 'src/lib/encoder.h')
| -rw-r--r-- | src/lib/encoder.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 3e2b5d957..a277aca51 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -51,11 +51,7 @@ class Film; class ServerDescription; class DCPVideoFrame; class EncodedData; - -namespace libdcp { - class MonoPictureAsset; - class MonoPictureAssetWriter; -} +class Writer; /** @class Encoder * @brief Encoder to J2K and WAV for DCP. @@ -100,7 +96,6 @@ private: void encoder_thread (ServerDescription *); void terminate_worker_threads (); - void link (std::string, std::string) const; /** Film that we are encoding */ boost::shared_ptr<const Film> _film; @@ -125,9 +120,6 @@ private: /** Number of audio frames written for the DCP so far */ int64_t _audio_frames_out; - void writer_thread (); - void finish_writer_thread (); - #if HAVE_SWRESAMPLE SwrContext* _swr_context; #endif @@ -141,18 +133,7 @@ private: mutable boost::mutex _worker_mutex; boost::condition _worker_condition; - boost::thread* _writer_thread; - bool _finish_writer; - std::list<std::pair<boost::shared_ptr<EncodedData>, int> > _write_queue; - mutable boost::mutex _writer_mutex; - boost::condition _writer_condition; - boost::shared_ptr<EncodedData> _last_written; - std::list<int> _pending; - int _last_written_frame; - static const unsigned int _maximum_frames_in_memory; - - boost::shared_ptr<libdcp::MonoPictureAsset> _picture_asset; - boost::shared_ptr<libdcp::MonoPictureAssetWriter> _picture_asset_writer; + boost::shared_ptr<Writer> _writer; }; #endif |
