2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * @brief Classes used to parse a CPL.
25 #include <boost/shared_ptr.hpp>
30 /** CPL MainPicture node */
31 class MainPicture : public XMLNode
35 MainPicture (xmlpp::Node const * node);
38 std::string annotation_text;
40 int64_t intrinsic_duration;
44 Fraction screen_aspect_ratio;
47 /** CPL MainSound node */
48 class MainSound : public XMLNode
52 MainSound (xmlpp::Node const * node);
55 std::string annotation_text;
57 int64_t intrinsic_duration;
62 /** CPL MainSubtitle node */
63 class MainSubtitle : public XMLNode
67 MainSubtitle (xmlpp::Node const * node);
70 std::string annotation_text;
72 int64_t intrinsic_duration;
77 /** CPL AssetList node */
78 class CPLAssetList : public XMLNode
82 CPLAssetList (xmlpp::Node const * node);
84 boost::shared_ptr<MainPicture> main_picture;
85 boost::shared_ptr<MainSound> main_sound;
86 boost::shared_ptr<MainSubtitle> main_subtitle;
90 class CPLReel : public XMLNode
94 CPLReel (xmlpp::Node const * node);
97 boost::shared_ptr<CPLAssetList> asset_list;
100 /** CPL ContentVersion node */
101 class ContentVersion : public XMLNode
105 ContentVersion (xmlpp::Node const * node);
108 std::string label_text;
111 /** Class to parse a CPL */
112 class CPL : public XMLFile
115 /** Parse a CPL XML file into our member variables */
116 CPL (std::string file);
119 std::string annotation_text;
120 std::string issue_date;
122 std::string content_title_text;
123 ContentKind content_kind;
124 boost::shared_ptr<ContentVersion> content_version;
125 std::list<boost::shared_ptr<CPLReel> > reels;