X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsubtitle_analysis.h;h=04dcc95014b5654489b07b8d64031fbbe3b197a4;hb=b95b521c63233aa08d42026098429cae4633c95a;hp=47eb5241149ea747e4d59e8aa40325198cab72b2;hpb=cef7a679a59044a5c807768042deecfd56ec6fc2;p=dcpomatic.git diff --git a/src/lib/subtitle_analysis.h b/src/lib/subtitle_analysis.h index 47eb52411..04dcc9501 100644 --- a/src/lib/subtitle_analysis.h +++ b/src/lib/subtitle_analysis.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,22 +18,21 @@ */ + #include "rect.h" -#include #include /** @class SubtitleAnalysis * @brief Class to store the results of a SubtitleAnalysisJob. */ - -class SubtitleAnalysis : public boost::noncopyable +class SubtitleAnalysis { public: explicit SubtitleAnalysis (boost::filesystem::path path); SubtitleAnalysis ( - boost::optional > bounding_box, + boost::optional> bounding_box, double analysis_x_offset_, double analysis_y_offset_ ) @@ -42,9 +41,12 @@ public: , _analysis_y_offset (analysis_y_offset_) {} + SubtitleAnalysis (SubtitleAnalysis const&) = delete; + SubtitleAnalysis& operator= (SubtitleAnalysis const&) = delete; + void write (boost::filesystem::path path) const; - boost::optional > bounding_box () const { + boost::optional> bounding_box () const { return _bounding_box; } @@ -53,7 +55,7 @@ public: } double analysis_y_offset () const { - return _analysis_x_offset; + return _analysis_y_offset; } private: @@ -61,7 +63,7 @@ private: * expressed as a proportion of screen size (i.e. 0 is left hand side/top, * 1 is right hand side/bottom), or empty if no subtitles were found. */ - boost::optional > _bounding_box; + boost::optional> _bounding_box; double _analysis_x_offset; double _analysis_y_offset;