diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-24 23:37:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-24 23:37:32 +0100 |
| commit | 80497156e0364175f9d5f8c7b14612b99dc6dc32 (patch) | |
| tree | 419f5a7cef65fe2846618058c4d60aef8718c779 | |
| parent | d7a07b98f5b740921e9d7555740e05801ebfc1fc (diff) | |
| parent | ccd81cefeebba6a05b0a848d378dccb5a3ced086 (diff) | |
Merge branch 'master' into wx
| -rwxr-xr-x | rebuild-windows | 9 | ||||
| -rw-r--r-- | src/lib/film_state.h | 2 | ||||
| -rw-r--r-- | src/lib/make_dcp_job.cc | 12 |
3 files changed, 21 insertions, 2 deletions
diff --git a/rebuild-windows b/rebuild-windows index 3424d7451..60b4f29ff 100755 --- a/rebuild-windows +++ b/rebuild-windows @@ -8,12 +8,21 @@ export WINDOWS_PREFIX="/home/carl/src/windows" export PKG_CONFIG_LIBDIR=$WINDOWS_PREFIX/lib/pkgconfig ./waf clean + export PATH=$WINDOWS_PREFIX/bin:$PATH + CXX=$MINGW_CXX WINRC=$MINGW_WINDRES \ CXXFLAGS="-I$WINDOWS_PREFIX/include -I$MINGW_PREFIX/include" \ LINKFLAGS="-L$WINDOWS_PREFIX/lib -L$MINGW_PREFIX/lib" \ ./waf configure --target-windows +if [ "$?" != "0" ]; then + exit 1 +fi + ./waf +if [ "$?" != "0" ]; then + exit 1 +fi d=`pwd` diff --git a/src/lib/film_state.h b/src/lib/film_state.h index beac5fc2c..3a547ed1d 100644 --- a/src/lib/film_state.h +++ b/src/lib/film_state.h @@ -139,7 +139,7 @@ public: 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; diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc index 3de5e8d5d..a6d0c2d10 100644 --- a/src/lib/make_dcp_job.cc +++ b/src/lib/make_dcp_job.cc @@ -31,6 +31,7 @@ extern "C" { #include "dcp_content_type.h" #include "exceptions.h" #include "options.h" +#include "imagemagick_decoder.h" using namespace std; using namespace boost; @@ -73,7 +74,16 @@ MakeDCPJob::run () /* 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)); |
