* @brief Parent class for DCP assets, i.e. picture/sound/subtitles and CPLs.
*
* Note that this class is not used for ReelAssets; they are just for the metadata
- * that gets put into <Reel>s.
+ * that gets put into <Reel>s.
*/
class Asset : public Object
{
*/
+/** @file src/certificates.cc
+ * @brief Certificate and CertificateChain classes.
+ */
+
#include "KM_util.h"
#include "certificates.h"
#include "compose.hpp"
}
/** @return Certificate's issuer, in the form
- * dnqualifier=<dnQualififer>,CN=<commonName>,OU=<organizationalUnitName>,O=organizationName
+ * dnqualifier=<dnQualififer>,CN=<commonName>,OU=<organizationalUnitName>,O=<organizationName>
* and with + signs escaped to \+
*/
string
using std::list;
using std::stringstream;
using std::ostream;
-using std::copy;
-using std::back_inserter;
using std::make_pair;
using std::map;
using boost::shared_ptr;
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
*/
/** @file src/dcp.h
- * @brief A class to create or read a DCP.
+ * @brief DCP class.
*/
#ifndef LIBDCP_DCP_H
/** Compare this DCP with another, according to various options.
* @param other DCP to compare this one to.
* @param options Options to define what "equality" means.
+ * @param note Functor to handle notes made by the equality operation.
* @return true if the DCPs are equal according to EqualityOptions, otherwise false.
*/
bool equals (DCP const & other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const;
/** the directory that we are writing to */
boost::filesystem::path _directory;
+ /** the assets that make up this DCP */
std::list<boost::shared_ptr<Asset> > _assets;
};
* @param recipient_cert Certificate of the projector that this KDM is targeted at.
* @param not_valid_before Start of validity period.
* @param not_valid_after End of validity period.
- * @param annotation_text Text for the <AnnotationText> node.
- * @param issue_date Text for the <IssueDate> node.
+ * @param annotation_text Text for the <AnnotationText> node.
+ * @param issue_date Text for the <IssueDate> node.
*/
KDM (
boost::shared_ptr<const CPL> cpl, boost::shared_ptr<const Signer> signer, boost::shared_ptr<const Certificate> recipient_cert,
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
*/
-#include <openjpeg.h>
-#include "AS_DCP.h"
-#include "KM_fileio.h"
+/** @file src/mono_picture_frame.cc
+ * @brief MonoPictureFrame class.
+ */
+
#include "mono_picture_frame.h"
#include "exceptions.h"
#include "argb_frame.h"
#include "util.h"
#include "gamma_lut.h"
#include "rgb_xyz.h"
+#include "KM_fileio.h"
+#include "AS_DCP.h"
+#include <openjpeg.h>
#define DCI_GAMMA 2.6
/** Make a picture frame from a 2D (monoscopic) asset.
* @param mxf_path Path to the asset's MXF file.
* @param n Frame within the asset, not taking EntryPoint into account.
+ * @param c Context for decryption, or 0.
*/
MonoPictureFrame::MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext* c)
{
}
}
+/** MonoPictureFrame destructor */
MonoPictureFrame::~MonoPictureFrame ()
{
delete _buffer;
}
+/** @return Pointer to JPEG2000 data */
uint8_t const *
MonoPictureFrame::j2k_data () const
{
return _buffer->RoData ();
}
+/** @return Size of JPEG2000 data in bytes */
int
MonoPictureFrame::j2k_size () const
{
/** @param reduce a factor by which to reduce the resolution
* of the image, expressed as a power of two (pass 0 for no
* reduction).
+ * @param srgb_gamma Reciprocal of output gamma to use after
+ * the conversion from XYZ to RGB.
*
* @return An ARGB representation of this frame. This is ARGB in the
* Cairo sense, so that each pixel takes up 4 bytes; the first byte
* is blue, second green, third red and fourth alpha (always 255).
- *
*/
shared_ptr<ARGBFrame>
MonoPictureFrame::argb_frame (int reduce, float srgb_gamma) const
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
*/
+/** @file src/mono_picture_frame.h
+ * @brief MonoPictureFrame class.
+ */
+
+#include "types.h"
+#include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/filesystem.hpp>
#include <string>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
-#include "types.h"
namespace ASDCP {
namespace JP2K {
class ARGBFrame;
-/** A single frame of a 2D (monoscopic) picture asset */
-class MonoPictureFrame
+/** @class MonoPictureFrame
+ * @brief A single frame of a 2D (monoscopic) picture asset.
+ */
+class MonoPictureFrame : public boost::noncopyable
{
public:
MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext *);
*/
+/** @file src/object.cc
+ * @brief Object class.
+ */
+
#include "object.h"
#include "util.h"
}
/** Create an Object with a given ID.
- * @param ID to use.
+ * @param id ID to use.
*/
Object::Object (string id)
: _id (id)
*/
+/** @file src/object.h
+ * @brief Object class.
+ */
+
#ifndef LIBDCP_OBJECT_H
#define LIBDCP_OBJECT_H
/** Add a <Signer> and <ds:Signature> nodes to an XML node.
* @param parent XML node to add to.
- * @param interop true to use Interop standards, false for SMPTE.
+ * @param standard INTEROP or SMPTE.
*/
void
Signer::sign (xmlpp::Element* parent, Standard standard) const
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
}
/** Convert a content kind to a string which can be used in a
- * <ContentKind> node.
+ * <ContentKind> node.
* @param kind ContentKind.
* @return string.
*/
assert (false);
}
-/** Convert a string from a <ContentKind> node to a libdcp ContentKind.
+/** Convert a string from a <ContentKind> node to a libdcp ContentKind.
* Reasonably tolerant about varying case.
* @param type Content kind string.
* @return libdcp ContentKind.
return true;
}
+/** Set up various bits that the library needs. Should be called one
+ * by client applications.
+ */
void
dcp::init ()
{
return !(a == b);
}
-/** The base64 decode routine in KM_util.cpp gives different values to both
- * this and the command-line base64 for some inputs. Not sure why.
+/** Decode a base64 string. The base64 decode routine in KM_util.cpp
+ * gives different values to both this and the command-line base64
+ * for some inputs. Not sure why.
+ *
+ * @param in base64-encoded string.
+ * @param out Output buffer.
+ * @param out_length Length of output buffer.
+ * @return Number of characters written to the output buffer.
*/
int
dcp::base64_decode (string const & in, unsigned char* out, int out_length)
return N;
}
+/** Convert a struct tm to a string of the form
+ * 2014-01-26T21:39:00+01:00
+ * @param tm struct tm.
+ * @return Time as a string.
+ */
string
dcp::tm_to_string (struct tm* tm)
{
return o.str ();
}
+/** Convert a boost::posix_time::ptime to a string of the form
+ * 2014-01-26T21:39:00+01:00.
+ * @param t boost::posix_time::ptime.
+ * @return Time as a string.
+ */
string
dcp::ptime_to_string (boost::posix_time::ptime t)
{
}
-/* Apparently there is no way to create an ofstream using a UTF-8
- filename under Windows. We are hence reduced to using fopen
- with this wrapper.
-*/
+/** @param p Path to open.
+ * @param t mode flags, as for fopen(3).
+ * @return FILE pointer or 0 on error.
+ *
+ * Apparently there is no way to create an ofstream using a UTF-8
+ * filename under Windows. We are hence reduced to using fopen
+ * with this wrapper.
+ */
FILE *
dcp::fopen_boost (boost::filesystem::path p, string t)
{
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
* @brief Utility methods.
*/
-#include <string>
-#include <stdint.h>
+#include "types.h"
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <openjpeg.h>
-#include "types.h"
+#include <string>
+#include <stdint.h>
namespace xmlpp {
class Element;
class GammaLUT;
class XYZFrame;
-struct Size {
+struct Size
+{
Size ()
: width (0)
, height (0)
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-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
#ifndef LIBDCP_XML_KDM_SMPTE_H
#define LIBDCP_XML_KDM_SMPTE_H
-#include <string>
-#include <list>
-#include <boost/optional.hpp>
-#include <boost/filesystem.hpp>
+#include "../exceptions.h"
+#include <libcxml/cxml.h>
#include <libxml/parser.h>
#include <libxml++/libxml++.h>
-#include <libcxml/cxml.h>
-#include "../exceptions.h"
+#include <boost/optional.hpp>
+#include <boost/filesystem.hpp>
+#include <string>
+#include <list>
namespace dcp {
namespace xml {