#include "subtitle_analysis.h"
#include "exceptions.h"
+#include "warnings.h"
#include <libcxml/cxml.h>
#include <dcp/raw_convert.h>
+DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
using std::string;
using dcp::raw_convert;
-using boost::shared_ptr;
+using std::shared_ptr;
int const SubtitleAnalysis::_current_state_version = 1;
if (f.optional_number_child<int>("Version").get_value_or(1) < _current_state_version) {
/* Too old. Throw an exception so that this analysis is re-run. */
- throw OldFormatError ("Audio analysis file is too old");
+ throw OldFormatError ("Subtitle analysis file is too old");
}
cxml::NodePtr bounding_box = f.optional_node_child("BoundingBox");
_bounding_box->width = bounding_box->number_child<double>("Width");
_bounding_box->height = bounding_box->number_child<double>("Height");
}
+
+ _analysis_x_offset = f.number_child<double>("AnalysisXOffset");
+ _analysis_y_offset = f.number_child<double>("AnalysisYOffset");
}
bounding_box->add_child("Height")->add_child_text(raw_convert<string>(_bounding_box->height));
}
+ root->add_child("AnalysisXOffset")->add_child_text(raw_convert<string>(_analysis_x_offset));
+ root->add_child("AnalysisYOffset")->add_child_text(raw_convert<string>(_analysis_y_offset));
+
doc->write_to_file_formatted (path.string());
}