X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.h;h=876d312ae427666c23649aca3db4e5690d0e36f1;hb=09063d5958cad17ce89935f38f12c4fcbaaedf4f;hp=26700323a43ba8d6167a3ef9e250cfb5761b53cd;hpb=5dbd022f3abb0ebab57fb67073a07ed60df902a6;p=dcpomatic.git diff --git a/src/lib/film.h b/src/lib/film.h index 26700323a..876d312ae 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -31,6 +31,7 @@ #include "isdcf_metadata.h" #include "frame_rate_change.h" #include "signaller.h" +#include "dcp_text_track.h" #include #include #include @@ -44,12 +45,15 @@ namespace xmlpp { class Document; } +namespace dcpomatic { + class Screen; +} + class DCPContentType; class Log; class Content; class Playlist; class AudioContent; -class Screen; class AudioProcessor; class AudioMapping; class Ratio; @@ -70,10 +74,10 @@ public: explicit Film (boost::optional dir); ~Film (); - boost::filesystem::path info_file (DCPTimePeriod p) const; + boost::filesystem::path info_file (dcpomatic::DCPTimePeriod p) const; boost::filesystem::path j2c_path (int, Frame, Eyes, bool) const; boost::filesystem::path internal_video_asset_dir () const; - boost::filesystem::path internal_video_asset_filename (DCPTimePeriod p) const; + boost::filesystem::path internal_video_asset_filename (dcpomatic::DCPTimePeriod p) const; boost::filesystem::path audio_analysis_path (boost::shared_ptr) const; @@ -93,6 +97,7 @@ public: void use_template (std::string name); std::list read_metadata (boost::optional path = boost::optional ()); void write_metadata () const; + void write_metadata (boost::filesystem::path path) const; void write_template (boost::filesystem::path path) const; boost::shared_ptr metadata (bool with_content_paths = true) const; @@ -113,20 +118,22 @@ public: int audio_frame_rate () const; + std::list closed_caption_tracks () const; + uint64_t required_disk_space () const; bool should_be_enough_disk_space (double& required, double& available, bool& can_hard_link) const; /* Proxies for some Playlist methods */ ContentList content () const; - DCPTime length () const; + dcpomatic::DCPTime length () const; int best_video_frame_rate () const; - FrameRateChange active_frame_rate_change (DCPTime) const; + FrameRateChange active_frame_rate_change (dcpomatic::DCPTime) const; std::pair speed_up_range (int dcp_frame_rate) const; dcp::EncryptedKDM make_kdm ( dcp::Certificate recipient, - std::vector trusted_devices, + std::vector trusted_devices, boost::filesystem::path cpl_file, dcp::LocalTime from, dcp::LocalTime until, @@ -135,8 +142,8 @@ public: boost::optional disable_forensic_marking_audio ) const; - std::list make_kdms ( - std::list > screens, + std::list > make_kdms ( + std::list > screens, boost::filesystem::path cpl_file, boost::posix_time::ptime from, boost::posix_time::ptime until, @@ -151,11 +158,6 @@ public: std::string subtitle_language () const; - void make_audio_mapping_default ( - AudioMapping & mapping, - boost::optional filename = boost::optional () - ) const; - std::vector audio_output_names () const; void repeat_content (ContentList, int); @@ -164,10 +166,10 @@ public: return _playlist; } - std::list reels () const; + std::list reels () const; std::list mapped_audio_channels () const; - std::string content_summary (DCPTimePeriod period) const; + std::string content_summary (dcpomatic::DCPTimePeriod period) const; bool references_dcp_video () const; bool references_dcp_audio () const; @@ -200,7 +202,10 @@ public: AUDIO_PROCESSOR, REEL_TYPE, REEL_LENGTH, - UPLOAD_AFTER_MAKE_DCP + UPLOAD_AFTER_MAKE_DCP, + REENCODE_J2K, + MARKERS, + RATINGS }; @@ -292,6 +297,18 @@ public: return _context_id; } + bool reencode_j2k () const { + return _reencode_j2k; + } + + boost::optional marker (dcp::Marker type) const; + std::map markers () const { + return _markers; + } + + std::vector ratings () const { + return _ratings; + } /* SET */ @@ -312,7 +329,7 @@ public: void set_key (dcp::Key key); void set_j2k_bandwidth (int); void set_isdcf_metadata (ISDCFMetadata); - void set_video_frame_rate (int); + void set_video_frame_rate (int rate, bool user_explicit = false); void set_audio_channels (int); void set_three_d (bool); void set_isdcf_date_today (); @@ -322,6 +339,10 @@ public: void set_reel_type (ReelType); void set_reel_length (int64_t); void set_upload_after_make_dcp (bool); + void set_reencode_j2k (bool); + void set_marker (dcp::Marker type, dcpomatic::DCPTime time); + void unset_marker (dcp::Marker type); + void set_ratings (std::vector r); /** Emitted when some property has of the Film is about to change or has changed */ mutable boost::signals2::signal Change; @@ -329,6 +350,9 @@ public: /** Emitted when some property of our content has changed */ mutable boost::signals2::signal, int, bool)> ContentChange; + /** Emitted when we have something important to tell the user */ + boost::signals2::signal Message; + /** Current version number of the state file */ static int const current_state_version; @@ -395,6 +419,11 @@ private: /** Desired reel length in bytes, if _reel_type == REELTYPE_BY_LENGTH */ int64_t _reel_length; bool _upload_after_make_dcp; + bool _reencode_j2k; + /** true if the user has ever explicitly set the video frame rate of this film */ + bool _user_explicit_video_frame_rate; + std::map _markers; + std::vector _ratings; int _state_version;