#include <stdexcept>
#include <cstdio>
#include <iomanip>
- #include <sstream>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include "i18n.h"
using std::string;
- using std::stringstream;
using std::cout;
using boost::shared_ptr;
using libdcp::Size;
}
shared_ptr<libdcp::XYZFrame> xyz = libdcp::rgb_to_xyz (
- _frame->image(),
+ _frame->image(AV_PIX_FMT_RGB48BE),
in_lut,
libdcp::GammaLUT::cache.get (16, 1 / _frame->colour_conversion().output_gamma),
matrix
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);
using std::min;
using std::cout;
using std::cerr;
- using std::stringstream;
using boost::shared_ptr;
using libdcp::Size;
case PIX_FMT_ABGR:
case PIX_FMT_BGRA:
case PIX_FMT_RGB555LE:
+ case PIX_FMT_RGB48LE:
+ case PIX_FMT_RGB48BE:
memset (data()[0], 0, lines(0) * stride()[0]);
break;
using boost::weak_ptr;
using libdcp::Size;
- FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
+ FilmViewer::FilmViewer (wxWindow* p)
: wxPanel (p)
, _panel (new wxPanel (this))
, _slider (new wxSlider (this, wxID_ANY, 0, 0, 4096))
_back_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmViewer::back_clicked, this));
_forward_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmViewer::forward_clicked, this));
- set_film (f);
-
+ set_film (shared_ptr<Film> ());
+
JobManager::instance()->ActiveJobsChanged.connect (
bind (&FilmViewer::active_jobs_changed, this, _1)
);
return;
}
- _frame = pvf->image ();
+ _frame = pvf->image (PIX_FMT_RGB24);
_got_frame = true;
set_position_text (t);