X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Foptions.h;h=043e3692f476ee1e23d711a91be753cf29e51798;hb=4fb0a5ab9eebc0f07981edc3a6813102520b8233;hp=39068c24f5210c382109494a9bd54281b2290484;hpb=942e32c0b7aa268ec7e5bda8a74453340dad3592;p=dcpomatic.git diff --git a/src/lib/options.h b/src/lib/options.h index 39068c24f..043e3692f 100644 --- a/src/lib/options.h +++ b/src/lib/options.h @@ -39,9 +39,9 @@ public: Options (std::string f, std::string e, std::string m) : padding (0) , apply_crop (true) - , black_after (0) - , decode_video_frequency (0) + , decode_video_skip (0) , decode_audio (true) + , decode_subtitles (false) , _frame_out_path (f) , _frame_out_extension (e) , _multichannel_audio_out_path (m) @@ -52,15 +52,19 @@ public: return _frame_out_path; } - /** @param f Frame index. + /** @param f Source frame index. * @param t true to return a temporary file path, otherwise a permanent one. * @return The path to write this video frame to. */ - std::string frame_out_path (int f, bool t) const { + std::string frame_out_path (SourceFrame f, bool t, std::string e = "") const { + if (e.empty ()) { + e = _frame_out_extension; + } + std::stringstream s; s << _frame_out_path << "/"; s.width (8); - s << std::setfill('0') << f << _frame_out_extension; + s << std::setfill('0') << f << e; if (t) { s << ".tmp"; @@ -92,9 +96,12 @@ public: float ratio; ///< ratio of the wanted output image (not considering padding) int padding; ///< number of pixels of padding (in terms of the output size) each side of the image bool apply_crop; ///< true to apply cropping - int black_after; ///< first frame for which to output a black frame, rather than the actual video content, or 0 for none - int decode_video_frequency; ///< skip frames so that this many are decoded in all (or 0) (for generating thumbnails) + /** Skip frames such that we don't decode any frame where (index % decode_video_skip) != 0; e.g. + * 1 for every frame, 2 for every other frame, etc. + */ + SourceFrame decode_video_skip; bool decode_audio; ///< true to decode audio, otherwise false + bool decode_subtitles; private: /** Path of the directory to write video frames to */