summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-04 12:25:48 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 15:53:48 +0100
commit42a65cba0d8da23c12af52015e66cd9dc0b5a5fa (patch)
treeff0a017c49d0975f21a5314d2f77be20f68bd379 /src/subtitle_asset.h
parent943e75e0ac5730714f3823771f127fe78e4cf82b (diff)
Initial work on SMPTE subtitles.
Diffstat (limited to 'src/subtitle_asset.h')
-rw-r--r--src/subtitle_asset.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index deb72ece..c8100d58 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -25,6 +25,10 @@
#include "subtitle_string.h"
#include <libcxml/cxml.h>
+namespace xmlpp {
+ class Element;
+}
+
namespace dcp
{
@@ -49,10 +53,6 @@ public:
NoteHandler note
) const;
- std::string language () const {
- return _language;
- }
-
std::list<SubtitleString> subtitles_during (Time from, Time to) const;
std::list<SubtitleString> const & subtitles () const {
return _subtitles;
@@ -60,11 +60,8 @@ public:
void add (SubtitleString);
- void write_xml (boost::filesystem::path) const;
- virtual Glib::ustring xml_as_string () const {
- /* XXX: this should be pure virtual when SMPTE writing is implemented */
- return "";
- }
+ virtual void write (boost::filesystem::path) const = 0;
+ virtual Glib::ustring xml_as_string () const = 0;
Time latest_subtitle_out () const;
@@ -73,18 +70,14 @@ public:
protected:
void parse_common (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<FontNode> > font_nodes);
- std::string pkl_type (Standard) const {
- return "text/xml";
- }
+ virtual std::string pkl_type (Standard) const = 0;
std::string asdcp_kind () const {
return "Subtitle";
}
-
- /* strangely, this is sometimes a string */
- std::string _reel_number;
- std::string _language;
+ void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, std::string xmlns) const;
+
std::list<SubtitleString> _subtitles;
private: