Merge branch 'ubuntu-build'
[dcpomatic.git] / src / lib / film_state.h
index beac5fc2c92410fca665a7a4085bae04f7661076..12d44cdce23797557aac7c23a8229b5835094298 100644 (file)
@@ -55,10 +55,6 @@ public:
                : dcp_content_type (0)
                , frames_per_second (0)
                , format (0)
-               , left_crop (0)
-               , right_crop (0)
-               , top_crop (0)
-               , bottom_crop (0)
                , scaler (Scaler::from_id ("bicubic"))
                , dcp_frames (0)
                , dcp_trim_action (CUT)
@@ -82,6 +78,8 @@ public:
 
        std::string thumb_file (int) const;
        int thumb_frame (int) const;
+
+       int bytes_per_sample () const;
        
        void write_metadata (std::ofstream &) const;
        void read_metadata (std::string, std::string);
@@ -104,14 +102,7 @@ public:
        float frames_per_second;
        /** The format to present this Film in (flat, scope, etc.) */
        Format const * format;
-       /** Number of pixels to crop from the left-hand side of the original picture */
-       int left_crop;
-       /** Number of pixels to crop from the right-hand side of the original picture */
-       int right_crop;
-       /** Number of pixels to crop from the top of the original picture */
-       int top_crop;
-       /** Number of pixels to crop from the bottom of the original picture */
-       int bottom_crop;
+       Crop crop;
        /** Video filters that should be used when generating DCPs */
        std::vector<Filter const *> filters;
        /** Scaler algorithm to use */
@@ -139,11 +130,11 @@ 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;
-       /** Sample rate of the audio, in Hz */
+       /** Sample rate of the source audio, in Hz */
        int audio_sample_rate;
        /** Format of the audio samples */
        AVSampleFormat audio_sample_format;