From 6d95d9689831a74fade32038a808f206c03d8aa2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 6 Feb 2024 10:58:39 +0100 Subject: FIXME: Remove all use of add_child() from xmlpp. Needs bump of libcxml. --- src/lib/ffmpeg_content.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/lib/ffmpeg_content.cc') diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index c788e7cb1..8baa40c1b 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -197,61 +197,61 @@ FFmpegContent::FFmpegContent (vector> c) void -FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const +FFmpegContent::as_xml(xmlpp::Element* element, bool with_paths) const { - node->add_child("Type")->add_child_text("FFmpeg"); - Content::as_xml (node, with_paths); + cxml::add_text_child(element, "Type", "FFmpeg"); + Content::as_xml(element, with_paths); if (video) { - video->as_xml (node); + video->as_xml(element); } if (audio) { - audio->as_xml (node); + audio->as_xml(element); for (auto i: audio->streams()) { auto f = dynamic_pointer_cast (i); DCPOMATIC_ASSERT (f); - f->as_xml (node->add_child("AudioStream")); + f->as_xml(cxml::add_child(element, "AudioStream")); } } if (only_text()) { - only_text()->as_xml (node); + only_text()->as_xml(element); } boost::mutex::scoped_lock lm (_mutex); for (auto i: _subtitle_streams) { - auto t = node->add_child("SubtitleStream"); + auto t = cxml::add_child(element, "SubtitleStream"); if (_subtitle_stream && i == _subtitle_stream) { - t->add_child("Selected")->add_child_text("1"); + cxml::add_text_child(t, "Selected", "1"); } i->as_xml (t); } for (auto i: _filters) { - node->add_child("Filter")->add_child_text(i.id()); + cxml::add_text_child(element, "Filter", i.id()); } if (_first_video) { - node->add_child("FirstVideo")->add_child_text(raw_convert(_first_video.get().get())); + cxml::add_text_child(element, "FirstVideo", raw_convert(_first_video.get().get())); } if (_color_range) { - node->add_child("ColorRange")->add_child_text(raw_convert(static_cast(*_color_range))); + cxml::add_text_child(element, "ColorRange", raw_convert(static_cast(*_color_range))); } if (_color_primaries) { - node->add_child("ColorPrimaries")->add_child_text(raw_convert(static_cast(*_color_primaries))); + cxml::add_text_child(element, "ColorPrimaries", raw_convert(static_cast(*_color_primaries))); } if (_color_trc) { - node->add_child("ColorTransferCharacteristic")->add_child_text(raw_convert(static_cast(*_color_trc))); + cxml::add_text_child(element, "ColorTransferCharacteristic", raw_convert(static_cast(*_color_trc))); } if (_colorspace) { - node->add_child("Colorspace")->add_child_text(raw_convert(static_cast(*_colorspace))); + cxml::add_text_child(element, "Colorspace", raw_convert(static_cast(*_colorspace))); } if (_bits_per_pixel) { - node->add_child("BitsPerPixel")->add_child_text(raw_convert(*_bits_per_pixel)); + cxml::add_text_child(element, "BitsPerPixel", raw_convert(*_bits_per_pixel)); } } -- cgit v1.2.3