Missing virtual destructor.
[dcpomatic.git] / src / lib / options.h
index aef9ca112a5c9bc175f679d9567beb89930bad53..29b3b71cd4a91e01bc8d76494608d076d6c4452c 100644 (file)
@@ -24,6 +24,7 @@
 #include <string>
 #include <iomanip>
 #include <sstream>
+#include <boost/optional.hpp>
 #include "util.h"
 
 /** @class Options
@@ -52,11 +53,11 @@ 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, std::string e = "") const {
+       std::string frame_out_path (SourceFrame f, bool t, std::string e = "") const {
                if (e.empty ()) {
                        e = _frame_out_extension;
                }
@@ -96,8 +97,16 @@ 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 decode_video_skip;      ///< 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.
+
+       /** Range of video frames to decode */
+       boost::optional<std::pair<SourceFrame, SourceFrame> > video_decode_range;
+       /** Range of audio frames to decode */
+       boost::optional<std::pair<int64_t, int64_t> > audio_decode_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;