diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-04-09 23:02:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-09 23:02:49 +0200 |
| commit | ed686c73b22ff7093f18653f3d3831ef1162d2ba (patch) | |
| tree | 20c99de437295154f4e007131e0dc78b65bd374d /src/lib | |
| parent | 0b10d978a83219558ba5b35ce831a5b187b5d7e9 (diff) | |
White space: image_examiner.{cc,h}
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/image_examiner.cc | 22 | ||||
| -rw-r--r-- | src/lib/image_examiner.h | 14 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 4a91a103f..f39500781 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -44,16 +44,16 @@ using std::sort; using boost::optional; -ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>) - : _film (film) - , _image_content (content) +ImageExaminer::ImageExaminer(shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>) + : _film(film) + , _image_content(content) { auto path = content->path(0); - if (valid_j2k_file (path)) { + if (valid_j2k_file(path)) { auto size = dcp::filesystem::file_size(path); dcp::File f(path, "rb"); if (!f) { - throw FileError ("Could not open file for reading", path); + throw FileError("Could not open file for reading", path); } std::vector<uint8_t> buffer(size); f.checked_read(buffer.data(), size); @@ -70,23 +70,23 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag _has_alpha = image.image->has_alpha(); } - if (content->still ()) { - _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or (film->video_frame_rate ()); + if (content->still()) { + _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or(film->video_frame_rate()); } else { - _video_length = _image_content->number_of_paths (); + _video_length = _image_content->number_of_paths(); } } optional<dcp::Size> -ImageExaminer::video_size () const +ImageExaminer::video_size() const { return _video_size; } optional<double> -ImageExaminer::video_frame_rate () const +ImageExaminer::video_frame_rate() const { if (_image_content->video_frame_rate()) { /* The content already knows what frame rate it should be */ @@ -99,7 +99,7 @@ ImageExaminer::video_frame_rate () const bool -ImageExaminer::yuv () const +ImageExaminer::yuv() const { /* We never convert ImageSource from YUV to RGB (though maybe sometimes we should) so it makes sense to just say they are never YUV so the option of a conversion diff --git a/src/lib/image_examiner.h b/src/lib/image_examiner.h index d6cdfac53..dddb6544f 100644 --- a/src/lib/image_examiner.h +++ b/src/lib/image_examiner.h @@ -25,21 +25,21 @@ class ImageContent; class ImageExaminer : public VideoExaminer { public: - ImageExaminer (std::shared_ptr<const Film>, std::shared_ptr<const ImageContent>, std::shared_ptr<Job>); + ImageExaminer(std::shared_ptr<const Film>, std::shared_ptr<const ImageContent>, std::shared_ptr<Job>); - bool has_video () const override { + bool has_video() const override { return true; } - boost::optional<double> video_frame_rate () const override; + boost::optional<double> video_frame_rate() const override; boost::optional<dcp::Size> video_size() const override; - Frame video_length () const override { + Frame video_length() const override { return _video_length; } - bool yuv () const override; - VideoRange range () const override { + bool yuv() const override; + VideoRange range() const override { return VideoRange::FULL; } - PixelQuanta pixel_quanta () const override { + PixelQuanta pixel_quanta() const override { /* See ::yuv - we're assuming the image is not YUV and so not subsampled */ return {}; } |
