std::vector<int> thumbs;
/** Size, in pixels, of the source (ignoring cropping) */
Size size;
- /** Length in frames */
+ /** Length of the source in frames */
int length;
/** Number of audio channels */
int audio_channels;
#include "dcp_content_type.h"
#include "exceptions.h"
#include "options.h"
+#include "imagemagick_decoder.h"
using namespace std;
using namespace boost;
/* Remove any old DCP */
filesystem::remove_all (dcp_path);
- int const frames = _fs->dcp_frames ? _fs->dcp_frames : _fs->length;
+ int frames = 0;
+ switch (_fs->content_type ()) {
+ case VIDEO:
+ frames = _fs->dcp_frames ? _fs->dcp_frames : _fs->length;
+ break;
+ case STILL:
+ frames = _fs->still_duration * ImageMagickDecoder::static_frames_per_second ();
+ break;
+ }
+
libdcp::DCP dcp (_fs->dir (_fs->name), _fs->name, _fs->dcp_content_type->libdcp_type (), rint (_fs->frames_per_second), frames);
dcp.Progress.connect (sigc::mem_fun (*this, &MakeDCPJob::dcp_progress));