diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-16 13:26:45 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-16 13:26:45 +0000 |
| commit | 1f2bc4d8f3601ad1e12b94f37b3889fcd003509b (patch) | |
| tree | f192579eda6eaaea73a3b17acd2bb19965ae331f /src/lib/options.h | |
| parent | 0813034d7193dc8869126d13a9d12d2c4d1e6c14 (diff) | |
Split Options into encode / decode.
Diffstat (limited to 'src/lib/options.h')
| -rw-r--r-- | src/lib/options.h | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/lib/options.h b/src/lib/options.h index 9b3866dcb..4457969f3 100644 --- a/src/lib/options.h +++ b/src/lib/options.h @@ -27,22 +27,19 @@ #include <boost/optional.hpp> #include "util.h" -/** @class Options - * @brief Options for a transcoding operation. +/** @class EncodeOptions + * @brief EncodeOptions for an encoding operation. * * These are settings which may be different, in different circumstances, for - * the same film; ie they are options for a particular transcode operation. + * the same film; ie they are options for a particular operation. */ -class Options +class EncodeOptions { public: - Options (std::string f, std::string e, std::string m) + EncodeOptions (std::string f, std::string e, std::string m) : padding (0) - , decode_video_skip (0) - , decode_audio (true) - , decode_subtitles (false) - , decoder_alignment (true) + , video_skip (0) , _frame_out_path (f) , _frame_out_extension (e) , _multichannel_audio_out_path (m) @@ -94,22 +91,17 @@ public: } 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 /** Range of video frames to decode */ - boost::optional<std::pair<SourceFrame, SourceFrame> > video_decode_range; + boost::optional<std::pair<SourceFrame, SourceFrame> > video_range; /** Range of audio frames to decode */ - boost::optional<std::pair<int64_t, int64_t> > audio_decode_range; + boost::optional<std::pair<int64_t, int64_t> > audio_range; /** 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; - - bool decoder_alignment; + SourceFrame video_skip; private: /** Path of the directory to write video frames to */ @@ -119,3 +111,18 @@ private: /** Path of the directory to write audio files to */ std::string _multichannel_audio_out_path; }; + + +class DecodeOptions +{ +public: + DecodeOptions () + : decode_audio (true) + , decode_subtitles (false) + , video_sync (true) + {} + + bool decode_audio; + bool decode_subtitles; + bool video_sync; +}; |
