No-op; fix GPL address and use the explicit-program-name version.
[dcpomatic.git] / src / wx / film_viewer.cc
index 9564c0fc944595a31520c588e271ef385b77e286..e0244ce83370f0561177db30b8d21496a4e844cd 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
+    DCP-o-matic is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -153,6 +154,7 @@ FilmViewer::set_film (shared_ptr<Film> film)
 
        try {
                _player.reset (new Player (_film, _film->playlist ()));
+               _player->set_fast ();
        } catch (bad_alloc) {
                error_dialog (this, _("There is not enough free memory to do that."));
                _film.reset ();
@@ -220,19 +222,12 @@ FilmViewer::get (DCPTime p, bool accurate)
                                pv = all_pv.front ();
                        }
 
-                       /* XXX: this could now give us a 48-bit image, which is a bit wasteful,
-                          or a XYZ image, which the code below will currently rely on FFmpeg
-                          to colourspace-convert.
-                       */
-                       _frame = pv->image (boost::bind (&Log::dcp_log, _film->log().get(), _1, _2));
-                       ImageChanged (pv);
+                       _frame = pv->image (
+                               bind (&Log::dcp_log, _film->log().get(), _1, _2), bind (&PlayerVideo::always_rgb, _1), false, true
+                               );
 
-                       dcp::YUVToRGB yuv_to_rgb = dcp::YUV_TO_RGB_REC601;
-                       if (pv->colour_conversion()) {
-                               yuv_to_rgb = pv->colour_conversion().get().yuv_to_rgb();
-                       }
+                       ImageChanged (pv);
 
-                       _frame = _frame->scale (_frame->size(), yuv_to_rgb, AV_PIX_FMT_RGB24, false);
                        _position = pv->time ();
                        _inter_position = pv->inter_position ();
                        _inter_size = pv->inter_size ();