X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_examiner.cc;h=004b89e659d47ebd24cb594bc06848d2651585d4;hb=308488324dbc4d8b709d3fb1dc9fee0479346c21;hp=12fe2b8a61d757f4c561bb4bcd867782d13edfdf;hpb=16d5c07df7752d093df804d3f1141790f633c24b;p=dcpomatic.git diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 12fe2b8a6..004b89e65 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ */ #include -#include #include #include "image_content.h" #include "image_examiner.h" @@ -33,27 +32,24 @@ using std::cout; using std::list; using std::sort; using boost::shared_ptr; -using boost::lexical_cast; -using boost::bad_lexical_cast; ImageExaminer::ImageExaminer (shared_ptr film, shared_ptr content, shared_ptr) : _film (film) , _image_content (content) - , _video_length (0) { using namespace MagickCore; Magick::Image* image = new Magick::Image (content->path(0).string()); - _video_size = libdcp::Size (image->columns(), image->rows()); + _video_size = dcp::Size (image->columns(), image->rows()); delete image; if (content->still ()) { - _video_length = Config::instance()->default_still_length() * video_frame_rate(); + _video_length = ContentTime::from_seconds (Config::instance()->default_still_length()); } else { - _video_length = _image_content->number_of_paths (); + _video_length = ContentTime::from_frames (_image_content->number_of_paths (), video_frame_rate ()); } } -libdcp::Size +dcp::Size ImageExaminer::video_size () const { return _video_size.get ();