Allow static builds.
[dcpomatic.git] / src / lib / dcp_video_frame.cc
index 3e58203ede9eecee86558416b169c8fed01e69ad..c185de0f4d74ffeef5b6df6cdec2299874db6c3f 100644 (file)
@@ -74,9 +74,9 @@ using boost::shared_ptr;
  *  @param l Log to write to.
  */
 DCPVideoFrame::DCPVideoFrame (
-       shared_ptr<Image> yuv, shared_ptr<Subtitle> sub,
+       shared_ptr<const Image> yuv, shared_ptr<Subtitle> sub,
        Size out, int p, int subtitle_offset, float subtitle_scale,
-       Scaler const * s, int f, float fps, string pp, int clut, int bw, Log* l
+       Scaler const * s, SourceFrame f, float fps, string pp, int clut, int bw, Log* l
        )
        : _input (yuv)
        , _subtitle (sub)
@@ -86,8 +86,7 @@ DCPVideoFrame::DCPVideoFrame (
        , _subtitle_scale (subtitle_scale)
        , _scaler (s)
        , _frame (f)
-         /* we round here; not sure if this is right */
-       , _frames_per_second (rint (fps))
+       , _frames_per_second (dcp_frame_rate(fps).frames_per_second)
        , _post_process (pp)
        , _colour_lut_index (clut)
        , _j2k_bandwidth (bw)
@@ -346,8 +345,9 @@ DCPVideoFrame::encode_remotely (ServerDescription const * serv)
        }
 
        _log->log (String::compose (
-                          "Sending to remote; pixel format %1, components %2, line sizes (%3,%4,%5)",
+                          "Sending to remote; pixel format %1, components %2, lines (%3,%4,%5), line sizes (%6,%7,%8)",
                           _input->pixel_format(), _input->components(),
+                          _input->lines(0), _input->lines(1), _input->lines(2),
                           _input->line_size()[0], _input->line_size()[1], _input->line_size()[2]
                           ));
        
@@ -376,7 +376,7 @@ DCPVideoFrame::encode_remotely (ServerDescription const * serv)
  *  @param frame Frame index.
  */
 void
-EncodedData::write (shared_ptr<const Options> opt, int frame)
+EncodedData::write (shared_ptr<const Options> opt, SourceFrame frame)
 {
        string const tmp_j2k = opt->frame_out_path (frame, true);