diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-09 13:48:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-09 13:48:35 +0100 |
| commit | 58c574239f98b03f253934d061d976bdb3e30899 (patch) | |
| tree | aaa2ce9f918185d1c33b343e47e51761fa697780 /src/lib/dcp_content.cc | |
| parent | 0dc52cd6e69890cd8a2c539e80389ea8bac5cc3c (diff) | |
Save and re-load DCP content.
Diffstat (limited to 'src/lib/dcp_content.cc')
| -rw-r--r-- | src/lib/dcp_content.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 3d4a48b89..8b809a1bd 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -39,6 +39,16 @@ DCPContent::DCPContent (shared_ptr<const Film> f, boost::filesystem::path p) read_directory (p); } +DCPContent::DCPContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version) + : Content (f, node) + , VideoContent (f, node, version) + , SingleStreamAudioContent (f, node, version) + , SubtitleContent (f, node, version) +{ + _name = node->string_child ("Name"); + _directory = node->string_child ("Directory"); +} + void DCPContent::read_directory (boost::filesystem::path p) { @@ -82,9 +92,14 @@ void DCPContent::as_xml (xmlpp::Node* node) const { node->add_child("Type")->add_child_text ("DCP"); + Content::as_xml (node); VideoContent::as_xml (node); SingleStreamAudioContent::as_xml (node); + SubtitleContent::as_xml (node); + + node->add_child("Name")->add_child_text (_name); + node->add_child("Directory")->add_child_text (_directory.string ()); } DCPTime |
