Fix large memory leak with image sources.
[dcpomatic.git] / src / lib / video_content.h
index ea4676cecbe1607fe4a86e47a71c278e763e86b2..f23bf0abe87980746b892def1244ff7241f38c0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
 
     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
@@ -96,6 +96,15 @@ public:
                return _video_length;
        }
 
+       VideoContent::Frame video_length_after_3d_combine () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) {
+                       return _video_length / 2;
+               }
+               
+               return _video_length;
+       }
+
        libdcp::Size video_size () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_size;
@@ -162,6 +171,9 @@ public:
 
        VideoContent::Frame time_to_content_video_frames (Time) const;
 
+       void scale_and_crop_to_fit_width ();
+       void scale_and_crop_to_fit_height ();
+
 protected:
        void take_from_video_examiner (boost::shared_ptr<VideoExaminer>);