summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-04 16:48:08 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:34:43 +0100
commit6c55e8d2c3b0129a19fc40dca344219021ad12ef (patch)
treecf9c3244ed55fb1fa8db89ca87923f3b7a6d35a1 /src
parent2105caa32a12236d5b70a0cf8b9ac62fcf7f574e (diff)
Rename some stuff Content -> Asset.
Diffstat (limited to 'src')
-rw-r--r--src/dcp.cc8
-rw-r--r--src/interop_subtitle_asset.cc (renamed from src/interop_subtitle_content.cc)20
-rw-r--r--src/interop_subtitle_asset.h (renamed from src/interop_subtitle_content.h)8
-rw-r--r--src/reel.cc2
-rw-r--r--src/reel_sound_asset.cc4
-rw-r--r--src/reel_subtitle_asset.cc6
-rw-r--r--src/reel_subtitle_asset.h12
-rw-r--r--src/smpte_subtitle_asset.cc (renamed from src/smpte_subtitle_content.cc)10
-rw-r--r--src/smpte_subtitle_asset.h (renamed from src/smpte_subtitle_content.h)6
-rw-r--r--src/subtitle_asset.cc (renamed from src/subtitle_content.cc)26
-rw-r--r--src/subtitle_asset.h (renamed from src/subtitle_content.h)12
-rw-r--r--src/wscript12
12 files changed, 63 insertions, 63 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index 638ed707..e1b632c6 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -25,8 +25,8 @@
#include "dcp.h"
#include "sound_mxf.h"
#include "picture_mxf.h"
-#include "interop_subtitle_content.h"
-#include "smpte_subtitle_content.h"
+#include "interop_subtitle_asset.h"
+#include "smpte_subtitle_asset.h"
#include "mono_picture_mxf.h"
#include "stereo_picture_mxf.h"
#include "util.h"
@@ -137,7 +137,7 @@ DCP::read (bool keep_going, ReadErrors* errors)
if (root == "CompositionPlaylist") {
_assets.push_back (shared_ptr<CPL> (new CPL (path)));
} else if (root == "DCSubtitle") {
- _assets.push_back (shared_ptr<InteropSubtitleContent> (new InteropSubtitleContent (path)));
+ _assets.push_back (shared_ptr<InteropSubtitleAsset> (new InteropSubtitleAsset (path)));
}
} else if (boost::algorithm::ends_with (path.string(), ".mxf")) {
ASDCP::EssenceType_t type;
@@ -159,7 +159,7 @@ DCP::read (bool keep_going, ReadErrors* errors)
_assets.push_back (shared_ptr<StereoPictureMXF> (new StereoPictureMXF (path)));
break;
case ASDCP::ESS_TIMED_TEXT:
- _assets.push_back (shared_ptr<SMPTESubtitleContent> (new SMPTESubtitleContent (path)));
+ _assets.push_back (shared_ptr<SMPTESubtitleAsset> (new SMPTESubtitleAsset (path)));
break;
default:
throw DCPReadError ("Unknown MXF essence type");
diff --git a/src/interop_subtitle_content.cc b/src/interop_subtitle_asset.cc
index 29da0b21..a6bdfcaf 100644
--- a/src/interop_subtitle_content.cc
+++ b/src/interop_subtitle_asset.cc
@@ -17,7 +17,7 @@
*/
-#include "interop_subtitle_content.h"
+#include "interop_subtitle_asset.h"
#include "interop_load_font_node.h"
#include "xml.h"
#include "raw_convert.h"
@@ -34,8 +34,8 @@ using boost::optional;
using boost::dynamic_pointer_cast;
using namespace dcp;
-InteropSubtitleContent::InteropSubtitleContent (boost::filesystem::path file)
- : SubtitleContent (file)
+InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file)
+ : SubtitleAsset (file)
{
shared_ptr<cxml::Document> xml (new cxml::Document ("DCSubtitle"));
xml->read_file (file);
@@ -53,7 +53,7 @@ InteropSubtitleContent::InteropSubtitleContent (boost::filesystem::path file)
parse_common (xml, font_nodes);
}
-InteropSubtitleContent::InteropSubtitleContent (string movie_title, string language)
+InteropSubtitleAsset::InteropSubtitleAsset (string movie_title, string language)
: _movie_title (movie_title)
{
_language = language;
@@ -69,7 +69,7 @@ struct SubtitleSorter {
};
Glib::ustring
-InteropSubtitleContent::xml_as_string () const
+InteropSubtitleAsset::xml_as_string () const
{
xmlpp::Document doc;
xmlpp::Element* root = doc.create_root_node ("DCSubtitle");
@@ -187,19 +187,19 @@ InteropSubtitleContent::xml_as_string () const
}
void
-InteropSubtitleContent::add_font (string id, string uri)
+InteropSubtitleAsset::add_font (string id, string uri)
{
_load_font_nodes.push_back (shared_ptr<InteropLoadFontNode> (new InteropLoadFontNode (id, uri)));
}
bool
-InteropSubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
+InteropSubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
{
- if (!SubtitleContent::equals (other_asset, options, note)) {
+ if (!SubtitleAsset::equals (other_asset, options, note)) {
return false;
}
- shared_ptr<const InteropSubtitleContent> other = dynamic_pointer_cast<const InteropSubtitleContent> (other_asset);
+ shared_ptr<const InteropSubtitleAsset> other = dynamic_pointer_cast<const InteropSubtitleAsset> (other_asset);
if (!other) {
return false;
}
@@ -231,7 +231,7 @@ InteropSubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOpt
}
list<shared_ptr<LoadFontNode> >
-InteropSubtitleContent::load_font_nodes () const
+InteropSubtitleAsset::load_font_nodes () const
{
list<shared_ptr<LoadFontNode> > lf;
copy (_load_font_nodes.begin(), _load_font_nodes.end(), back_inserter (lf));
diff --git a/src/interop_subtitle_content.h b/src/interop_subtitle_asset.h
index cb7c52d5..586bb67c 100644
--- a/src/interop_subtitle_content.h
+++ b/src/interop_subtitle_asset.h
@@ -17,18 +17,18 @@
*/
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
#include <boost/filesystem.hpp>
namespace dcp {
class InteropLoadFontNode;
-class InteropSubtitleContent : public SubtitleContent
+class InteropSubtitleAsset : public SubtitleAsset
{
public:
- InteropSubtitleContent (std::string movie_title, std::string language);
- InteropSubtitleContent (boost::filesystem::path file);
+ InteropSubtitleAsset (std::string movie_title, std::string language);
+ InteropSubtitleAsset (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset>,
diff --git a/src/reel.cc b/src/reel.cc
index eb682aea..3a046297 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -23,7 +23,7 @@
#include "mono_picture_mxf.h"
#include "stereo_picture_mxf.h"
#include "sound_mxf.h"
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
#include "reel_mono_picture_asset.h"
#include "reel_stereo_picture_asset.h"
#include "reel_sound_asset.h"
diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc
index a5e32b02..9d3e00d7 100644
--- a/src/reel_sound_asset.cc
+++ b/src/reel_sound_asset.cc
@@ -29,8 +29,8 @@ using std::string;
using boost::shared_ptr;
using namespace dcp;
-ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundMXF> content, int64_t entry_point)
- : ReelMXFAsset (content, content->edit_rate(), content->intrinsic_duration(), entry_point)
+ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundMXF> asset, int64_t entry_point)
+ : ReelMXFAsset (asset, asset->edit_rate(), asset->intrinsic_duration(), entry_point)
{
}
diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc
index 139e3a39..ed0376ed 100644
--- a/src/reel_subtitle_asset.cc
+++ b/src/reel_subtitle_asset.cc
@@ -21,15 +21,15 @@
* @brief ReelSubtitleAsset class.
*/
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
#include "reel_subtitle_asset.h"
using std::string;
using boost::shared_ptr;
using namespace dcp;
-ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr<SubtitleContent> content, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point)
- : ReelAsset (content, edit_rate, intrinsic_duration, entry_point)
+ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point)
+ : ReelAsset (asset, edit_rate, intrinsic_duration, entry_point)
{
}
diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h
index bc00b4c3..f296fdc6 100644
--- a/src/reel_subtitle_asset.h
+++ b/src/reel_subtitle_asset.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
@@ -25,11 +25,11 @@
#define LIBDCP_REEL_SUBTITLE_ASSET_H
#include "reel_asset.h"
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
namespace dcp {
-class SubtitleContent;
+class SubtitleAsset;
/** @class ReelSubtitleAsset
* @brief Part of a Reel's description which refers to a subtitle XML file.
@@ -37,11 +37,11 @@ class SubtitleContent;
class ReelSubtitleAsset : public ReelAsset
{
public:
- ReelSubtitleAsset (boost::shared_ptr<SubtitleContent> content, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point);
+ ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point);
ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>);
- boost::shared_ptr<SubtitleContent> subtitle_content () const {
- return boost::dynamic_pointer_cast<SubtitleContent> (_asset.object ());
+ boost::shared_ptr<SubtitleAsset> subtitle_asset () const {
+ return boost::dynamic_pointer_cast<SubtitleAsset> (_asset.object ());
}
private:
diff --git a/src/smpte_subtitle_content.cc b/src/smpte_subtitle_asset.cc
index e95a64fc..e5a083b1 100644
--- a/src/smpte_subtitle_content.cc
+++ b/src/smpte_subtitle_asset.cc
@@ -17,7 +17,7 @@
*/
-#include "smpte_subtitle_content.h"
+#include "smpte_subtitle_asset.h"
#include "smpte_load_font_node.h"
#include "font_node.h"
#include "exceptions.h"
@@ -33,8 +33,8 @@ using std::cout;
using boost::shared_ptr;
using namespace dcp;
-SMPTESubtitleContent::SMPTESubtitleContent (boost::filesystem::path file, bool mxf)
- : SubtitleContent (file)
+SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file, bool mxf)
+ : SubtitleAsset (file)
{
shared_ptr<cxml::Document> xml (new cxml::Document ("SubtitleReel"));
@@ -78,7 +78,7 @@ SMPTESubtitleContent::SMPTESubtitleContent (boost::filesystem::path file, bool m
}
list<shared_ptr<LoadFontNode> >
-SMPTESubtitleContent::load_font_nodes () const
+SMPTESubtitleAsset::load_font_nodes () const
{
list<shared_ptr<LoadFontNode> > lf;
copy (_load_font_nodes.begin(), _load_font_nodes.end(), back_inserter (lf));
@@ -86,7 +86,7 @@ SMPTESubtitleContent::load_font_nodes () const
}
bool
-SMPTESubtitleContent::valid_mxf (boost::filesystem::path file)
+SMPTESubtitleAsset::valid_mxf (boost::filesystem::path file)
{
ASDCP::TimedText::MXFReader reader;
Kumu::Result_t r = reader.OpenRead (file.string().c_str ());
diff --git a/src/smpte_subtitle_content.h b/src/smpte_subtitle_asset.h
index 8526e0ec..639c8eb7 100644
--- a/src/smpte_subtitle_content.h
+++ b/src/smpte_subtitle_asset.h
@@ -17,20 +17,20 @@
*/
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
#include <boost/filesystem.hpp>
namespace dcp {
class SMPTELoadFontNode;
-class SMPTESubtitleContent : public SubtitleContent
+class SMPTESubtitleAsset : public SubtitleAsset
{
public:
/** @param file File name
* @param mxf true if `file' is a MXF, or false if it is an XML file.
*/
- SMPTESubtitleContent (boost::filesystem::path file, bool mxf = true);
+ SMPTESubtitleAsset (boost::filesystem::path file, bool mxf = true);
std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const;
diff --git a/src/subtitle_content.cc b/src/subtitle_asset.cc
index d2be6fe0..f1ecc939 100644
--- a/src/subtitle_content.cc
+++ b/src/subtitle_asset.cc
@@ -18,7 +18,7 @@
*/
#include "raw_convert.h"
-#include "subtitle_content.h"
+#include "subtitle_asset.h"
#include "util.h"
#include "xml.h"
#include "font_node.h"
@@ -42,13 +42,13 @@ using boost::optional;
using boost::dynamic_pointer_cast;
using namespace dcp;
-SubtitleContent::SubtitleContent ()
+SubtitleAsset::SubtitleAsset ()
: _reel_number ("1")
{
}
-SubtitleContent::SubtitleContent (boost::filesystem::path file)
+SubtitleAsset::SubtitleAsset (boost::filesystem::path file)
: Asset (file)
, _reel_number ("1")
{
@@ -56,7 +56,7 @@ SubtitleContent::SubtitleContent (boost::filesystem::path file)
}
void
-SubtitleContent::parse_common (shared_ptr<cxml::Document> xml, list<shared_ptr<dcp::FontNode> > font_nodes)
+SubtitleAsset::parse_common (shared_ptr<cxml::Document> xml, list<shared_ptr<dcp::FontNode> > font_nodes)
{
_reel_number = xml->string_child ("ReelNumber");
_language = xml->string_child ("Language");
@@ -70,7 +70,7 @@ SubtitleContent::parse_common (shared_ptr<cxml::Document> xml, list<shared_ptr<d
}
void
-SubtitleContent::examine_font_nodes (
+SubtitleAsset::examine_font_nodes (
shared_ptr<const cxml::Node> xml,
list<shared_ptr<dcp::FontNode> > const & font_nodes,
ParseState& parse_state
@@ -96,7 +96,7 @@ SubtitleContent::examine_font_nodes (
}
void
-SubtitleContent::examine_text_nodes (
+SubtitleAsset::examine_text_nodes (
shared_ptr<const cxml::Node> xml,
list<shared_ptr<dcp::TextNode> > const & text_nodes,
ParseState& parse_state
@@ -111,7 +111,7 @@ SubtitleContent::examine_text_nodes (
}
void
-SubtitleContent::maybe_add_subtitle (string text, ParseState const & parse_state)
+SubtitleAsset::maybe_add_subtitle (string text, ParseState const & parse_state)
{
if (empty_or_white_space (text)) {
return;
@@ -151,7 +151,7 @@ SubtitleContent::maybe_add_subtitle (string text, ParseState const & parse_state
}
list<SubtitleString>
-SubtitleContent::subtitles_during (Time from, Time to) const
+SubtitleAsset::subtitles_during (Time from, Time to) const
{
list<SubtitleString> s;
for (list<SubtitleString>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
@@ -164,13 +164,13 @@ SubtitleContent::subtitles_during (Time from, Time to) const
}
void
-SubtitleContent::add (SubtitleString s)
+SubtitleAsset::add (SubtitleString s)
{
_subtitles.push_back (s);
}
void
-SubtitleContent::write_xml (boost::filesystem::path p) const
+SubtitleAsset::write_xml (boost::filesystem::path p) const
{
FILE* f = fopen_boost (p, "w");
if (!f) {
@@ -185,7 +185,7 @@ SubtitleContent::write_xml (boost::filesystem::path p) const
}
Time
-SubtitleContent::latest_subtitle_out () const
+SubtitleAsset::latest_subtitle_out () const
{
Time t;
for (list<SubtitleString>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
@@ -198,13 +198,13 @@ SubtitleContent::latest_subtitle_out () const
}
bool
-SubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
+SubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
{
if (!Asset::equals (other_asset, options, note)) {
return false;
}
- shared_ptr<const SubtitleContent> other = dynamic_pointer_cast<const SubtitleContent> (other_asset);
+ shared_ptr<const SubtitleAsset> other = dynamic_pointer_cast<const SubtitleAsset> (other_asset);
if (!other) {
return false;
}
diff --git a/src/subtitle_content.h b/src/subtitle_asset.h
index d80d631c..deb72ece 100644
--- a/src/subtitle_content.h
+++ b/src/subtitle_asset.h
@@ -17,8 +17,8 @@
*/
-#ifndef LIBDCP_SUBTITLE_CONTENT_H
-#define LIBDCP_SUBTITLE_CONTENT_H
+#ifndef LIBDCP_SUBTITLE_ASSET_H
+#define LIBDCP_SUBTITLE_ASSET_H
#include "asset.h"
#include "dcp_time.h"
@@ -34,14 +34,14 @@ class TextNode;
class SubtitleNode;
class LoadFontNode;
-/** @class SubtitleContent
+/** @class SubtitleAsset
* @brief A parent for classes representing a file containing subtitles.
*/
-class SubtitleContent : public Asset
+class SubtitleAsset : public Asset
{
public:
- SubtitleContent ();
- SubtitleContent (boost::filesystem::path file);
+ SubtitleAsset ();
+ SubtitleAsset (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset>,
diff --git a/src/wscript b/src/wscript
index 7328178b..54f3a03b 100644
--- a/src/wscript
+++ b/src/wscript
@@ -19,7 +19,7 @@ def build(bld):
font_node.cc
gamma_transfer_function.cc
interop_load_font_node.cc
- interop_subtitle_content.cc
+ interop_subtitle_asset.cc
key.cc
local_time.cc
metadata.cc
@@ -43,7 +43,7 @@ def build(bld):
rgb_xyz.cc
signer.cc
smpte_load_font_node.cc
- smpte_subtitle_content.cc
+ smpte_subtitle_asset.cc
sound_mxf.cc
sound_mxf_writer.cc
sound_frame.cc
@@ -51,7 +51,7 @@ def build(bld):
stereo_picture_mxf_writer.cc
stereo_picture_frame.cc
subtitle_node.cc
- subtitle_content.cc
+ subtitle_asset.cc
subtitle_string.cc
text_node.cc
transfer_function.cc
@@ -78,7 +78,7 @@ def build(bld):
font.h
gamma_transfer_function.h
interop_load_font_node.h
- interop_subtitle_content.h
+ interop_subtitle_asset.h
key.h
load_font_node.h
local_time.h
@@ -104,14 +104,14 @@ def build(bld):
ref.h
signer.h
smpte_load_font_node.h
- smpte_subtitle_content.h
+ smpte_subtitle_asset.h
sound_frame.h
sound_mxf.h
sound_mxf_writer.h
stereo_picture_mxf.h
stereo_picture_frame.h
subtitle_node.h
- subtitle_content.h
+ subtitle_asset.h
subtitle_string.h
transfer_function.h
types.h