diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-12-04 20:55:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-12-04 21:26:27 +0100 |
| commit | df66616a4d9af7b97480215f51266ab9f6a912e9 (patch) | |
| tree | fead77633bcc036bdfebc703dccdba0f2ffc96d3 /src/interop_subtitle_asset.cc | |
| parent | e42602d3f8ca95c26c87425a42ebcb17db88cd72 (diff) | |
Pass optimisation setting through to subtitle XML writers.
Diffstat (limited to 'src/interop_subtitle_asset.cc')
| -rw-r--r-- | src/interop_subtitle_asset.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index eaf2ceaf..0c35abbf 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -109,7 +109,7 @@ InteropSubtitleAsset::InteropSubtitleAsset () string -InteropSubtitleAsset::xml_as_string () const +InteropSubtitleAsset::xml_as_string(SubtitleOptimisation optimisation) const { xmlpp::Document doc; auto root = doc.create_root_node ("DCSubtitle"); @@ -126,7 +126,7 @@ InteropSubtitleAsset::xml_as_string () const load_font->set_attribute ("URI", i->uri); } - subtitles_as_xml (root, 250, Standard::INTEROP); + subtitles_as_xml(root, 250, Standard::INTEROP, optimisation); return format_xml(doc, {}); } @@ -192,14 +192,14 @@ InteropSubtitleAsset::load_font_nodes () const void -InteropSubtitleAsset::write(boost::filesystem::path path) const +InteropSubtitleAsset::write(boost::filesystem::path path, SubtitleOptimisation optimisation) const { File file(path, "wb"); if (!file) { throw FileError("Could not open file for writing", path, -1); } - _raw_xml = xml_as_string (); + _raw_xml = xml_as_string(optimisation); /* length() here gives bytes not characters */ file.write(_raw_xml->c_str(), 1, _raw_xml->length()); |
