Merge branch 'master' into 12bit
authorCarl Hetherington <cth@carlh.net>
Thu, 16 Oct 2014 15:30:11 +0000 (16:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 16 Oct 2014 15:30:11 +0000 (16:30 +0100)
1  2 
src/lib/dcp_video_frame.cc
src/lib/image.cc
src/wx/film_viewer.cc

index c8f8c3cc5a019e607172bcb0aaccb2475d914cf2,bb7eaa064194e238ec66656b75e8caa7abc65088..057ed0faed64973be6d6c20b22408cdb50247ae7
@@@ -34,7 -34,6 +34,6 @@@
  #include <stdexcept>
  #include <cstdio>
  #include <iomanip>
- #include <sstream>
  #include <iostream>
  #include <fstream>
  #include <unistd.h>
@@@ -67,7 -66,6 +66,6 @@@
  #include "i18n.h"
  
  using std::string;
- using std::stringstream;
  using std::cout;
  using boost::shared_ptr;
  using libdcp::Size;
@@@ -127,7 -125,7 +125,7 @@@ DCPVideoFrame::encode_locally (
        }
  
        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
@@@ -282,10 -280,9 +280,9 @@@ DCPVideoFrame::encode_remotely (ServerD
        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);
diff --combined src/lib/image.cc
index 1c6c02979ca122d0034baf192db6b501ba99878a,066f12c07ea891178260f9cba58a6096b982ebe4..3b8c1a28ef48aa1d9b96638b708fb8a19a8f944b
@@@ -38,7 -38,6 +38,6 @@@ using std::string
  using std::min;
  using std::cout;
  using std::cerr;
- using std::stringstream;
  using boost::shared_ptr;
  using libdcp::Size;
  
@@@ -320,8 -319,6 +319,8 @@@ Image::make_black (
        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;
  
diff --combined src/wx/film_viewer.cc
index 112736b679867252e08b7c1b9db8ccd404b43e67,595fd4720e413cb417761251f60f82dcbff4e8a9..54cd3e77dc30014816f35b90457d0014ea045f16
@@@ -53,7 -53,7 +53,7 @@@ using boost::dynamic_pointer_cast
  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)
                );
@@@ -295,7 -295,7 +295,7 @@@ FilmViewer::process_video (shared_ptr<P
                return;
        }
        
 -      _frame = pvf->image ();
 +      _frame = pvf->image (PIX_FMT_RGB24);
        _got_frame = true;
  
        set_position_text (t);