/*
- Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
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"
#include <iomanip>
#include <cmath>
+
using std::bad_cast;
using std::string;
using std::shared_ptr;
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())
}
+
ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node)
: ReelAsset (node)
, ReelMXF (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) {
return asset;
}
+
string
ReelPictureAsset::key_type () const
{
return "MDIK";
}
+
bool
ReelPictureAsset::equals (shared_ptr<const ReelPictureAsset> other, EqualityOptions opt, NoteHandler note) const
{
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;
}