X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Foptions.h;h=0d2c07fd5674117d7afff91179b25885fbe9388a;hb=db0ad7242d39f0fbae04bb6983021c60d57fdcf5;hp=39068c24f5210c382109494a9bd54281b2290484;hpb=cb33319a820b17a05cfb2ef78ba1799f4d0c54b9;p=dcpomatic.git diff --git a/src/lib/options.h b/src/lib/options.h index 39068c24f..0d2c07fd5 100644 --- a/src/lib/options.h +++ b/src/lib/options.h @@ -17,90 +17,27 @@ */ +#ifndef DVDOMATIC_OPTIONS_H +#define DVDOMATIC_OPTIONS_H + /** @file src/options.h - * @brief Options for a transcoding operation. + * @brief Options for a decoding operation. */ -#include -#include -#include -#include "util.h" - -/** @class Options - * @brief Options for a transcoding operation. - * - * These are settings which may be different, in different circumstances, for - * the same film; ie they are options for a particular transcode operation. - */ -class Options +class DecodeOptions { public: - - Options (std::string f, std::string e, std::string m) - : padding (0) - , apply_crop (true) - , black_after (0) - , decode_video_frequency (0) + DecodeOptions () + : decode_video (true) , decode_audio (true) - , _frame_out_path (f) - , _frame_out_extension (e) - , _multichannel_audio_out_path (m) + , decode_subtitles (false) + , video_sync (true) {} - /** @return The path to write video frames to */ - std::string frame_out_path () const { - return _frame_out_path; - } - - /** @param f 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::stringstream s; - s << _frame_out_path << "/"; - s.width (8); - s << std::setfill('0') << f << _frame_out_extension; - - if (t) { - s << ".tmp"; - } - - return s.str (); - } - - /** @return Path to write multichannel audio data to */ - std::string multichannel_audio_out_path () const { - return _multichannel_audio_out_path; - } - - /** @param c Audio channel index. - * @param t true to return a temporary file path, otherwise a permanent one. - * @return The path to write this audio file to. - */ - std::string multichannel_audio_out_path (int c, bool t) const { - std::stringstream s; - s << _multichannel_audio_out_path << "/" << (c + 1) << ".wav"; - if (t) { - s << ".tmp"; - } - - return s.str (); - } - - Size out_size; ///< size of output images - 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) - bool decode_audio; ///< true to decode audio, otherwise false - -private: - /** Path of the directory to write video frames to */ - std::string _frame_out_path; - /** Extension to use for video frame files (including the leading .) */ - std::string _frame_out_extension; - /** Path of the directory to write audio files to */ - std::string _multichannel_audio_out_path; + bool decode_video; + bool decode_audio; + bool decode_subtitles; + bool video_sync; }; + +#endif