+++ /dev/null
-/*
- 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.
-
-*/
-
-/** @file src/asset.cc
- * @brief Parent class for assets of DCPs.
- */
-
-#include <iostream>
-#include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/function.hpp>
-#include <libxml++/nodes/element.h>
-#include "AS_DCP.h"
-#include "KM_util.h"
-#include "asset.h"
-#include "util.h"
-#include "metadata.h"
-
-using namespace std;
-using namespace boost;
-using namespace dcp;
-
-Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name)
- : _directory (directory)
- , _file_name (file_name)
- , _uuid (make_uuid ())
- , _edit_rate (0)
- , _entry_point (0)
- , _intrinsic_duration (0)
- , _duration (0)
-{
- if (_file_name.empty ()) {
- _file_name = _uuid + ".xml";
- }
-}
-
-void
-Asset::write_to_pkl (xmlpp::Node* node) const
-{
- xmlpp::Node* asset = node->add_child ("Asset");
- asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
- asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
- asset->add_child("Hash")->add_child_text (digest ());
- asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
- asset->add_child("Type")->add_child_text ("application/mxf");
-}
-
-void
-Asset::write_to_assetmap (xmlpp::Node* node) const
-{
- xmlpp::Node* asset = node->add_child ("Asset");
- asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
- xmlpp::Node* chunk_list = asset->add_child ("ChunkList");
- xmlpp::Node* chunk = chunk_list->add_child ("Chunk");
- chunk->add_child("Path")->add_child_text (_file_name.string ());
- chunk->add_child("VolumeIndex")->add_child_text ("1");
- chunk->add_child("Offset")->add_child_text ("0");
- chunk->add_child("Length")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
-}
-
-filesystem::path
-Asset::path () const
-{
- filesystem::path p;
- p /= _directory;
- p /= _file_name;
- return p;
-}
-
-string
-Asset::digest () const
-{
- if (_digest.empty ()) {
- _digest = make_digest (path().string(), 0);
- }
-
- return _digest;
-}
-
-void
-Asset::compute_digest (boost::function<void (float)> progress)
-{
- if (!_digest.empty ()) {
- return;
- }
-
- _digest = make_digest (path().string(), &progress);
-}
-
-bool
-Asset::equals (shared_ptr<const Asset> other, EqualityOptions, boost::function<void (NoteType, string)> note) const
-{
- if (_edit_rate != other->_edit_rate) {
- note (ERROR, "asset edit rates differ");
- return false;
- }
-
- if (_intrinsic_duration != other->_intrinsic_duration) {
- note (ERROR, "asset intrinsic durations differ");
- }
-
- if (_duration != other->_duration) {
- note (ERROR, "asset durations differ");
- }
-
- return true;
-}
+++ /dev/null
-/*
- 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.
-
-*/
-
-/** @file src/asset.h
- * @brief Parent class for assets of DCPs.
- */
-
-#ifndef LIBDCP_ASSET_H
-#define LIBDCP_ASSET_H
-
-#include <string>
-#include <list>
-#include <boost/filesystem.hpp>
-#include <boost/function.hpp>
-#include <libxml++/libxml++.h>
-#include "types.h"
-
-namespace ASDCP {
- class WriterInfo;
-}
-
-namespace xmlpp {
- class Element;
-}
-
-namespace dcp
-{
-
-/** @brief Parent class for assets of DCPs
- *
- * These are collections of pictures or sound.
- */
-class Asset
-{
-public:
- /** Construct an Asset.
- * @param directory Directory where our XML or MXF file is.
- * @param file_name Name of our file within directory, or empty to make one up based on UUID.
- */
- Asset (boost::filesystem::path directory, boost::filesystem::path file_name = "");
-
- virtual ~Asset() {}
-
- /** Write details of the asset to a CPL AssetList node.
- * @param p Parent element.
- */
- virtual void write_to_cpl (xmlpp::Element* p) const = 0;
-
- /** Write details of the asset to a PKL AssetList node.
- * @param p Parent node.
- */
- void write_to_pkl (xmlpp::Node *) const;
-
- /** Write details of the asset to a ASSETMAP stream.
- * @param s Stream.
- */
- void write_to_assetmap (xmlpp::Node *) const;
-
- /** Compute the digest for this asset. Calling this is optional: if
- * it is not called, the digest will be computed when required. However,
- * calling this method allows the caller to see the progress of the
- * computation, which can be long for large assets.
- * @param Called with progress between 0 and 1.
- */
- void compute_digest (boost::function<void (float)> progress);
-
- std::string uuid () const {
- return _uuid;
- }
-
- boost::filesystem::path path () const;
-
- void set_directory (boost::filesystem::path d) {
- _directory = d;
- }
-
- void set_file_name (boost::filesystem::path f) {
- _file_name = f;
- }
-
- int entry_point () const {
- return _entry_point;
- }
-
- int duration () const {
- return _duration;
- }
-
- int intrinsic_duration () const {
- return _intrinsic_duration;
- }
-
- int edit_rate () const {
- return _edit_rate;
- }
-
- void set_entry_point (int e) {
- _entry_point = e;
- }
-
- void set_duration (int d) {
- _duration = d;
- }
-
- void set_intrinsic_duration (int d) {
- _intrinsic_duration = d;
- }
-
- void set_edit_rate (int r) {
- _edit_rate = r;
- }
-
- virtual bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)>) const;
-
-protected:
-
- std::string digest () const;
-
- /** Directory that our MXF or XML file is in */
- boost::filesystem::path _directory;
- /** Name of our MXF or XML file */
- boost::filesystem::path _file_name;
- /** Our UUID */
- std::string _uuid;
- /** The edit rate; this is normally equal to the number of video frames per second */
- int _edit_rate;
- /** Start point to present in frames */
- int _entry_point;
- /** Total length in frames */
- int _intrinsic_duration;
- /** Length to present in frames */
- int _duration;
-
-private:
- /** Digest of our MXF or XML file */
- mutable std::string _digest;
-};
-
-}
-
-#endif
--- /dev/null
+/*
+ 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 <iostream>
+#include <boost/filesystem.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/function.hpp>
+#include <libxml++/nodes/element.h>
+#include "AS_DCP.h"
+#include "KM_util.h"
+#include "content_asset.h"
+#include "util.h"
+#include "metadata.h"
+
+using namespace std;
+using namespace boost;
+using namespace dcp;
+
+ContentAsset::ContentAsset (boost::filesystem::path directory, boost::filesystem::path file_name)
+ : _directory (directory)
+ , _file_name (file_name)
+ , _uuid (make_uuid ())
+ , _edit_rate (0)
+ , _entry_point (0)
+ , _intrinsic_duration (0)
+ , _duration (0)
+{
+ if (_file_name.empty ()) {
+ _file_name = _uuid + ".xml";
+ }
+}
+
+void
+ContentAsset::write_to_pkl (xmlpp::Node* node) const
+{
+ xmlpp::Node* asset = node->add_child ("Asset");
+ asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
+ asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
+ asset->add_child("Hash")->add_child_text (digest ());
+ asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+ asset->add_child("Type")->add_child_text ("application/mxf");
+}
+
+void
+ContentAsset::write_to_assetmap (xmlpp::Node* node) const
+{
+ xmlpp::Node* asset = node->add_child ("Asset");
+ asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
+ xmlpp::Node* chunk_list = asset->add_child ("ChunkList");
+ xmlpp::Node* chunk = chunk_list->add_child ("Chunk");
+ chunk->add_child("Path")->add_child_text (_file_name.string ());
+ chunk->add_child("VolumeIndex")->add_child_text ("1");
+ chunk->add_child("Offset")->add_child_text ("0");
+ chunk->add_child("Length")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+}
+
+filesystem::path
+ContentAsset::path () const
+{
+ filesystem::path p;
+ p /= _directory;
+ p /= _file_name;
+ return p;
+}
+
+string
+ContentAsset::digest () const
+{
+ if (_digest.empty ()) {
+ _digest = make_digest (path().string(), 0);
+ }
+
+ return _digest;
+}
+
+void
+ContentAsset::compute_digest (boost::function<void (float)> progress)
+{
+ if (!_digest.empty ()) {
+ return;
+ }
+
+ _digest = make_digest (path().string(), &progress);
+}
+
+bool
+ContentAsset::equals (shared_ptr<const ContentAsset> other, EqualityOptions, boost::function<void (NoteType, string)> note) const
+{
+ if (_edit_rate != other->_edit_rate) {
+ note (ERROR, "asset edit rates differ");
+ return false;
+ }
+
+ if (_intrinsic_duration != other->_intrinsic_duration) {
+ note (ERROR, "asset intrinsic durations differ");
+ }
+
+ if (_duration != other->_duration) {
+ note (ERROR, "asset durations differ");
+ }
+
+ return true;
+}
--- /dev/null
+/*
+ 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.
+
+*/
+
+#ifndef LIBDCP_ASSET_H
+#define LIBDCP_ASSET_H
+
+#include <string>
+#include <list>
+#include <boost/filesystem.hpp>
+#include <boost/function.hpp>
+#include <libxml++/libxml++.h>
+#include "types.h"
+
+namespace ASDCP {
+ class WriterInfo;
+}
+
+namespace xmlpp {
+ class Element;
+}
+
+namespace dcp
+{
+
+/** XXX */
+class ContentAsset
+{
+public:
+ /** Construct a ContentAsset.
+ * @param directory Directory where our XML or MXF file is.
+ * @param file_name Name of our file within directory, or empty to make one up based on UUID.
+ */
+ ContentAsset (boost::filesystem::path directory, boost::filesystem::path file_name = "");
+
+ virtual ~ContentAsset() {}
+
+ /** Write details of the asset to a CPL AssetList node.
+ * @param p Parent element.
+ */
+ virtual void write_to_cpl (xmlpp::Element* p) const = 0;
+
+ /** Write details of the asset to a PKL AssetList node.
+ * @param p Parent node.
+ */
+ void write_to_pkl (xmlpp::Node *) const;
+
+ /** Write details of the asset to a ASSETMAP stream.
+ * @param s Stream.
+ */
+ void write_to_assetmap (xmlpp::Node *) const;
+
+ /** Compute the digest for this asset. Calling this is optional: if
+ * it is not called, the digest will be computed when required. However,
+ * calling this method allows the caller to see the progress of the
+ * computation, which can be long for large assets.
+ * @param Called with progress between 0 and 1.
+ */
+ void compute_digest (boost::function<void (float)> progress);
+
+ std::string uuid () const {
+ return _uuid;
+ }
+
+ boost::filesystem::path path () const;
+
+ void set_directory (boost::filesystem::path d) {
+ _directory = d;
+ }
+
+ void set_file_name (boost::filesystem::path f) {
+ _file_name = f;
+ }
+
+ int entry_point () const {
+ return _entry_point;
+ }
+
+ int duration () const {
+ return _duration;
+ }
+
+ int intrinsic_duration () const {
+ return _intrinsic_duration;
+ }
+
+ int edit_rate () const {
+ return _edit_rate;
+ }
+
+ void set_entry_point (int e) {
+ _entry_point = e;
+ }
+
+ void set_duration (int d) {
+ _duration = d;
+ }
+
+ void set_intrinsic_duration (int d) {
+ _intrinsic_duration = d;
+ }
+
+ void set_edit_rate (int r) {
+ _edit_rate = r;
+ }
+
+ virtual bool equals (boost::shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)>) const;
+
+protected:
+
+ std::string digest () const;
+
+ /** Directory that our MXF or XML file is in */
+ boost::filesystem::path _directory;
+ /** Name of our MXF or XML file */
+ boost::filesystem::path _file_name;
+ /** Our UUID */
+ std::string _uuid;
+ /** The edit rate; this is normally equal to the number of video frames per second */
+ int _edit_rate;
+ /** Start point to present in frames */
+ int _entry_point;
+ /** Total length in frames */
+ int _intrinsic_duration;
+ /** Length to present in frames */
+ int _duration;
+
+private:
+ /** Digest of our MXF or XML file */
+ mutable std::string _digest;
+};
+
+}
+
+#endif
asset->add_child("Type")->add_child_text ("text/xml");
}
-list<shared_ptr<const Asset> >
+list<shared_ptr<const ContentAsset> >
CPL::assets () const
{
- list<shared_ptr<const Asset> > a;
+ list<shared_ptr<const ContentAsset> > a;
for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
if ((*i)->main_picture ()) {
a.push_back ((*i)->main_picture ());
class AssetMapAsset;
}
-class Asset;
+class ContentAsset;
class Reel;
class XMLMetadata;
class MXFMetadata;
return _fps;
}
- std::list<boost::shared_ptr<const Asset> > assets () const;
+ std::list<boost::shared_ptr<const ContentAsset> > assets () const;
bool encrypted () const;
#include <xmlsec/xmldsig.h>
#include <xmlsec/app.h>
#include "dcp.h"
-#include "asset.h"
#include "sound_asset.h"
#include "picture_asset.h"
#include "subtitle_asset.h"
pkl->add_child("Creator")->add_child_text (metadata.creator);
xmlpp::Element* asset_list = pkl->add_child("AssetList");
- list<shared_ptr<const Asset> > a = assets ();
- for (list<shared_ptr<const Asset> >::const_iterator i = a.begin(); i != a.end(); ++i) {
+ list<shared_ptr<const ContentAsset> > a = assets ();
+ for (list<shared_ptr<const ContentAsset> >::const_iterator i = a.begin(); i != a.end(); ++i) {
(*i)->write_to_pkl (asset_list);
}
(*i)->write_to_assetmap (asset_list);
}
- list<shared_ptr<const Asset> > a = assets ();
- for (list<shared_ptr<const Asset> >::const_iterator i = a.begin(); i != a.end(); ++i) {
+ list<shared_ptr<const ContentAsset> > a = assets ();
+ for (list<shared_ptr<const ContentAsset> >::const_iterator i = a.begin(); i != a.end(); ++i) {
(*i)->write_to_assetmap (asset_list);
}
class AssetComparator
{
public:
- bool operator() (shared_ptr<const Asset> a, shared_ptr<const Asset> b) {
+ bool operator() (shared_ptr<const ContentAsset> a, shared_ptr<const ContentAsset> b) {
return a->uuid() < b->uuid();
}
};
-list<shared_ptr<const Asset> >
+list<shared_ptr<const ContentAsset> >
DCP::assets () const
{
- list<shared_ptr<const Asset> > a;
+ list<shared_ptr<const ContentAsset> > a;
for (list<shared_ptr<CPL> >::const_iterator i = _cpls.begin(); i != _cpls.end(); ++i) {
- list<shared_ptr<const Asset> > t = (*i)->assets ();
+ list<shared_ptr<const ContentAsset> > t = (*i)->assets ();
a.merge (t);
}
namespace dcp
{
-class Asset;
+class ContentAsset;
class PictureAsset;
class SoundAsset;
class SubtitleAsset;
void write_assetmap (std::string pkl_uuid, int pkl_length, bool, XMLMetadata const &) const;
/** @return Assets in all the CPLs in this DCP */
- std::list<boost::shared_ptr<const Asset> > assets () const;
+ std::list<boost::shared_ptr<const ContentAsset> > assets () const;
struct Files {
std::list<std::string> cpls;
*/
apu.authorized_device_info.device_list.push_back ("2jmj7l5rSw0yVb/vlWAYkK/YBwk=");
- list<shared_ptr<const Asset> > assets = cpl->assets ();
- for (list<shared_ptr<const Asset> >::iterator i = assets.begin(); i != assets.end(); ++i) {
+ list<shared_ptr<const ContentAsset> > assets = cpl->assets ();
+ for (list<shared_ptr<const ContentAsset> >::iterator i = assets.begin(); i != assets.end(); ++i) {
/* XXX: non-MXF assets? */
shared_ptr<const MXFAsset> mxf = boost::dynamic_pointer_cast<const MXFAsset> (*i);
if (mxf) {
/* AuthenticatedPrivate */
- for (list<shared_ptr<const Asset> >::iterator i = assets.begin(); i != assets.end(); ++i) {
+ for (list<shared_ptr<const ContentAsset> >::iterator i = assets.begin(); i != assets.end(); ++i) {
/* XXX: non-MXF assets? */
shared_ptr<const MXFAsset> mxf = boost::dynamic_pointer_cast<const MXFAsset> (*i);
if (mxf) {
}
bool
-MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+MonoPictureAsset::equals (shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
{
if (!MXFAsset::equals (other, opt, note)) {
return false;
boost::shared_ptr<PictureAssetWriter> start_write (bool);
boost::shared_ptr<const MonoPictureFrame> get_frame (int n) const;
- bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
+ bool equals (boost::shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
private:
boost::filesystem::path path_from_list (int f, std::vector<boost::filesystem::path> const & files) const;
using namespace dcp;
MXFAsset::MXFAsset (boost::filesystem::path directory, boost::filesystem::path file_name)
- : Asset (directory, file_name)
+ : ContentAsset (directory, file_name)
, _progress (0)
, _encryption_context (0)
, _decryption_context (0)
}
bool
-MXFAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+MXFAsset::equals (shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
{
- if (!Asset::equals (other, opt, note)) {
+ if (!ContentAsset::equals (other, opt, note)) {
return false;
}
#define LIBDCP_MXF_ASSET_H
#include <boost/signals2.hpp>
-#include "asset.h"
+#include "content_asset.h"
#include "key.h"
#include "metadata.h"
class MXFMetadata;
/** @brief Parent class for assets which have MXF files */
-class MXFAsset : public Asset
+class MXFAsset : public ContentAsset
{
public:
/** Construct an MXFAsset.
~MXFAsset ();
- virtual bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
+ virtual bool equals (boost::shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
virtual void write_to_cpl (xmlpp::Element *) const;
virtual std::string key_type () const = 0;
}
bool
-SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+SoundAsset::equals (shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
{
if (!MXFAsset::equals (other, opt, note)) {
return false;
boost::shared_ptr<SoundAssetWriter> start_write ();
- bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
+ bool equals (boost::shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
boost::shared_ptr<const SoundFrame> get_frame (int n) const;
using namespace dcp;
bool
-StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+StereoPictureAsset::equals (shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
{
if (!MXFAsset::equals (other, opt, note)) {
return false;
boost::shared_ptr<PictureAssetWriter> start_write (bool);
boost::shared_ptr<const StereoPictureFrame> get_frame (int n) const;
- bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
+ bool equals (boost::shared_ptr<const ContentAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
private:
std::string cpl_node_name () const;
using namespace dcp;
SubtitleAsset::SubtitleAsset (string directory, string xml_file)
- : Asset (directory, xml_file)
+ : ContentAsset (directory, xml_file)
, _need_sort (false)
{
read_xml (path().string());
}
SubtitleAsset::SubtitleAsset (string directory, string movie_title, string language)
- : Asset (directory)
+ : ContentAsset (directory)
, _movie_title (movie_title)
, _reel_number ("1")
, _language (language)
#define LIBDCP_SUBTITLE_ASSET_H
#include <libcxml/cxml.h>
-#include "asset.h"
+#include "content_asset.h"
#include "dcp_time.h"
namespace dcp
bool operator== (Subtitle const & a, Subtitle const & b);
std::ostream& operator<< (std::ostream& s, Subtitle const & sub);
-class SubtitleAsset : public Asset
+class SubtitleAsset : public ContentAsset
{
public:
SubtitleAsset (std::string directory, std::string xml_file);
SubtitleAsset (std::string directory, std::string movie_title, std::string language);
void write_to_cpl (xmlpp::Element *) const;
- virtual bool equals (boost::shared_ptr<const Asset>, EqualityOptions, boost::function<void (NoteType, std::string)> note) const {
+ virtual bool equals (boost::shared_ptr<const ContentAsset>, EqualityOptions, boost::function<void (NoteType, std::string)> note) const {
/* XXX */
note (ERROR, "subtitle assets not compared yet");
return true;
obj.use = 'libkumu-libdcp libasdcp-libdcp'
obj.source = """
argb_frame.cc
- asset.cc
certificates.cc
colour_matrix.cc
+ content_asset.cc
cpl.cc
dcp.cc
dcp_time.cc