summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-13 01:19:45 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-13 01:19:45 +0100
commitc14a05a935886345d4d891a92a31b1c35bf10582 (patch)
treefc640e3c8187867029cef48b91df7ed308b80c82 /src/subtitle_asset.cc
parentc2ec345242b680426938ed3ef7332ede1d3276a6 (diff)
Missing files.
Diffstat (limited to 'src/subtitle_asset.cc')
-rw-r--r--src/subtitle_asset.cc54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
new file mode 100644
index 00000000..19697a7f
--- /dev/null
+++ b/src/subtitle_asset.cc
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "subtitle_asset.h"
+
+using namespace libdcp;
+
+SubtitleAsset::SubtitleAsset (std::string directory, std::string xml)
+ : Asset (directory, xml)
+ , XMLFile (path().string(), "DCSubtitle")
+{
+ _subtitle_id = string_node ("SubtitleID");
+ _movie_title = string_node ("MovieTitle");
+ _reel_number = int64_node ("ReelNumber");
+ _language = string_node ("Language");
+
+ ignore_node ("LoadFont");
+
+ _fonts = sub_nodes<Font> ("Font");
+}
+
+Font::Font (xmlpp::Node const * node)
+ : XMLNode (node)
+{
+ _subtitles = sub_nodes<Subtitle> ("Subtitle");
+}
+
+Subtitle::Subtitle (xmlpp::Node const * node)
+ : XMLNode (node)
+{
+ _texts = sub_nodes<Text> ("Text");
+}
+
+Text::Text (xmlpp::Node const * node)
+ : XMLNode (node)
+{
+
+}