diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/reel_picture_asset.cc | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/reel_picture_asset.cc')
| -rw-r--r-- | src/reel_picture_asset.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 2b3c3db0..8cdb9f44 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,10 +31,12 @@ files in the program, then also delete it here. */ -/** @file src/reel_picture_asset.h - * @brief ReelPictureAsset class. + +/** @file src/reel_picture_asset.cc + * @brief ReelPictureAsset class */ + #include "reel_picture_asset.h" #include "picture_asset.h" #include "dcp_assert.h" @@ -45,6 +47,7 @@ #include <iomanip> #include <cmath> + using std::bad_cast; using std::string; using std::shared_ptr; @@ -52,6 +55,7 @@ using std::dynamic_pointer_cast; using boost::optional; using namespace dcp; + ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) , ReelMXF (asset, asset->key_id()) @@ -61,6 +65,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entr } + ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node) : ReelAsset (node) , ReelMXF (node) @@ -79,10 +84,11 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node) } } + xmlpp::Node* ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const { - xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash()); + auto asset = write_to_cpl_asset (node, standard, hash()); asset->add_child("FrameRate")->add_child_text(String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator)); if (standard == Standard::INTEROP) { @@ -117,12 +123,14 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const return asset; } + string ReelPictureAsset::key_type () const { return "MDIK"; } + bool ReelPictureAsset::equals (shared_ptr<const ReelPictureAsset> other, EqualityOptions opt, NoteHandler note) const { @@ -133,7 +141,7 @@ ReelPictureAsset::equals (shared_ptr<const ReelPictureAsset> other, EqualityOpti return false; } - shared_ptr<const ReelPictureAsset> rpa = dynamic_pointer_cast<const ReelPictureAsset> (other); + auto rpa = dynamic_pointer_cast<const ReelPictureAsset>(other); if (!rpa) { return false; } |
