Missing std_to_wx().
[dcpomatic.git] / src / lib / dcp_video_frame.cc
index 5cd6a118e6256987646734b0a2d47b4187872ac3..09b909696f2fcbb89a028d295b66d843d37cff9e 100644 (file)
@@ -42,7 +42,6 @@
 #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>
@@ -63,6 +62,8 @@
 #include "cross.h"
 #include "player_video_frame.h"
 
+#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+
 #include "i18n.h"
 
 using std::string;
@@ -132,21 +133,6 @@ DCPVideoFrame::encode_locally ()
                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) {
@@ -250,13 +236,13 @@ DCPVideoFrame::encode_locally ()
 
        switch (_frame->eyes()) {
        case EYES_BOTH:
-               _log->log (String::compose (N_("Finished locally-encoded frame %1 for mono"), _index));
+               LOG_GENERAL (N_("Finished locally-encoded frame %1 for mono"), _index);
                break;
        case EYES_LEFT:
-               _log->log (String::compose (N_("Finished locally-encoded frame %1 for L"), _index));
+               LOG_GENERAL (N_("Finished locally-encoded frame %1 for L"), _index);
                break;
        case EYES_RIGHT:
-               _log->log (String::compose (N_("Finished locally-encoded frame %1 for R"), _index));
+               LOG_GENERAL (N_("Finished locally-encoded frame %1 for R"), _index);
                break;
        default:
                break;
@@ -293,7 +279,7 @@ DCPVideoFrame::encode_remotely (ServerDescription serv)
        root->add_child("Version")->add_child_text (raw_convert<string> (SERVER_LINK_VERSION));
        add_metadata (root);
 
-       _log->log (String::compose (N_("Sending frame %1 to remote"), _index));
+       LOG_GENERAL (N_("Sending frame %1 to remote"), _index);
        
        /* Send XML metadata */
        stringstream xml;
@@ -310,7 +296,7 @@ DCPVideoFrame::encode_remotely (ServerDescription serv)
        shared_ptr<EncodedData> e (new RemotelyEncodedData (socket->read_uint32 ()));
        socket->read (e->data(), e->size());
 
-       _log->log (String::compose (N_("Finished remotely-encoded frame %1"), _index));
+       LOG_GENERAL (N_("Finished remotely-encoded frame %1"), _index);
        
        return e;
 }