#include <stdexcept>
#include <cstdio>
#include <iomanip>
-#include <sstream>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <boost/array.hpp>
#include <boost/asio.hpp>
#include <boost/filesystem.hpp>
-#include <openssl/md5.h>
#include <libdcp/rec709_linearised_gamma_lut.h>
#include <libdcp/srgb_linearised_gamma_lut.h>
#include <libdcp/gamma_lut.h>
#include "i18n.h"
using std::string;
-using std::stringstream;
using std::cout;
using boost::shared_ptr;
using libdcp::Size;
matrix
);
- {
- MD5_CTX md5_context;
- MD5_Init (&md5_context);
- MD5_Update (&md5_context, xyz->data(0), 1998 * 1080 * 4);
- MD5_Update (&md5_context, xyz->data(1), 1998 * 1080 * 4);
- MD5_Update (&md5_context, xyz->data(2), 1998 * 1080 * 4);
- unsigned char digest[MD5_DIGEST_LENGTH];
- MD5_Final (digest, &md5_context);
-
- stringstream s;
- for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) {
- s << std::hex << std::setfill('0') << std::setw(2) << ((int) digest[i]);
- }
- }
-
/* Set the max image and component sizes based on frame_rate */
int max_cs_len = ((float) _j2k_bandwidth) / 8 / _frames_per_second;
if (_frame->eyes() == EYES_LEFT || _frame->eyes() == EYES_RIGHT) {
LOG_GENERAL (N_("Sending frame %1 to remote"), _index);
/* Send XML metadata */
- stringstream xml;
- doc.write_to_stream (xml, "UTF-8");
- socket->write (xml.str().length() + 1);
- socket->write ((uint8_t *) xml.str().c_str(), xml.str().length() + 1);
+ string xml = doc.write_to_string ("UTF-8");
+ socket->write (xml.length() + 1);
+ socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
/* Send binary data */
_frame->send_binary (socket);