Split Options into encode / decode.
[dcpomatic.git] / src / lib / examine_content_job.cc
index 7e0f7692bea02279e8d9a6fecdf6210a60dc718d..dc2fc305cdd5618524371bf299affbd101ba0ee6 100644 (file)
@@ -65,22 +65,21 @@ ExamineContentJob::run ()
           will be messed up.
        */
        _film->unset_length ();
+       _film->set_crop (Crop ());
        
-       shared_ptr<Options> o (new Options ("", "", ""));
-       o->out_size = Size (512, 512);
-       o->apply_crop = false;
+       shared_ptr<DecodeOptions> o (new DecodeOptions);
        o->decode_audio = false;
 
        descend (1);
 
-       pair<shared_ptr<VideoDecoder>, shared_ptr<AudioDecoder> > decoders = decoder_factory (_film, o, this);
+       Decoders decoders = decoder_factory (_film, o, this);
 
        set_progress_unknown ();
-       while (!decoders.first->pass()) {
+       while (!decoders.video->pass()) {
                /* keep going */
        }
 
-       _film->set_length (decoders.first->video_frame());
+       _film->set_length (decoders.video->video_frame());
 
        _film->log()->log (String::compose ("Video length is %1 frames", _film->length()));