--- /dev/null
+/*
+ Copyright (C) 2014 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 "asset.h"
+
+using std::string;
+using namespace dcp;
+
+Asset::Asset ()
+{
+
+}
+
+Asset::Asset (string id)
+ : Object (id)
+{
+
+}
--- /dev/null
+/*
+ Copyright (C) 2014 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 "object.h"
+
+namespace dcp {
+
+/** @class Asset
+ * @brief Parent class for DCP assets, i.e. picture/sound/subtitles, CPLs and PKLs.
+ */
+
+class Asset : public Object
+{
+public:
+ Asset ();
+ Asset (std::string id);
+
+};
+
+}
, _length (length)
, _fps (frames_per_second)
{
- _id = make_uuid ();
+
}
/** Construct a CPL object from a XML file.
#include "types.h"
#include "certificates.h"
#include "key.h"
+#include "asset.h"
namespace dcp {
class Signer;
class KDM;
-/** @brief A CPL within a DCP */
-class CPL
+/** @class CPL
+ * @brief A Composition Playlist.
+ */
+class CPL : public Asset
{
public:
CPL (boost::filesystem::path directory, std::string name, ContentKind content_kind, int length, int frames_per_second);
void set_mxf_keys (Key);
- std::string id () const {
- return _id;
- }
-
bool equals (CPL const & other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const;
void write_xml (bool, XMLMetadata const &, boost::shared_ptr<const Signer>) const;
/** reels */
std::list<boost::shared_ptr<Reel> > _reels;
- /** our UUID */
- std::string _id;
/** a SHA1 digest of our XML */
mutable std::string _digest;
};
--- /dev/null
+/*
+ Copyright (C) 2014 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 "object.h"
+#include "util.h"
+
+using std::string;
+using namespace dcp;
+
+Object::Object ()
+ : _id (make_uuid ())
+{
+
+}
+
+Object::Object (string id)
+ : _id (id)
+{
+
+}
--- /dev/null
+/*
+ Copyright (C) 2014 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 <string>
+
+namespace dcp {
+
+/** Some part of a DCP that has a UUID */
+class Object
+{
+public:
+ Object ();
+ Object (std::string id);
+
+ std::string id () const {
+ return _id;
+ }
+
+protected:
+ std::string _id;
+};
+
+}
obj.use = 'libkumu-libdcp libasdcp-libdcp'
obj.source = """
argb_frame.cc
+ asset.cc
certificates.cc
colour_matrix.cc
content_asset.cc
mono_picture_asset_writer.cc
mono_picture_frame.cc
mxf_asset.cc
+ object.cc
picture_asset.cc
picture_asset_writer.cc
rec709_linearised_gamma_lut.cc
mono_picture_asset.h
mono_picture_frame.h
mxf_asset.h
+ object.h
picture_asset.h
picture_asset_writer.h
rgb_xyz.h