X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm_state.h;h=16a1b0508d80f6daaced489fb6b0e34819399515;hb=f29219ed06d27dcae5e18b8b9c52dcf24554f188;hp=62ca76c4190b2a4d2d97db9cd6c2ea8555678cd0;hpb=650d80e5daf50330ec449ea22a51c3dffa684598;p=dcpomatic.git diff --git a/src/lib/film_state.h b/src/lib/film_state.h index 62ca76c41..16a1b0508 100644 --- a/src/lib/film_state.h +++ b/src/lib/film_state.h @@ -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,12 +78,17 @@ public: std::string thumb_file (int) const; int thumb_frame (int) const; + + int bytes_per_sample () const; + int target_sample_rate () const; void write_metadata (std::ofstream &) const; void read_metadata (std::string, std::string); Size cropped_size (Size) const; + int dcp_length () const; + /** Complete path to directory containing the film metadata; must not be relative. */ @@ -104,14 +105,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 filters; /** Scaler algorithm to use */ @@ -135,15 +129,15 @@ public: /* Data which is cached to speed things up */ - /** Vector of frame indices for each of our `thumbnails */ + /** Vector of frame indices for each of our `thumbnails' */ std::vector 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;