#include "util.h"
#include "exceptions.h"
#include "types.h"
-#include "argb_frame.h"
#include "certificates.h"
-#include "gamma_lut.h"
-#include "xyz_frame.h"
+#include "xyz_image.h"
+#include "dcp_assert.h"
#include "compose.hpp"
#include "KM_util.h"
#include "KM_fileio.h"
return "advertisement";
}
- assert (false);
+ DCP_ASSERT (false);
}
/** Convert a string from a <ContentKind> node to a libdcp ContentKind.
return ADVERTISEMENT;
}
- assert (false);
+ DCP_ASSERT (false);
}
/** Decompress a JPEG2000 image to a bitmap.
* This is useful for scaling 4K DCP images down to 2K.
* @return XYZ image.
*/
-shared_ptr<dcp::XYZFrame>
+shared_ptr<dcp::XYZImage>
dcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
{
opj_dinfo_t* decoder = opj_create_decompress (CODEC_J2K);
image->x1 = rint (float(image->x1) / pow (2, reduce));
image->y1 = rint (float(image->y1) / pow (2, reduce));
- return shared_ptr<XYZFrame> (new XYZFrame (image));
+ return shared_ptr<XYZImage> (new XYZImage (image));
}
/** @param s A string.
char digest_base64[64];
return Kumu::base64encode (digest, 20, digest_base64, 64);
}
+
+xmlpp::Node *
+dcp::find_child (xmlpp::Node const * node, string name)
+{
+ xmlpp::Node::NodeList c = node->get_children ();
+ xmlpp::Node::NodeList::iterator i = c.begin();
+ while (i != c.end() && (*i)->get_name() != name) {
+ ++i;
+ }
+
+ DCP_ASSERT (i != c.end ());
+ return *i;
+}