More fr_FR tweaks from Lilian.
[dcpomatic.git] / src / lib / imagemagick_decoder.cc
index 5ebd6c8e1ccaba8ba498b6d453ad127573d6c0c3..5dc0b7b06d6ff9cfad6116ff12c7f7b6c1a4c7e0 100644 (file)
 #include "film.h"
 #include "exceptions.h"
 
+#include "i18n.h"
+
 using std::cout;
 using boost::shared_ptr;
+using libdcp::Size;
 
 ImageMagickDecoder::ImageMagickDecoder (
-       boost::shared_ptr<Film> f, boost::shared_ptr<const DecodeOptions> o, Job* j)
-       : Decoder (f, o, j)
-       , VideoDecoder (f, o, j)
+       boost::shared_ptr<Film> f, DecodeOptions o)
+       : Decoder (f, o)
+       , VideoDecoder (f, o)
 {
        if (boost::filesystem::is_directory (_film->content_path())) {
                for (
@@ -54,7 +57,7 @@ libdcp::Size
 ImageMagickDecoder::native_size () const
 {
        if (_files.empty ()) {
-               throw DecodeError ("no still image files found");
+               throw DecodeError (_("no still image files found"));
        }
 
        /* Look at the first file and assume its size holds for all */
@@ -70,7 +73,7 @@ bool
 ImageMagickDecoder::pass ()
 {
        if (_iter == _files.end()) {
-               if (!_film->dcp_length() || video_frame() >= _film->dcp_length().get()) {
+               if (video_frame() >= _film->still_duration_in_frames()) {
                        return true;
                }
 
@@ -97,7 +100,7 @@ ImageMagickDecoder::pass ()
 
        delete magick_image;
 
-       image = image->crop (_film->crop(), false);
+       image = image->crop (_film->crop(), true);
        
        emit_video (image, 0);