-
- if (!boost::filesystem::exists (directory())) {
- if (must_exist) {
- throw OpenFileError (directory());
- } else {
- boost::filesystem::create_directory (directory());
- }
- }
-
- if (must_exist) {
- read_metadata ();
- } else {
- write_metadata ();
- }
-
- _log.reset (new FileLog (file ("log")));
-}
-
-Film::Film (Film const & o)
- : boost::enable_shared_from_this<Film> (o)
- /* note: the copied film shares the original's log */
- , _log (o._log)
- , _playlist (new Playlist (o._playlist))
- , _directory (o._directory)
- , _name (o._name)
- , _use_dci_name (o._use_dci_name)
- , _trust_content_headers (o._trust_content_headers)
- , _dcp_content_type (o._dcp_content_type)
- , _format (o._format)
- , _crop (o._crop)
- , _filters (o._filters)
- , _scaler (o._scaler)
- , _trim_start (o._trim_start)
- , _trim_end (o._trim_end)
- , _trim_type (o._trim_type)
- , _ab (o._ab)
- , _audio_gain (o._audio_gain)
- , _audio_delay (o._audio_delay)
- , _with_subtitles (o._with_subtitles)
- , _subtitle_offset (o._subtitle_offset)
- , _subtitle_scale (o._subtitle_scale)
- , _colour_lut (o._colour_lut)
- , _j2k_bandwidth (o._j2k_bandwidth)
- , _dci_metadata (o._dci_metadata)
- , _dcp_frame_rate (o._dcp_frame_rate)
- , _dci_date (o._dci_date)
- , _dirty (o._dirty)
-{
- _playlist->ContentChanged.connect (bind (&Film::playlist_content_changed, this, _1, _2));