X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Freel_picture_asset.cc;h=7ee5fa38fe5c2ef3d1b4b6c123ffbd434942be39;hb=0d31c86d6dfad9f437f5613d41cace9cc5928474;hp=2e51fec5828707f3a60eefe061a0c163956fec91;hpb=274dd30f2b11fe8ea563a2ac7436c9d463865b0b;p=libdcp.git diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 2e51fec5..7ee5fa38 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -86,12 +86,12 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr node) } -xmlpp::Node* -ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const +xmlpp::Element* +ReelPictureAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const { auto asset = ReelFileAsset::write_to_cpl (node, standard); - asset->add_child("FrameRate")->add_child_text(String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator)); + cxml::add_text_child(asset, "FrameRate", String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator)); if (standard == Standard::INTEROP) { @@ -113,10 +113,12 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const } } - asset->add_child("ScreenAspectRatio")->add_child_text(raw_convert(closest.get(), 2, true)); + cxml::add_text_child(asset, "ScreenAspectRatio", raw_convert(closest.get(), 2, true)); } else { - asset->add_child("ScreenAspectRatio")->add_child_text( - String::compose ("%1 %2", _screen_aspect_ratio.numerator, _screen_aspect_ratio.denominator) + cxml::add_text_child( + asset, + "ScreenAspectRatio", + String::compose("%1 %2", _screen_aspect_ratio.numerator, _screen_aspect_ratio.denominator) ); } @@ -125,7 +127,7 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const bool -ReelPictureAsset::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const +ReelPictureAsset::equals(shared_ptr other, EqualityOptions const& opt, NoteHandler note) const { if (!asset_equals (other, opt, note)) { return false;