Merge master.
authorCarl Hetherington <cth@carlh.net>
Sun, 7 Apr 2013 18:25:33 +0000 (19:25 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 7 Apr 2013 18:25:33 +0000 (19:25 +0100)
14 files changed:
1  2 
src/lib/format.cc
src/lib/format.h
src/lib/po/es_ES.po
src/lib/po/fr_FR.po
src/lib/po/it_IT.po
src/lib/po/sv_SE.po
src/lib/util.cc
src/tools/dvdomatic.cc
src/wx/audio_dialog.cc
src/wx/film_editor.cc
src/wx/film_editor.h
src/wx/film_viewer.cc
src/wx/film_viewer.h
wscript

diff --combined src/lib/format.cc
index 538bf7953a216daae781488b962c2ee9f9f9d580,21f8fb9a2ecb9fb262741d899114d336768f47a2..addab2b600f35c0984536147c27d640488431856
@@@ -29,7 -29,6 +29,7 @@@
  #include <iostream>
  #include "format.h"
  #include "film.h"
 +#include "playlist.h"
  
  #include "i18n.h"
  
@@@ -73,68 -72,55 +73,55 @@@ Format::setup_formats (
  {
        /// TRANSLATORS: these are film picture aspect ratios; "Academy" means 1.37, "Flat" 1.85 and "Scope" 2.39.
        _formats.push_back (
-               new FixedFormat (119, libdcp::Size (1285, 1080), N_("119"), _("1.19"), N_("F"),
-                                _("Source scaled to 1.19:1")
+               new FixedFormat (119, libdcp::Size (1285, 1080), N_("119"), _("1.19"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (133, libdcp::Size (1436, 1080), N_("133"), _("1.33"), N_("F"),
-                                _("Source scaled to 1.33:1")
+               new FixedFormat (133, libdcp::Size (1436, 1080), N_("133"), _("1.33"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (138, libdcp::Size (1485, 1080), N_("138"), _("1.375"), N_("F"),
-                                _("Source scaled to 1.375:1")
+               new FixedFormat (138, libdcp::Size (1485, 1080), N_("138"), _("1.375"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (133, libdcp::Size (1998, 1080), N_("133-in-flat"), _("4:3 within Flat"), N_("F"),
-                                _("Source scaled to 1.33:1 then pillarboxed to Flat")
+               new FixedFormat (133, libdcp::Size (1998, 1080), N_("133-in-flat"), _("4:3 within Flat"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (137, libdcp::Size (1480, 1080), N_("137"), _("Academy"), N_("F"),
-                                _("Source scaled to 1.37:1 (Academy ratio)")
+               new FixedFormat (137, libdcp::Size (1480, 1080), N_("137"), _("Academy"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (166, libdcp::Size (1793, 1080), N_("166"), _("1.66"), N_("F"),
-                                _("Source scaled to 1.66:1")
+               new FixedFormat (166, libdcp::Size (1793, 1080), N_("166"), _("1.66"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (166, libdcp::Size (1998, 1080), N_("166-in-flat"), _("1.66 within Flat"), N_("F"),
-                                _("Source scaled to 1.66:1 then pillarboxed to Flat")
+               new FixedFormat (166, libdcp::Size (1998, 1080), N_("166-in-flat"), _("1.66 within Flat"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (178, libdcp::Size (1998, 1080), N_("178-in-flat"), _("16:9 within Flat"), N_("F"),
-                                _("Source scaled to 1.78:1 then pillarboxed to Flat")
+               new FixedFormat (178, libdcp::Size (1998, 1080), N_("178-in-flat"), _("16:9 within Flat"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (178, libdcp::Size (1920, 1080), N_("178"), _("16:9"), N_("F"),
-                                _("Source scaled to 1.78:1")
+               new FixedFormat (178, libdcp::Size (1920, 1080), N_("178"), _("16:9"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (185, libdcp::Size (1998, 1080), N_("185"), _("Flat"), N_("F"),
-                                _("Source scaled to Flat (1.85:1)")
+               new FixedFormat (185, libdcp::Size (1998, 1080), N_("185"), _("Flat"), N_("F")
                        ));
        
        _formats.push_back (
-               new FixedFormat (239, libdcp::Size (2048, 858), N_("239"), _("Scope"), N_("S"),
-                                _("Source scaled to Scope (2.39:1)")
+               new FixedFormat (239, libdcp::Size (2048, 858), N_("239"), _("Scope"), N_("S")
                        ));
                
        _formats.push_back (
-               new VariableFormat (libdcp::Size (1998, 1080), N_("var-185"), _("Flat without stretch"), N_("F"),
-                                   _("Source scaled to fit Flat preserving its aspect ratio")
+               new VariableFormat (libdcp::Size (1998, 1080), N_("var-185"), _("Flat without stretch"), N_("F")
                        ));
        
        _formats.push_back (
-               new VariableFormat (libdcp::Size (2048, 858), N_("var-239"), _("Scope without stretch"), N_("S"),
-                                   _("Source scaled to fit Scope preserving its aspect ratio")
+               new VariableFormat (libdcp::Size (2048, 858), N_("var-239"), _("Scope without stretch"), N_("S")
                        ));
  }
  
@@@ -196,8 -182,8 +183,8 @@@ Format::all (
   *  @param id ID (e.g. 185)
   *  @param n Nick name (e.g. Flat)
   */
- FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d, string e)
-       : Format (dcp, id, n, d, e)
+ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d)
+       : Format (dcp, id, n, d)
        , _ratio (r)
  {
  
  int
  Format::dcp_padding (shared_ptr<const Film> f) const
  {
 -      int p = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_integer(f) / 100.0)) / 2.0);
 +      int pad = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_integer(f) / 100.0)) / 2.0);
  
        /* This comes out -ve for Scope; bodge it */
 -      if (p < 0) {
 -              p = 0;
 +      if (pad < 0) {
 +              pad = 0;
        }
        
 -      return p;
 +      return pad;
  }
  
  float
@@@ -225,8 -211,8 +212,8 @@@ Format::container_ratio_as_float () con
        return static_cast<float> (_dcp_size.width) / _dcp_size.height;
  }
  
- VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d, string e)
-       : Format (dcp, id, n, d, e)
+ VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d)
+       : Format (dcp, id, n, d)
  {
  
  }
@@@ -240,7 -226,7 +227,7 @@@ VariableFormat::ratio_as_integer (share
  float
  VariableFormat::ratio_as_float (shared_ptr<const Film> f) const
  {
 -      return float (f->size().width) / f->size().height;
 +      return float (f->video_size().width) / f->video_size().height;
  }
  
  /** @return A name to be presented to the user */
diff --combined src/lib/format.h
index cc7502893149a800a9ea432bec5ff277c6e54016,783ff25ce455b31dd207fa4f37026d8fee132a1d..7958ca5341604e199a181b2295e0708b3614d542
@@@ -31,12 -31,11 +31,11 @@@ class Film
  class Format
  {
  public:
-       Format (libdcp::Size dcp, std::string id, std::string n, std::string d, std::string e)
+       Format (libdcp::Size dcp, std::string id, std::string n, std::string d)
                : _dcp_size (dcp)
                , _id (id)
                , _nickname (n)
                , _dci_name (d)
-               , _description (e)
        {}
  
        /** @return the aspect ratio multiplied by 100
@@@ -50,7 -49,7 +49,7 @@@
        /** @return the ratio of the container (including any padding) as a floating point number */
        float container_ratio_as_float () const;
  
 -      int dcp_padding (boost::shared_ptr<const Film> f) const;
 +      int dcp_padding (boost::shared_ptr<const Film>) const;
  
        /** @return size in pixels of the images that we should
         *  put in a DCP for this ratio.  This size will not correspond
                return _dci_name;
        }
  
-       std::string description () const {
-               return _description;
-       }
        std::string as_metadata () const;
  
        static Format const * from_nickname (std::string n);
@@@ -99,7 -94,6 +94,6 @@@ protected
        /** nickname (e.g. Flat, Scope) */
        std::string _nickname;
        std::string _dci_name;
-       std::string _description;
  
  private:      
        /** all available formats */
  class FixedFormat : public Format
  {
  public:
-       FixedFormat (int, libdcp::Size, std::string, std::string, std::string, std::string);
+       FixedFormat (int, libdcp::Size, std::string, std::string, std::string);
  
        int ratio_as_integer (boost::shared_ptr<const Film>) const {
                return _ratio;
@@@ -134,7 -128,7 +128,7 @@@ private
  class VariableFormat : public Format
  {
  public:
-       VariableFormat (libdcp::Size, std::string, std::string, std::string, std::string);
+       VariableFormat (libdcp::Size, std::string, std::string, std::string);
  
        int ratio_as_integer (boost::shared_ptr<const Film> f) const;
        float ratio_as_float (boost::shared_ptr<const Film> f) const;
diff --combined src/lib/po/es_ES.po
index 153a90085c181f6f410af7097ff8fa57c3a0ee93,73c30434846845d5aa25f6a7f77bb07b5858cfc6..8f6a065635315776133a5060efa8c8e4a09f12e4
@@@ -7,15 -7,15 +7,15 @@@ msgid "
  msgstr ""
  "Project-Id-Version: LIBDVDOMATIC\n"
  "Report-Msgid-Bugs-To: \n"
- "POT-Creation-Date: 2013-03-15 08:39+0000\n"
+ "POT-Creation-Date: 2013-04-07 18:17+0100\n"
  "PO-Revision-Date: 2013-04-02 19:10-0500\n"
  "Last-Translator: Manuel AC <manuel.acevedo@civantos.>\n"
  "Language-Team: Manuel AC <manuel.acevedo@civantos.com>\n"
+ "Language: es-ES\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "X-Generator: Poedit 1.5.5\n"
- "Language: es-ES\n"
  
  #: src/lib/transcode_job.cc:87
  msgid "0%"
@@@ -25,27 -25,27 +25,27 @@@ msgstr "0%
  msgid "1.19"
  msgstr "1.19"
  
- #: src/lib/format.cc:80
+ #: src/lib/format.cc:79
  msgid "1.33"
  msgstr "1.33"
  
- #: src/lib/format.cc:85
+ #: src/lib/format.cc:83
  msgid "1.375"
  msgstr "1.375"
  
- #: src/lib/format.cc:100
+ #: src/lib/format.cc:95
  msgid "1.66"
  msgstr "1.66"
  
- #: src/lib/format.cc:105
+ #: src/lib/format.cc:99
  msgid "1.66 within Flat"
  msgstr "1.66 en Flat"
  
- #: src/lib/format.cc:115
+ #: src/lib/format.cc:107
  msgid "16:9"
  msgstr "16:9"
  
- #: src/lib/format.cc:110
+ #: src/lib/format.cc:103
  msgid "16:9 within Flat"
  msgstr "16:9 en Flat"
  
@@@ -53,7 -53,7 +53,7 @@@
  msgid "3D denoiser"
  msgstr "reducción de ruido 3D"
  
- #: src/lib/format.cc:90
+ #: src/lib/format.cc:87
  msgid "4:3 within Flat"
  msgstr "4:3 en Flat"
  
@@@ -61,7 -61,7 +61,7 @@@
  msgid "A/B transcode %1"
  msgstr "Codificación A/B %1"
  
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
  msgid "Academy"
  msgstr "Academy"
  
@@@ -69,7 -69,7 +69,7 @@@
  msgid "Advertisement"
  msgstr "Publicidad"
  
- #: src/lib/job.cc:71
+ #: src/lib/job.cc:72
  msgid "An error occurred whilst handling the file %1."
  msgstr "Ha ocurrido un error con el fichero %1."
  
@@@ -89,11 -89,23 +89,23 @@@ msgstr "Bicúbico
  msgid "Bilinear"
  msgstr "Bilineal"
  
+ #: src/lib/job.cc:302
+ msgid "Cancelled"
+ msgstr ""
+ #: src/lib/exceptions.cc:60
+ msgid "Cannot handle pixel format %1 during %2"
+ msgstr ""
  #: src/lib/encoder.cc:101
  msgid "Cannot resample audio as libswresample is not present"
  msgstr ""
  "No se puede redimensionar el sonido porque no se encuentra libswresample"
  
+ #: src/lib/util.cc:932
+ msgid "Centre"
+ msgstr ""
  #: src/lib/scp_dcp_job.cc:109
  msgid "Copy DCP to TMS"
  msgstr "Copiar DCP al TMS"
@@@ -122,15 -134,16 +134,16 @@@ msgstr "No se pudo escribir el fichero 
  msgid "Cubic interpolating deinterlacer"
  msgstr "Desentrelazado por interpolación cúbica"
  
- #: src/lib/util.cc:965
+ #: src/lib/util.cc:1007
  msgid "DCP and source have the same rate.\n"
  msgstr "La fuente y el DCP tienen la misma velocidad.\n"
  
- #: src/lib/util.cc:975
- msgid "DCP will run at %1%% of the source speed."
- msgstr "El DCP se reproducirá al %1%% de la velocidad de la fuente."
+ #: src/lib/util.cc:1017
+ #, fuzzy
+ msgid "DCP will run at %1%% of the source speed.\n"
 -msgstr "El DCP se reproducirá al %1%% de la velocidad de la fuente."
++msgstr "El DCP se reproducirá al %1%% de la velocidad de la fuente.\n"
  
- #: src/lib/util.cc:968
+ #: src/lib/util.cc:1010
  msgid "DCP will use every other frame of the source.\n"
  msgstr "El DCP usará fotogramas alternos de la fuente.\n"
  
@@@ -153,11 -166,11 +166,11 @@@ msgstr "Deringing filter
  msgid "Dolby CP750"
  msgstr "Dolby CP750"
  
- #: src/lib/util.cc:970
+ #: src/lib/util.cc:1012
  msgid "Each source frame will be doubled in the DCP.\n"
  msgstr "Se doblará cada fotograma de la fuente en el DCP.\n"
  
- #: src/lib/job.cc:287
+ #: src/lib/job.cc:300
  msgid "Error (%1)"
  msgstr "Error (%1)"
  
@@@ -197,11 -210,11 +210,11 @@@ msgstr "Bilineal rápido
  msgid "Feature"
  msgstr "Película"
  
- #: src/lib/format.cc:120
+ #: src/lib/format.cc:111
  msgid "Flat"
  msgstr "Flat"
  
- #: src/lib/format.cc:130
+ #: src/lib/format.cc:119
  msgid "Flat without stretch"
  msgstr "Flat sin deformación"
  
@@@ -229,7 -242,7 +242,7 @@@ msgstr "Horizontal deblocking filter
  msgid "Horizontal deblocking filter A"
  msgstr "Horizontal deblocking filter A"
  
- #: src/lib/job.cc:87 src/lib/job.cc:96
+ #: src/lib/job.cc:92 src/lib/job.cc:101
  msgid ""
  "It is not known what caused this error.  The best idea is to report the "
  "problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)"
@@@ -245,6 -258,18 +258,18 @@@ msgstr "Kernel deinterlacer
  msgid "Lanczos"
  msgstr "Lanczos"
  
+ #: src/lib/util.cc:930
+ msgid "Left"
+ msgstr ""
+ #: src/lib/util.cc:934
+ msgid "Left surround"
+ msgstr ""
+ #: src/lib/util.cc:933
+ msgid "Lfe (sub)"
+ msgstr ""
  #: src/lib/filter.cc:75
  msgid "Linear blend deinterlacer"
  msgstr "Linear blend deinterlacer"
@@@ -271,7 -296,7 +296,7 @@@ msgstr "Motion compensating deinterlace
  msgid "Noise reduction"
  msgstr "Reducción de ruido"
  
- #: src/lib/job.cc:285
+ #: src/lib/job.cc:298
  msgid "OK (ran for %1)"
  msgstr "OK (ejecución %1)"
  
@@@ -291,19 -316,27 +316,27 @@@ msgstr "Anuncio de servicio público
  msgid "Rating"
  msgstr "Clasificación"
  
- #: src/lib/util.cc:458
+ #: src/lib/util.cc:500
  msgid "Rec 709"
  msgstr "Rec 709"
  
+ #: src/lib/util.cc:931
+ msgid "Right"
+ msgstr ""
+ #: src/lib/util.cc:935
+ msgid "Right surround"
+ msgstr ""
  #: src/lib/scp_dcp_job.cc:133
  msgid "SSH error (%1)"
  msgstr "error SSH (%1)"
  
- #: src/lib/format.cc:125
+ #: src/lib/format.cc:115
  msgid "Scope"
  msgstr "Scope"
  
- #: src/lib/format.cc:135
+ #: src/lib/format.cc:123
  msgid "Scope without stretch"
  msgstr "Scope sin deformación"
  
@@@ -315,58 -348,6 +348,6 @@@ msgstr "Cortometraje
  msgid "Sinc"
  msgstr "Sinc"
  
- #: src/lib/format.cc:76
- msgid "Source scaled to 1.19:1"
- msgstr "Fuente escalada a 1.19:1"
- #: src/lib/format.cc:81
- msgid "Source scaled to 1.33:1"
- msgstr "Fuente escalada a 1.33:1"
- #: src/lib/format.cc:91
- msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
- msgstr "Fuente escalada a 1.33:1 con bandas hasta Flat"
- #: src/lib/format.cc:86
- msgid "Source scaled to 1.375:1"
- msgstr "Fuente escalada a 1.375:1"
- #: src/lib/format.cc:96
- msgid "Source scaled to 1.37:1 (Academy ratio)"
- msgstr "Fuente escalada a 1.37:1 (Academy)"
- #: src/lib/format.cc:101
- msgid "Source scaled to 1.66:1"
- msgstr "Fuente escalada a 1.66:1"
- #: src/lib/format.cc:106
- msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
- msgstr "Fuente escalada a 1.66:1 con bandas hasta Flat"
- #: src/lib/format.cc:116
- msgid "Source scaled to 1.78:1"
- msgstr "Fuente escalada a 1.78:1"
- #: src/lib/format.cc:111
- msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
- msgstr "Fuente escalada a 1.78:1 con bandas hasta Flat"
- #: src/lib/format.cc:121
- msgid "Source scaled to Flat (1.85:1)"
- msgstr "Fuente escalada a Flat (1.85:1)"
- #: src/lib/format.cc:126
- msgid "Source scaled to Scope (2.39:1)"
- msgstr "Fuente escalada a Scope (2.39:1)"
- #: src/lib/format.cc:131
- msgid "Source scaled to fit Flat preserving its aspect ratio"
- msgstr "Fuente escalada a Flat conservando el ratio de aspecto"
- #: src/lib/format.cc:136
- msgid "Source scaled to fit Scope preserving its aspect ratio"
- msgstr "Fuente escalada a Scope conservando el ratio de aspecto"
  #: src/lib/scaler.cc:68
  msgid "Spline"
  msgstr "Spline"
@@@ -387,7 -368,7 +368,7 @@@ msgstr "Temporal noise reducer
  msgid "Test"
  msgstr "Test"
  
- #: src/lib/job.cc:76
+ #: src/lib/job.cc:77
  msgid ""
  "The drive that the film is stored on is low in disc space.  Free some more "
  "space and try again."
@@@ -407,7 -388,7 +388,7 @@@ msgstr "Codificar %1
  msgid "Transitional"
  msgstr "Transitional"
  
- #: src/lib/job.cc:95
+ #: src/lib/job.cc:100
  msgid "Unknown error"
  msgstr "Error desconocido"
  
@@@ -439,15 -420,11 +420,11 @@@ msgstr "X
  msgid "Yet Another Deinterlacing Filter"
  msgstr "Yet Another Deinterlacing Filter"
  
- #: src/lib/encoder.cc:271
- msgid "adding to queue of %1"
- msgstr "añadiendo a la cola de %1"
  #: src/lib/film.cc:263
  msgid "cannot contain slashes"
  msgstr "no puede contener barras"
  
- #: src/lib/util.cc:499
+ #: src/lib/util.cc:541
  msgid "connect timed out"
  msgstr "tiempo de conexión agotado"
  
@@@ -467,6 -444,11 +444,11 @@@ msgstr "tipo de contenido
  msgid "copying %1"
  msgstr "copiando %1"
  
+ #: src/lib/exceptions.cc:36
+ #, fuzzy
+ msgid "could not create file %1"
+ msgstr "No se pudo escribir el fichero remoto (%1)"
  #: src/lib/ffmpeg_decoder.cc:191
  msgid "could not find audio decoder"
  msgstr "no se encontró el decodificador de audio"
@@@ -483,14 -465,24 +465,24 @@@ msgstr "no se pudo encontrar decodifica
  msgid "could not find video decoder"
  msgstr "no se pudo encontrar decodificador de vídeo"
  
- #: src/lib/external_audio_decoder.cc:72
+ #: src/lib/sndfile_decoder.cc:72
  msgid "could not open external audio file for reading"
  msgstr "no se pudo leer el fichero externo  de audio"
  
+ #: src/lib/exceptions.cc:29
+ #, fuzzy
+ msgid "could not open file %1"
+ msgstr "no se pudo abrir el fichero para lectura"
  #: src/lib/dcp_video_frame.cc:388
  msgid "could not open file for reading"
  msgstr "no se pudo abrir el fichero para lectura"
  
+ #: src/lib/exceptions.cc:44
+ #, fuzzy
+ msgid "could not read from file %1 (%2)"
+ msgstr "No se pudo crear la carpeta remota %1 (%2)"
  #: src/lib/encoder.cc:137 src/lib/encoder.cc:314
  msgid "could not run sample-rate converter"
  msgstr "no se pudo ejecutar el conversor de velocidad"
@@@ -503,19 -495,16 +495,16 @@@ msgstr "no se pudo abrir la sesión SC
  msgid "could not start SSH session"
  msgstr "no se pudo abrir la sesión SSH"
  
- #: src/lib/encoder.cc:247
- msgid "decoder sleeps with queue of %1"
- msgstr ""
- #: src/lib/encoder.cc:249
- msgid "decoder wakes with queue of %1"
- msgstr ""
+ #: src/lib/exceptions.cc:50
+ #, fuzzy
+ msgid "could not write to file %1 (%2)"
+ msgstr "No se pudo escribir el fichero remoto (%1)"
  
- #: src/lib/external_audio_decoder.cc:94
+ #: src/lib/sndfile_decoder.cc:94
  msgid "external audio files have differing lengths"
  msgstr "los ficheros externos de sonido tienen duraciones diferentes"
  
- #: src/lib/external_audio_decoder.cc:76
+ #: src/lib/sndfile_decoder.cc:76
  msgid "external audio files must be mono"
  msgstr "los ficheros externos de sonido deben ser mono"
  
@@@ -543,10 -532,14 +532,14 @@@ msgstr "minuto
  msgid "minutes"
  msgstr "minutos"
  
- #: src/lib/util.cc:642
+ #: src/lib/util.cc:684
  msgid "missing key %1 in key-value set"
  msgstr "falta la clave %1 en el par clave-valor"
  
+ #: src/lib/exceptions.cc:54
+ msgid "missing required setting %1"
+ msgstr ""
  #: src/lib/subtitle.cc:52
  msgid "multi-part subtitles not yet supported"
  msgstr "todavía no se soportan subtítulos en múltiples partes"
@@@ -565,11 -558,11 +558,11 @@@ msgstr "todavía no se soportan subtít
  
  #. / TRANSLATORS: remaining here follows an amount of time that is remaining
  #. / on an operation.
- #: src/lib/job.cc:282
+ #: src/lib/job.cc:295
  msgid "remaining"
  msgstr "pendiente"
  
- #: src/lib/util.cc:456
+ #: src/lib/util.cc:498
  msgid "sRGB"
  msgstr "sRGB"
  
@@@ -584,3 -577,45 +577,45 @@@ msgstr "imagen fija
  #: src/lib/film.cc:274
  msgid "video"
  msgstr "vídeo"
+ #~ msgid "Source scaled to 1.19:1"
+ #~ msgstr "Fuente escalada a 1.19:1"
+ #~ msgid "Source scaled to 1.33:1"
+ #~ msgstr "Fuente escalada a 1.33:1"
+ #~ msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
+ #~ msgstr "Fuente escalada a 1.33:1 con bandas hasta Flat"
+ #~ msgid "Source scaled to 1.375:1"
+ #~ msgstr "Fuente escalada a 1.375:1"
+ #~ msgid "Source scaled to 1.37:1 (Academy ratio)"
+ #~ msgstr "Fuente escalada a 1.37:1 (Academy)"
+ #~ msgid "Source scaled to 1.66:1"
+ #~ msgstr "Fuente escalada a 1.66:1"
+ #~ msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
+ #~ msgstr "Fuente escalada a 1.66:1 con bandas hasta Flat"
+ #~ msgid "Source scaled to 1.78:1"
+ #~ msgstr "Fuente escalada a 1.78:1"
+ #~ msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
+ #~ msgstr "Fuente escalada a 1.78:1 con bandas hasta Flat"
+ #~ msgid "Source scaled to Flat (1.85:1)"
+ #~ msgstr "Fuente escalada a Flat (1.85:1)"
+ #~ msgid "Source scaled to Scope (2.39:1)"
+ #~ msgstr "Fuente escalada a Scope (2.39:1)"
+ #~ msgid "Source scaled to fit Flat preserving its aspect ratio"
+ #~ msgstr "Fuente escalada a Flat conservando el ratio de aspecto"
+ #~ msgid "Source scaled to fit Scope preserving its aspect ratio"
+ #~ msgstr "Fuente escalada a Scope conservando el ratio de aspecto"
+ #~ msgid "adding to queue of %1"
+ #~ msgstr "añadiendo a la cola de %1"
diff --combined src/lib/po/fr_FR.po
index 7bd003c08145892df657451c69032205f2f7d2c1,138d073c220c4ecd0e62a6bcbb302bf9f28e1af8..ccdad3fe2b0603b6571c5ed19bd504078435f1df
@@@ -7,7 -7,7 +7,7 @@@ msgid "
  msgstr ""
  "Project-Id-Version: DVD-o-matic FRENCH\n"
  "Report-Msgid-Bugs-To: \n"
- "POT-Creation-Date: 2013-04-01 21:21+0100\n"
+ "POT-Creation-Date: 2013-04-07 18:17+0100\n"
  "PO-Revision-Date: 2013-03-20 00:39+0100\n"
  "Last-Translator: FreeDCP.net <freedcp.net@gmail.com>\n"
  "Language-Team: \n"
@@@ -24,27 -24,27 +24,27 @@@ msgstr "0%
  msgid "1.19"
  msgstr "1.19"
  
- #: src/lib/format.cc:80
+ #: src/lib/format.cc:79
  msgid "1.33"
  msgstr "1.33"
  
- #: src/lib/format.cc:85
+ #: src/lib/format.cc:83
  msgid "1.375"
  msgstr "1.375"
  
- #: src/lib/format.cc:100
+ #: src/lib/format.cc:95
  msgid "1.66"
  msgstr "1.66"
  
- #: src/lib/format.cc:105
+ #: src/lib/format.cc:99
  msgid "1.66 within Flat"
  msgstr "1.66 dans Flat"
  
- #: src/lib/format.cc:115
+ #: src/lib/format.cc:107
  msgid "16:9"
  msgstr "16:9"
  
- #: src/lib/format.cc:110
+ #: src/lib/format.cc:103
  msgid "16:9 within Flat"
  msgstr "16:9 dans Flat"
  
@@@ -52,7 -52,7 +52,7 @@@
  msgid "3D denoiser"
  msgstr "Débruitage 3D"
  
- #: src/lib/format.cc:90
+ #: src/lib/format.cc:87
  msgid "4:3 within Flat"
  msgstr "4:3 dans Flat"
  
@@@ -60,7 -60,7 +60,7 @@@
  msgid "A/B transcode %1"
  msgstr "Transcodage A/B %1"
  
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
  msgid "Academy"
  msgstr "Academy"
  
@@@ -100,7 -100,7 +100,7 @@@ msgstr "
  msgid "Cannot resample audio as libswresample is not present"
  msgstr "Ré-échantillonnage du son impossible : libswresample est absent"
  
- #: src/lib/util.cc:931
+ #: src/lib/util.cc:932
  msgid "Centre"
  msgstr ""
  
@@@ -132,15 -132,16 +132,16 @@@ msgstr "Écriture vers fichier distant 
  msgid "Cubic interpolating deinterlacer"
  msgstr "Désentrelacement cubique interpolé"
  
- #: src/lib/util.cc:1006
+ #: src/lib/util.cc:1007
  msgid "DCP and source have the same rate.\n"
  msgstr "Le DCP et la source ont les mêmes cadences.\n"
  
- #: src/lib/util.cc:1016
- msgid "DCP will run at %1%% of the source speed."
- msgstr "La cadence du DCP sera %1%% par rapport Ã  la source"
+ #: src/lib/util.cc:1017
+ #, fuzzy
+ msgid "DCP will run at %1%% of the source speed.\n"
 -msgstr "La cadence du DCP sera %1%% par rapport Ã  la source"
++msgstr "La cadence du DCP sera %1%% par rapport Ã  la source\n"
  
- #: src/lib/util.cc:1009
+ #: src/lib/util.cc:1010
  msgid "DCP will use every other frame of the source.\n"
  msgstr "Le DCP utilisera une image sur deux de la source.\n"
  
@@@ -163,7 -164,7 +164,7 @@@ msgstr "Filtre anti bourdonnement
  msgid "Dolby CP750"
  msgstr "Dolby CP750"
  
- #: src/lib/util.cc:1011
+ #: src/lib/util.cc:1012
  msgid "Each source frame will be doubled in the DCP.\n"
  msgstr "Chaque image source sera dupliquée dans le DCP.\n"
  
@@@ -207,11 -208,11 +208,11 @@@ msgstr "Bilinéaire rapide
  msgid "Feature"
  msgstr "Feature"
  
- #: src/lib/format.cc:120
+ #: src/lib/format.cc:111
  msgid "Flat"
  msgstr "Flat"
  
- #: src/lib/format.cc:130
+ #: src/lib/format.cc:119
  msgid "Flat without stretch"
  msgstr "Flat sans déformation"
  
@@@ -255,15 -256,15 +256,15 @@@ msgstr "Désentrelaceur noyau
  msgid "Lanczos"
  msgstr "Lanczos"
  
- #: src/lib/util.cc:929
+ #: src/lib/util.cc:930
  msgid "Left"
  msgstr "Gauche"
  
- #: src/lib/util.cc:933
+ #: src/lib/util.cc:934
  msgid "Left surround"
  msgstr "Arrière gauche"
  
- #: src/lib/util.cc:932
+ #: src/lib/util.cc:933
  msgid "Lfe (sub)"
  msgstr "Basses fréquences"
  
@@@ -313,15 -314,15 +314,15 @@@ msgstr "Public Service Announcement
  msgid "Rating"
  msgstr "Classification"
  
- #: src/lib/util.cc:499
+ #: src/lib/util.cc:500
  msgid "Rec 709"
  msgstr "Rec 709"
  
- #: src/lib/util.cc:930
+ #: src/lib/util.cc:931
  msgid "Right"
  msgstr "Droite"
  
- #: src/lib/util.cc:934
+ #: src/lib/util.cc:935
  msgid "Right surround"
  msgstr "Arrière droite"
  
  msgid "SSH error (%1)"
  msgstr "Erreur SSH (%1)"
  
- #: src/lib/format.cc:125
+ #: src/lib/format.cc:115
  msgid "Scope"
  msgstr "Scope"
  
- #: src/lib/format.cc:135
+ #: src/lib/format.cc:123
  msgid "Scope without stretch"
  msgstr "Scope sans déformation"
  
@@@ -345,58 -346,6 +346,6 @@@ msgstr "Short
  msgid "Sinc"
  msgstr "Sinc"
  
- #: src/lib/format.cc:76
- msgid "Source scaled to 1.19:1"
- msgstr "Source mise Ã  l'échelle en 1.19:1"
- #: src/lib/format.cc:81
- msgid "Source scaled to 1.33:1"
- msgstr "Source mise Ã  l'échelle en 1.33:1"
- #: src/lib/format.cc:91
- msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
- msgstr "Source mise Ã  l'échelle en 1.33:1 puis contenue dans Flat"
- #: src/lib/format.cc:86
- msgid "Source scaled to 1.375:1"
- msgstr "Source mise Ã  l'échelle en 1.375:1"
- #: src/lib/format.cc:96
- msgid "Source scaled to 1.37:1 (Academy ratio)"
- msgstr "Source mise Ã  l'échelle en 1.37:1 (ratio \"academy\")"
- #: src/lib/format.cc:101
- msgid "Source scaled to 1.66:1"
- msgstr "Source mise Ã  l'échelle en 1.66:1"
- #: src/lib/format.cc:106
- msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
- msgstr "Source mise Ã  l'échelle en 1.66:1 puis contenue dans Flat"
- #: src/lib/format.cc:116
- msgid "Source scaled to 1.78:1"
- msgstr "Source mise Ã  l'échelle en 1.78:1"
- #: src/lib/format.cc:111
- msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
- msgstr "Source mise Ã  l'échelle en 1.78:1 puis contenue dans Flat"
- #: src/lib/format.cc:121
- msgid "Source scaled to Flat (1.85:1)"
- msgstr "Source mise Ã  l'échelle en Flat (1.85:1)"
- #: src/lib/format.cc:126
- msgid "Source scaled to Scope (2.39:1)"
- msgstr "Source mise Ã  l'échelle en Scope (2.39:1)"
- #: src/lib/format.cc:131
- msgid "Source scaled to fit Flat preserving its aspect ratio"
- msgstr "Source réduite en Flat afin de préserver ses dimensions"
- #: src/lib/format.cc:136
- msgid "Source scaled to fit Scope preserving its aspect ratio"
- msgstr "Source réduite en Scope afin de préserver ses dimensions"
  #: src/lib/scaler.cc:68
  msgid "Spline"
  msgstr "Spline"
@@@ -473,7 -422,7 +422,7 @@@ msgstr "Un autre filtre de désentrelac
  msgid "cannot contain slashes"
  msgstr "slash interdit"
  
- #: src/lib/util.cc:540
+ #: src/lib/util.cc:541
  msgid "connect timed out"
  msgstr "temps de connexion expiré"
  
@@@ -577,7 -526,7 +526,7 @@@ msgstr "minute
  msgid "minutes"
  msgstr "minutes"
  
- #: src/lib/util.cc:683
+ #: src/lib/util.cc:684
  msgid "missing key %1 in key-value set"
  msgstr "clé %1 non sélectionnée"
  
@@@ -607,7 -556,7 +556,7 @@@ msgstr "sous-titres non-bitmap non supp
  msgid "remaining"
  msgstr "restant"
  
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
  msgid "sRGB"
  msgstr "sRGB"
  
@@@ -623,6 -572,45 +572,45 @@@ msgstr "fixe
  msgid "video"
  msgstr "vidéo"
  
+ #~ msgid "Source scaled to 1.19:1"
+ #~ msgstr "Source mise Ã  l'échelle en 1.19:1"
+ #~ msgid "Source scaled to 1.33:1"
+ #~ msgstr "Source mise Ã  l'échelle en 1.33:1"
+ #~ msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
+ #~ msgstr "Source mise Ã  l'échelle en 1.33:1 puis contenue dans Flat"
+ #~ msgid "Source scaled to 1.375:1"
+ #~ msgstr "Source mise Ã  l'échelle en 1.375:1"
+ #~ msgid "Source scaled to 1.37:1 (Academy ratio)"
+ #~ msgstr "Source mise Ã  l'échelle en 1.37:1 (ratio \"academy\")"
+ #~ msgid "Source scaled to 1.66:1"
+ #~ msgstr "Source mise Ã  l'échelle en 1.66:1"
+ #~ msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
+ #~ msgstr "Source mise Ã  l'échelle en 1.66:1 puis contenue dans Flat"
+ #~ msgid "Source scaled to 1.78:1"
+ #~ msgstr "Source mise Ã  l'échelle en 1.78:1"
+ #~ msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
+ #~ msgstr "Source mise Ã  l'échelle en 1.78:1 puis contenue dans Flat"
+ #~ msgid "Source scaled to Flat (1.85:1)"
+ #~ msgstr "Source mise Ã  l'échelle en Flat (1.85:1)"
+ #~ msgid "Source scaled to Scope (2.39:1)"
+ #~ msgstr "Source mise Ã  l'échelle en Scope (2.39:1)"
+ #~ msgid "Source scaled to fit Flat preserving its aspect ratio"
+ #~ msgstr "Source réduite en Flat afin de préserver ses dimensions"
+ #~ msgid "Source scaled to fit Scope preserving its aspect ratio"
+ #~ msgstr "Source réduite en Scope afin de préserver ses dimensions"
  #~ msgid "adding to queue of %1"
  #~ msgstr "Mise en file d'attente de %1"
  
diff --combined src/lib/po/it_IT.po
index b4278d93c48cc03f8cb1a2fff65b65441738f8da,c184a393204ddd269d890de02d0f47eb4e065ec9..8e9b7166bb190cee457ae7cf252be0222c8b6955
@@@ -7,7 -7,7 +7,7 @@@ msgid "
  msgstr ""
  "Project-Id-Version: IT VERSION\n"
  "Report-Msgid-Bugs-To: \n"
- "POT-Creation-Date: 2013-04-01 21:21+0100\n"
+ "POT-Creation-Date: 2013-04-07 18:17+0100\n"
  "PO-Revision-Date: 2013-03-20 11:45+0100\n"
  "Last-Translator: Maci <macibro@gmail.com>\n"
  "Language-Team: \n"
@@@ -25,27 -25,27 +25,27 @@@ msgstr "0%
  msgid "1.19"
  msgstr "1.19"
  
- #: src/lib/format.cc:80
+ #: src/lib/format.cc:79
  msgid "1.33"
  msgstr "1.33"
  
- #: src/lib/format.cc:85
+ #: src/lib/format.cc:83
  msgid "1.375"
  msgstr "1.375"
  
- #: src/lib/format.cc:100
+ #: src/lib/format.cc:95
  msgid "1.66"
  msgstr "1.66"
  
- #: src/lib/format.cc:105
+ #: src/lib/format.cc:99
  msgid "1.66 within Flat"
  msgstr "1.66 all'interno di Flat"
  
- #: src/lib/format.cc:115
+ #: src/lib/format.cc:107
  msgid "16:9"
  msgstr "16:9"
  
- #: src/lib/format.cc:110
+ #: src/lib/format.cc:103
  msgid "16:9 within Flat"
  msgstr "16:9 all'interno di Flat"
  
@@@ -53,7 -53,7 +53,7 @@@
  msgid "3D denoiser"
  msgstr "Riduttore di rumore 3D"
  
- #: src/lib/format.cc:90
+ #: src/lib/format.cc:87
  msgid "4:3 within Flat"
  msgstr "4:3 all'interno di  Flat"
  
@@@ -61,7 -61,7 +61,7 @@@
  msgid "A/B transcode %1"
  msgstr "Transcodifica A/B %1"
  
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
  msgid "Academy"
  msgstr "Academy"
  
@@@ -101,7 -101,7 +101,7 @@@ msgstr "
  msgid "Cannot resample audio as libswresample is not present"
  msgstr "Non posso ricampionare l'audio perchè libswresample non Ã¨ presente"
  
- #: src/lib/util.cc:931
+ #: src/lib/util.cc:932
  msgid "Centre"
  msgstr ""
  
@@@ -133,15 -133,16 +133,16 @@@ msgstr "Non posso scrivere il file remo
  msgid "Cubic interpolating deinterlacer"
  msgstr "Deinterlacciatore cubico interpolato"
  
- #: src/lib/util.cc:1006
+ #: src/lib/util.cc:1007
  msgid "DCP and source have the same rate.\n"
  msgstr "Il DCP e il sorgente hanno la stessa frequenza.\n"
  
- #: src/lib/util.cc:1016
- msgid "DCP will run at %1%% of the source speed."
- msgstr "Il DCP andrà al %1%% della velocità del sorgente."
+ #: src/lib/util.cc:1017
+ #, fuzzy
+ msgid "DCP will run at %1%% of the source speed.\n"
 -msgstr "Il DCP andrà al %1%% della velocità del sorgente."
++msgstr "Il DCP andrà al %1%% della velocità del sorgente.\n"
  
- #: src/lib/util.cc:1009
+ #: src/lib/util.cc:1010
  msgid "DCP will use every other frame of the source.\n"
  msgstr "Il DCP userà ogni altro fotogramma del sorgente.\n"
  
@@@ -164,7 -165,7 +165,7 @@@ msgstr "Filtro deringing
  msgid "Dolby CP750"
  msgstr "Dolby CP750"
  
- #: src/lib/util.cc:1011
+ #: src/lib/util.cc:1012
  msgid "Each source frame will be doubled in the DCP.\n"
  msgstr "Ogni fotogramma del sorgente sarà raddoppiato nel DCP.\n"
  
@@@ -208,11 -209,11 +209,11 @@@ msgstr "Bilineare rapida
  msgid "Feature"
  msgstr "Caratteristica"
  
- #: src/lib/format.cc:120
+ #: src/lib/format.cc:111
  msgid "Flat"
  msgstr "Flat"
  
- #: src/lib/format.cc:130
+ #: src/lib/format.cc:119
  msgid "Flat without stretch"
  msgstr "Flat senza stiramento"
  
@@@ -256,15 -257,15 +257,15 @@@ msgstr "Deinterlacciatore Kernel
  msgid "Lanczos"
  msgstr "Lanczos"
  
- #: src/lib/util.cc:929
+ #: src/lib/util.cc:930
  msgid "Left"
  msgstr ""
  
- #: src/lib/util.cc:933
+ #: src/lib/util.cc:934
  msgid "Left surround"
  msgstr ""
  
- #: src/lib/util.cc:932
+ #: src/lib/util.cc:933
  msgid "Lfe (sub)"
  msgstr ""
  
@@@ -314,15 -315,15 +315,15 @@@ msgstr "Annuncio di pubblico servizio
  msgid "Rating"
  msgstr "Punteggio"
  
- #: src/lib/util.cc:499
+ #: src/lib/util.cc:500
  msgid "Rec 709"
  msgstr "Rec 709"
  
- #: src/lib/util.cc:930
+ #: src/lib/util.cc:931
  msgid "Right"
  msgstr ""
  
- #: src/lib/util.cc:934
+ #: src/lib/util.cc:935
  msgid "Right surround"
  msgstr ""
  
  msgid "SSH error (%1)"
  msgstr "Errore SSH (%1)"
  
- #: src/lib/format.cc:125
+ #: src/lib/format.cc:115
  msgid "Scope"
  msgstr "Scope"
  
- #: src/lib/format.cc:135
+ #: src/lib/format.cc:123
  msgid "Scope without stretch"
  msgstr "Scope senza stiramento"
  
@@@ -346,58 -347,6 +347,6 @@@ msgstr "Corto
  msgid "Sinc"
  msgstr "Sinc"
  
- #: src/lib/format.cc:76
- msgid "Source scaled to 1.19:1"
- msgstr "Sorgente scalato a 1.19:1"
- #: src/lib/format.cc:81
- msgid "Source scaled to 1.33:1"
- msgstr "Sorgente scalato a 1.33:1"
- #: src/lib/format.cc:91
- msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
- msgstr "Sorgente scalato a 1.33:1 e poi inviato come Flat"
- #: src/lib/format.cc:86
- msgid "Source scaled to 1.375:1"
- msgstr "Sorgente scalato a 1.375:1"
- #: src/lib/format.cc:96
- msgid "Source scaled to 1.37:1 (Academy ratio)"
- msgstr "Sorgente scalato a 1.37:1 (Academy ratio)"
- #: src/lib/format.cc:101
- msgid "Source scaled to 1.66:1"
- msgstr "Sorgente scalato a 1.66:1"
- #: src/lib/format.cc:106
- msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
- msgstr "Sorgente scalato a 1.66:1 e poi inviato come Flat"
- #: src/lib/format.cc:116
- msgid "Source scaled to 1.78:1"
- msgstr "Sorgente scalato a 1.78:1"
- #: src/lib/format.cc:111
- msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
- msgstr "Sorgente scalato a 1.78:1 e poi inviato come Flat"
- #: src/lib/format.cc:121
- msgid "Source scaled to Flat (1.85:1)"
- msgstr "Sorgente scalato a Flat (1.85:1)"
- #: src/lib/format.cc:126
- msgid "Source scaled to Scope (2.39:1)"
- msgstr "Sorgente scalato a Scope (2.39:1)"
- #: src/lib/format.cc:131
- msgid "Source scaled to fit Flat preserving its aspect ratio"
- msgstr "Sorgente scalato per adattarsi a Flat mantentendo le sue proporzioni"
- #: src/lib/format.cc:136
- msgid "Source scaled to fit Scope preserving its aspect ratio"
- msgstr "Sorgente scalato per adattarsi a Scope mantentendo le sue proporzioni"
  #: src/lib/scaler.cc:68
  msgid "Spline"
  msgstr "Spline"
@@@ -474,7 -423,7 +423,7 @@@ msgstr "Ancora un altro filtro di deint
  msgid "cannot contain slashes"
  msgstr "non può contenere barre"
  
- #: src/lib/util.cc:540
+ #: src/lib/util.cc:541
  msgid "connect timed out"
  msgstr "connessione scaduta"
  
@@@ -582,7 -531,7 +531,7 @@@ msgstr "minuto
  msgid "minutes"
  msgstr "minuti"
  
- #: src/lib/util.cc:683
+ #: src/lib/util.cc:684
  msgid "missing key %1 in key-value set"
  msgstr "persa la chiave %1 tra i valori chiave"
  
@@@ -612,7 -561,7 +561,7 @@@ msgstr "sottotitoli non-bitmap non anco
  msgid "remaining"
  msgstr "restano"
  
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
  msgid "sRGB"
  msgstr "sRGB"
  
@@@ -628,6 -577,47 +577,47 @@@ msgstr "ancora
  msgid "video"
  msgstr "video"
  
+ #~ msgid "Source scaled to 1.19:1"
+ #~ msgstr "Sorgente scalato a 1.19:1"
+ #~ msgid "Source scaled to 1.33:1"
+ #~ msgstr "Sorgente scalato a 1.33:1"
+ #~ msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
+ #~ msgstr "Sorgente scalato a 1.33:1 e poi inviato come Flat"
+ #~ msgid "Source scaled to 1.375:1"
+ #~ msgstr "Sorgente scalato a 1.375:1"
+ #~ msgid "Source scaled to 1.37:1 (Academy ratio)"
+ #~ msgstr "Sorgente scalato a 1.37:1 (Academy ratio)"
+ #~ msgid "Source scaled to 1.66:1"
+ #~ msgstr "Sorgente scalato a 1.66:1"
+ #~ msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
+ #~ msgstr "Sorgente scalato a 1.66:1 e poi inviato come Flat"
+ #~ msgid "Source scaled to 1.78:1"
+ #~ msgstr "Sorgente scalato a 1.78:1"
+ #~ msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
+ #~ msgstr "Sorgente scalato a 1.78:1 e poi inviato come Flat"
+ #~ msgid "Source scaled to Flat (1.85:1)"
+ #~ msgstr "Sorgente scalato a Flat (1.85:1)"
+ #~ msgid "Source scaled to Scope (2.39:1)"
+ #~ msgstr "Sorgente scalato a Scope (2.39:1)"
+ #~ msgid "Source scaled to fit Flat preserving its aspect ratio"
+ #~ msgstr ""
+ #~ "Sorgente scalato per adattarsi a Flat mantentendo le sue proporzioni"
+ #~ msgid "Source scaled to fit Scope preserving its aspect ratio"
+ #~ msgstr ""
+ #~ "Sorgente scalato per adattarsi a Scope mantentendo le sue proporzioni"
  #~ msgid "adding to queue of %1"
  #~ msgstr "aggiungo alla coda %1"
  
diff --combined src/lib/po/sv_SE.po
index 9af19206f13280750cffe8c902650e4cb683da14,9f74e1e2a930a03f245a707e24f0eaad8420feb9..a155771a78c36eac85e51409a6941c59f111539a
@@@ -7,10 -7,11 +7,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: DVD-o-matic\n"
  "Report-Msgid-Bugs-To: \n"
- "POT-Creation-Date: 2013-04-01 21:21+0100\n"
+ "POT-Creation-Date: 2013-04-07 18:17+0100\n"
  "PO-Revision-Date: 2013-04-04 10:22+0100\n"
  "Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n"
  "Language-Team: \n"
+ "Language: \n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
@@@ -24,27 -25,27 +25,27 @@@ msgstr "0%
  msgid "1.19"
  msgstr "1,19"
  
- #: src/lib/format.cc:80
+ #: src/lib/format.cc:79
  msgid "1.33"
  msgstr "1,33"
  
- #: src/lib/format.cc:85
+ #: src/lib/format.cc:83
  msgid "1.375"
  msgstr "1,375"
  
- #: src/lib/format.cc:100
+ #: src/lib/format.cc:95
  msgid "1.66"
  msgstr "1,66"
  
- #: src/lib/format.cc:105
+ #: src/lib/format.cc:99
  msgid "1.66 within Flat"
  msgstr "1,66 innanför Flat"
  
- #: src/lib/format.cc:115
+ #: src/lib/format.cc:107
  msgid "16:9"
  msgstr "16:9"
  
- #: src/lib/format.cc:110
+ #: src/lib/format.cc:103
  msgid "16:9 within Flat"
  msgstr "16:9 innanför Flat"
  
@@@ -52,7 -53,7 +53,7 @@@
  msgid "3D denoiser"
  msgstr "3D brusreducering"
  
- #: src/lib/format.cc:90
+ #: src/lib/format.cc:87
  msgid "4:3 within Flat"
  msgstr "4:3 innanför Flat"
  
@@@ -60,7 -61,7 +61,7 @@@
  msgid "A/B transcode %1"
  msgstr "A/B konvertera %1"
  
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
  msgid "Academy"
  msgstr "Academy"
  
@@@ -101,7 -102,7 +102,7 @@@ msgid "Cannot resample audio as libswre
  msgstr ""
  "Kan inte omsampla ljudet eftersom libswresample inte finns tillgängligt"
  
- #: src/lib/util.cc:931
+ #: src/lib/util.cc:932
  msgid "Centre"
  msgstr "Mitt"
  
@@@ -133,15 -134,16 +134,16 @@@ msgstr "Kunde inte skriva till fjärrfi
  msgid "Cubic interpolating deinterlacer"
  msgstr "Kubiskt interpolerande avflätare"
  
- #: src/lib/util.cc:1006
+ #: src/lib/util.cc:1007
  msgid "DCP and source have the same rate.\n"
  msgstr "DCP och källa har samma bildfrekvens.\n"
  
- #: src/lib/util.cc:1016
- msgid "DCP will run at %1%% of the source speed."
- msgstr "DCP kommer att köras pÃ¥ %1%% av källans hastighet."
+ #: src/lib/util.cc:1017
+ #, fuzzy
+ msgid "DCP will run at %1%% of the source speed.\n"
 -msgstr "DCP kommer att köras pÃ¥ %1%% av källans hastighet."
++msgstr "DCP kommer att köras pÃ¥ %1%% av källans hastighet.\n"
  
- #: src/lib/util.cc:1009
+ #: src/lib/util.cc:1010
  msgid "DCP will use every other frame of the source.\n"
  msgstr "DCP kommer att använda varannan bild frÃ¥n källan.\n"
  
@@@ -164,7 -166,7 +166,7 @@@ msgstr "Avringningsfilter
  msgid "Dolby CP750"
  msgstr "Dolby CP750"
  
- #: src/lib/util.cc:1011
+ #: src/lib/util.cc:1012
  msgid "Each source frame will be doubled in the DCP.\n"
  msgstr "Varje bild frÃ¥n källan kommer att användas tvÃ¥ gÃ¥nger i DCPn.\n"
  
@@@ -208,11 -210,11 +210,11 @@@ msgstr "Snabb bilinjär
  msgid "Feature"
  msgstr "LÃ¥ngfilm"
  
- #: src/lib/format.cc:120
+ #: src/lib/format.cc:111
  msgid "Flat"
  msgstr "Flat"
  
- #: src/lib/format.cc:130
+ #: src/lib/format.cc:119
  msgid "Flat without stretch"
  msgstr "Flat utan utsträckning"
  
@@@ -256,15 -258,15 +258,15 @@@ msgstr "Kernel-avflätare
  msgid "Lanczos"
  msgstr "Lanczos"
  
- #: src/lib/util.cc:929
+ #: src/lib/util.cc:930
  msgid "Left"
  msgstr "Vänster"
  
- #: src/lib/util.cc:933
+ #: src/lib/util.cc:934
  msgid "Left surround"
  msgstr "Vänster surround"
  
- #: src/lib/util.cc:932
+ #: src/lib/util.cc:933
  msgid "Lfe (sub)"
  msgstr "Lfe (sub)"
  
@@@ -314,15 -316,15 +316,15 @@@ msgstr "Offentligt Servicemeddelande
  msgid "Rating"
  msgstr "Klassificeringsklipp"
  
- #: src/lib/util.cc:499
+ #: src/lib/util.cc:500
  msgid "Rec 709"
  msgstr "Rec 709"
  
- #: src/lib/util.cc:930
+ #: src/lib/util.cc:931
  msgid "Right"
  msgstr "Höger"
  
- #: src/lib/util.cc:934
+ #: src/lib/util.cc:935
  msgid "Right surround"
  msgstr "Höger surround"
  
  msgid "SSH error (%1)"
  msgstr "SSH fel (%1)"
  
- #: src/lib/format.cc:125
+ #: src/lib/format.cc:115
  msgid "Scope"
  msgstr "Scope"
  
- #: src/lib/format.cc:135
+ #: src/lib/format.cc:123
  msgid "Scope without stretch"
  msgstr "Scope utan utsträckning"
  
@@@ -346,59 -348,6 +348,6 @@@ msgstr "Kortfilm
  msgid "Sinc"
  msgstr "Sinc"
  
- #: src/lib/format.cc:76
- msgid "Source scaled to 1.19:1"
- msgstr "Källan skalad till 1,19:1"
- #: src/lib/format.cc:81
- msgid "Source scaled to 1.33:1"
- msgstr "Källan skalad till 1,33:1"
- #: src/lib/format.cc:91
- msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
- msgstr "Källan skalad till 1,33:1, med sorgkanter innanför Flat"
- #: src/lib/format.cc:86
- msgid "Source scaled to 1.375:1"
- msgstr "Källan skalad till 1,375:1"
- #: src/lib/format.cc:96
- msgid "Source scaled to 1.37:1 (Academy ratio)"
- msgstr "Källan skalad till 1,37:1 (Academy-förhÃ¥llande)"
- #: src/lib/format.cc:101
- msgid "Source scaled to 1.66:1"
- msgstr "Källan skalad till 1,66:1"
- #: src/lib/format.cc:106
- msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
- msgstr "Källan skalad till 1,66:1, med sorgkanter innanför Flat"
- #: src/lib/format.cc:116
- msgid "Source scaled to 1.78:1"
- msgstr "Källan skalad till 1,78:1"
- #: src/lib/format.cc:111
- msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
- msgstr "Källan skalad till 1,78:1, med sorgkanter innanför Flat"
- #: src/lib/format.cc:121
- msgid "Source scaled to Flat (1.85:1)"
- msgstr "Källan skalad till Flat (1,85:1)"
- #: src/lib/format.cc:126
- msgid "Source scaled to Scope (2.39:1)"
- msgstr "Källan skalad till Scope (2,39:1)"
- #: src/lib/format.cc:131
- msgid "Source scaled to fit Flat preserving its aspect ratio"
- msgstr "Källan skalad för att rymmas inom Flat utan att Ã¤ndra bildförhÃ¥llandet"
- #: src/lib/format.cc:136
- msgid "Source scaled to fit Scope preserving its aspect ratio"
- msgstr ""
- "Källan skalad för att rymmas inom Scope utan att Ã¤ndra bildförhÃ¥llandet"
  #: src/lib/scaler.cc:68
  msgid "Spline"
  msgstr "Spline"
@@@ -479,7 -428,7 +428,7 @@@ msgid "cannot contain slashes
  msgstr "fÃ¥r inte innehÃ¥lla snedstreck"
  
  # Svengelska
- #: src/lib/util.cc:540
+ #: src/lib/util.cc:541
  #, fuzzy
  msgid "connect timed out"
  msgstr "uppkopplingen tajmade ur"
@@@ -584,7 -533,7 +533,7 @@@ msgstr "minut
  msgid "minutes"
  msgstr "minuter"
  
- #: src/lib/util.cc:683
+ #: src/lib/util.cc:684
  msgid "missing key %1 in key-value set"
  msgstr "saknad nyckel %1 i nyckel-värde grupp"
  
@@@ -614,7 -563,7 +563,7 @@@ msgstr "icke-rastergrafiska undertexte
  msgid "remaining"
  msgstr "Ã¥terstÃ¥ende tid"
  
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
  msgid "sRGB"
  msgstr "sRGB"
  
@@@ -629,3 -578,44 +578,44 @@@ msgstr "stillbild
  #: src/lib/film.cc:274
  msgid "video"
  msgstr "video"
+ #~ msgid "Source scaled to 1.19:1"
+ #~ msgstr "Källan skalad till 1,19:1"
+ #~ msgid "Source scaled to 1.33:1"
+ #~ msgstr "Källan skalad till 1,33:1"
+ #~ msgid "Source scaled to 1.33:1 then pillarboxed to Flat"
+ #~ msgstr "Källan skalad till 1,33:1, med sorgkanter innanför Flat"
+ #~ msgid "Source scaled to 1.375:1"
+ #~ msgstr "Källan skalad till 1,375:1"
+ #~ msgid "Source scaled to 1.37:1 (Academy ratio)"
+ #~ msgstr "Källan skalad till 1,37:1 (Academy-förhÃ¥llande)"
+ #~ msgid "Source scaled to 1.66:1"
+ #~ msgstr "Källan skalad till 1,66:1"
+ #~ msgid "Source scaled to 1.66:1 then pillarboxed to Flat"
+ #~ msgstr "Källan skalad till 1,66:1, med sorgkanter innanför Flat"
+ #~ msgid "Source scaled to 1.78:1"
+ #~ msgstr "Källan skalad till 1,78:1"
+ #~ msgid "Source scaled to 1.78:1 then pillarboxed to Flat"
+ #~ msgstr "Källan skalad till 1,78:1, med sorgkanter innanför Flat"
+ #~ msgid "Source scaled to Flat (1.85:1)"
+ #~ msgstr "Källan skalad till Flat (1,85:1)"
+ #~ msgid "Source scaled to Scope (2.39:1)"
+ #~ msgstr "Källan skalad till Scope (2,39:1)"
+ #~ msgid "Source scaled to fit Flat preserving its aspect ratio"
+ #~ msgstr ""
+ #~ "Källan skalad för att rymmas inom Flat utan att Ã¤ndra bildförhÃ¥llandet"
+ #~ msgid "Source scaled to fit Scope preserving its aspect ratio"
+ #~ msgstr ""
+ #~ "Källan skalad för att rymmas inom Scope utan att Ã¤ndra bildförhÃ¥llandet"
diff --combined src/lib/util.cc
index 654546e62e572e5f4107de5783d6f6f784fbc657,557e9a34bd26563406292c7dce8cbfde55794426..06da94294e4b8fe877d155c9c9158dedd73c7a29
@@@ -63,26 -63,8 +63,26 @@@ extern "C" 
  
  #include "i18n.h"
  
 -using namespace std;
 -using namespace boost;
 +using std::string;
 +using std::stringstream;
 +using std::setfill;
 +using std::ostream;
 +using std::endl;
 +using std::vector;
 +using std::hex;
 +using std::setw;
 +using std::ifstream;
 +using std::ios;
 +using std::min;
 +using std::max;
 +using std::list;
 +using std::multimap;
 +using std::istream;
 +using std::numeric_limits;
 +using std::pair;
 +using boost::shared_ptr;
 +using boost::thread;
 +using boost::lexical_cast;
  using libdcp::Size;
  
  thread::id ui_thread;
@@@ -261,7 -243,7 +261,7 @@@ dvdomatic_setup (
        Filter::setup_filters ();
        SoundProcessor::setup_sound_processors ();
  
 -      ui_thread = this_thread::get_id ();
 +      ui_thread = boost::this_thread::get_id ();
  }
  
  #ifdef DVDOMATIC_WINDOWS
@@@ -366,11 -348,11 +366,11 @@@ md5_digest (void const * data, int size
   *  @return MD5 digest of file's contents.
   */
  string
 -md5_digest (string file)
 +md5_digest (boost::filesystem::path file)
  {
 -      ifstream f (file.c_str(), ios::binary);
 +      ifstream f (file.string().c_str(), ios::binary);
        if (!f.good ()) {
 -              throw OpenFileError (file);
 +              throw OpenFileError (file.string());
        }
        
        f.seekg (0, ios::end);
@@@ -495,6 -477,16 +495,6 @@@ dcp_audio_sample_rate (int fs
        return 96000;
  }
  
 -bool operator== (Crop const & a, Crop const & b)
 -{
 -      return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom);
 -}
 -
 -bool operator!= (Crop const & a, Crop const & b)
 -{
 -      return !(a == b);
 -}
 -
  /** @param index Colour LUT index.
   *  @return Human-readable name.
   */
@@@ -517,16 -509,16 +517,16 @@@ Socket::Socket (int timeout
        , _socket (_io_service)
        , _timeout (timeout)
  {
 -      _deadline.expires_at (posix_time::pos_infin);
 +      _deadline.expires_at (boost::posix_time::pos_infin);
        check ();
  }
  
  void
  Socket::check ()
  {
 -      if (_deadline.expires_at() <= asio::deadline_timer::traits_type::now ()) {
 +      if (_deadline.expires_at() <= boost::asio::deadline_timer::traits_type::now ()) {
                _socket.close ();
 -              _deadline.expires_at (posix_time::pos_infin);
 +              _deadline.expires_at (boost::posix_time::pos_infin);
        }
  
        _deadline.async_wait (boost::bind (&Socket::check, this));
   *  @param endpoint End-point to connect to.
   */
  void
 -Socket::connect (asio::ip::basic_resolver_entry<asio::ip::tcp> const & endpoint)
 +Socket::connect (boost::asio::ip::basic_resolver_entry<boost::asio::ip::tcp> const & endpoint)
  {
 -      _deadline.expires_from_now (posix_time::seconds (_timeout));
 -      system::error_code ec = asio::error::would_block;
 -      _socket.async_connect (endpoint, lambda::var(ec) = lambda::_1);
 +      _deadline.expires_from_now (boost::posix_time::seconds (_timeout));
 +      boost::system::error_code ec = boost::asio::error::would_block;
 +      _socket.async_connect (endpoint, boost::lambda::var(ec) = boost::lambda::_1);
        do {
                _io_service.run_one();
 -      } while (ec == asio::error::would_block);
 +      } while (ec == boost::asio::error::would_block);
  
        if (ec || !_socket.is_open ()) {
                throw NetworkError (_("connect timed out"));
  void
  Socket::write (uint8_t const * data, int size)
  {
 -      _deadline.expires_from_now (posix_time::seconds (_timeout));
 -      system::error_code ec = asio::error::would_block;
 +      _deadline.expires_from_now (boost::posix_time::seconds (_timeout));
 +      boost::system::error_code ec = boost::asio::error::would_block;
  
 -      asio::async_write (_socket, asio::buffer (data, size), lambda::var(ec) = lambda::_1);
 +      boost::asio::async_write (_socket, boost::asio::buffer (data, size), boost::lambda::var(ec) = boost::lambda::_1);
        
        do {
                _io_service.run_one ();
 -      } while (ec == asio::error::would_block);
 +      } while (ec == boost::asio::error::would_block);
  
        if (ec) {
                throw NetworkError (ec.message ());
@@@ -585,14 -577,14 +585,14 @@@ Socket::write (uint32_t v
  void
  Socket::read (uint8_t* data, int size)
  {
 -      _deadline.expires_from_now (posix_time::seconds (_timeout));
 -      system::error_code ec = asio::error::would_block;
 +      _deadline.expires_from_now (boost::posix_time::seconds (_timeout));
 +      boost::system::error_code ec = boost::asio::error::would_block;
  
 -      asio::async_read (_socket, asio::buffer (data, size), lambda::var(ec) = lambda::_1);
 +      boost::asio::async_read (_socket, boost::asio::buffer (data, size), boost::lambda::var(ec) = boost::lambda::_1);
  
        do {
                _io_service.run_one ();
 -      } while (ec == asio::error::would_block);
 +      } while (ec == boost::asio::error::would_block);
        
        if (ec) {
                throw NetworkError (ec.message ());
@@@ -869,39 -861,37 +869,39 @@@ AudioBuffers::move (int from, int to, i
        }
  }
  
 +/** Add data from from `from', `from_channel' to our channel `to_channel' */
 +void
 +AudioBuffers::accumulate (shared_ptr<AudioBuffers> from, int from_channel, int to_channel)
 +{
 +      int const N = frames ();
 +      assert (from->frames() == N);
 +
 +      float* s = from->data (from_channel);
 +      float* d = _data[to_channel];
 +
 +      for (int i = 0; i < N; ++i) {
 +              *d++ += *s++;
 +      }
 +}
 +
  /** Trip an assert if the caller is not in the UI thread */
  void
  ensure_ui_thread ()
  {
 -      assert (this_thread::get_id() == ui_thread);
 +      assert (boost::this_thread::get_id() == ui_thread);
  }
  
 -/** @param v Source video frame.
 +/** @param v Content video frame.
   *  @param audio_sample_rate Source audio sample rate.
   *  @param frames_per_second Number of video frames per second.
   *  @return Equivalent number of audio frames for `v'.
   */
  int64_t
 -video_frames_to_audio_frames (SourceFrame v, float audio_sample_rate, float frames_per_second)
 +video_frames_to_audio_frames (ContentVideoFrame v, float audio_sample_rate, float frames_per_second)
  {
        return ((int64_t) v * audio_sample_rate / frames_per_second);
  }
  
 -/** @param f Filename.
 - *  @return true if this file is a still image, false if it is something else.
 - */
 -bool
 -still_image_file (string f)
 -{
 -      string ext = boost::filesystem::path(f).extension().string();
 -
 -      transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
 -      
 -      return (ext == N_(".tif") || ext == N_(".tiff") || ext == N_(".jpg") || ext == N_(".jpeg") || ext == N_(".png") || ext == N_(".bmp"));
 -}
 -
  /** @return A pair containing CPU model name and the number of processors */
  pair<string, int>
  cpu_info ()
@@@ -948,6 -938,58 +948,6 @@@ audio_channel_name (int c
        return channels[c];
  }
  
 -AudioMapping::AudioMapping (int c)
 -      : _source_channels (c)
 -{
 -
 -}
 -
 -optional<libdcp::Channel>
 -AudioMapping::source_to_dcp (int c) const
 -{
 -      if (c >= _source_channels) {
 -              return optional<libdcp::Channel> ();
 -      }
 -
 -      if (_source_channels == 1) {
 -              /* mono sources to centre */
 -              return libdcp::CENTRE;
 -      }
 -      
 -      return static_cast<libdcp::Channel> (c);
 -}
 -
 -optional<int>
 -AudioMapping::dcp_to_source (libdcp::Channel c) const
 -{
 -      if (_source_channels == 1) {
 -              if (c == libdcp::CENTRE) {
 -                      return 0;
 -              } else {
 -                      return optional<int> ();
 -              }
 -      }
 -
 -      if (static_cast<int> (c) >= _source_channels) {
 -              return optional<int> ();
 -      }
 -      
 -      return static_cast<int> (c);
 -}
 -
 -int
 -AudioMapping::dcp_channels () const
 -{
 -      if (_source_channels == 1) {
 -              /* The source is mono, so to put the mono channel into
 -                 the centre we need to generate a 5.1 soundtrack.
 -              */
 -              return 6;
 -      }
 -
 -      return _source_channels;
 -}
 -
  FrameRateConversion::FrameRateConversion (float source, int dcp)
        : skip (false)
        , repeat (false)
  
                if (change_speed) {
                        float const pc = dcp * 100 / (source * factor());
-                       description += String::compose (_("DCP will run at %1%% of the source speed."), pc);
+                       description += String::compose (_("DCP will run at %1%% of the source speed.\n"), pc);
                }
        }
  }
diff --combined src/tools/dvdomatic.cc
index a0e7f0de85e2f0f1f1b73487eaf8bcc742406715,80a33efefd9400116b91be16d2e189158bb3e160..6c27892b0806760a950d5559facbc3e26abe8286
@@@ -236,6 -236,9 +236,6 @@@ public
  
                set_menu_sensitivity ();
  
 -              /* XXX: calling these here is a bit of a hack */
 -              film_editor->setup_visibility ();
 -              
                film_editor->FileChanged.connect (bind (&Frame::file_changed, this, _1));
                if (film) {
                        file_changed (film->directory ());
@@@ -314,8 -317,16 +314,16 @@@ private
        void file_open (wxCommandEvent &)
        {
                wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
-               int const r = c->ShowModal ();
-               
+               int r;
+               while (1) {
+                       r = c->ShowModal ();
+                       if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
+                               error_dialog (this, _("You did not select a folder.  Make sure that you select a folder before clicking Open."));
+                       } else {
+                               break;
+                       }
+               }
+                       
                if (r == wxID_OK) {
                        maybe_save_then_delete_film ();
                        try {
diff --combined src/wx/audio_dialog.cc
index 4c50260fa47b35d231b06803f19fcfe062b59978,39650d15718de466e8e5847ef93a4e1b766b2c9e..bfd92f0b65e8db97508cb61ee775e75121086662
  */
  
  #include <boost/filesystem.hpp>
 +#include "lib/audio_analysis.h"
 +#include "lib/film.h"
  #include "audio_dialog.h"
  #include "audio_plot.h"
 -#include "audio_analysis.h"
 -#include "film.h"
  #include "wx_util.h"
  
  using boost::shared_ptr;
@@@ -35,7 -35,7 +35,7 @@@ AudioDialog::AudioDialog (wxWindow* par
        wxBoxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
  
        _plot = new AudioPlot (this);
-       sizer->Add (_plot, 1, wxALL, 12);
+       sizer->Add (_plot, 1, wxALL | wxEXPAND, 12);
  
        wxBoxSizer* side = new wxBoxSizer (wxVERTICAL);
  
@@@ -84,7 -84,7 +84,7 @@@
  }
  
  void
 -AudioDialog::set_film (boost::shared_ptr<Film> f)
 +AudioDialog::set_film (shared_ptr<Film> f)
  {
        _film_changed_connection.disconnect ();
        _film_audio_analysis_succeeded_connection.disconnect ();
@@@ -92,6 -92,7 +92,6 @@@
        _film = f;
  
        try_to_load_analysis ();
 -      setup_channels ();
        _plot->set_gain (_film->audio_gain ());
  
        _film_changed_connection = _film->Changed.connect (bind (&AudioDialog::film_changed, this, _1));
        SetTitle (wxString::Format (_("DVD-o-matic audio - %s"), std_to_wx(_film->name()).data()));
  }
  
 -void
 -AudioDialog::setup_channels ()
 -{
 -      if (!_film->audio_stream()) {
 -              return;
 -      }
 -
 -      AudioMapping m (_film->audio_stream()->channels ());
 -      
 -      for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
 -              if (m.dcp_to_source(static_cast<libdcp::Channel>(i))) {
 -                      _channel_checkbox[i]->Show ();
 -              } else {
 -                      _channel_checkbox[i]->Hide ();
 -              }
 -      }
 -}     
  
  void
  AudioDialog::try_to_load_analysis ()
                
        _plot->set_analysis (a);
  
 -      AudioMapping m (_film->audio_stream()->channels ());
 -      optional<libdcp::Channel> c = m.source_to_dcp (0);
 -      if (c) {
 -              _channel_checkbox[c.get()]->SetValue (true);
 -              _plot->set_channel_visible (0, true);
 -      }
 +      _channel_checkbox[0]->SetValue (true);
 +      _plot->set_channel_visible (0, true);
  
        for (int i = 0; i < AudioPoint::COUNT; ++i) {
                _type_checkbox[i]->SetValue (true);
@@@ -135,7 -157,11 +135,7 @@@ AudioDialog::channel_clicked (wxCommand
  
        assert (c < MAX_AUDIO_CHANNELS);
  
 -      AudioMapping m (_film->audio_stream()->channels ());
 -      optional<int> s = m.dcp_to_source (static_cast<libdcp::Channel> (c));
 -      if (s) {
 -              _plot->set_channel_visible (s.get(), _channel_checkbox[c]->GetValue ());
 -      }
 +      _plot->set_channel_visible (c, _channel_checkbox[c]->GetValue ());
  }
  
  void
@@@ -145,6 -171,11 +145,6 @@@ AudioDialog::film_changed (Film::Proper
        case Film::AUDIO_GAIN:
                _plot->set_gain (_film->audio_gain ());
                break;
 -      case Film::CONTENT_AUDIO_STREAM:
 -      case Film::EXTERNAL_AUDIO:
 -      case Film::USE_CONTENT_AUDIO:
 -              setup_channels ();
 -              break;
        default:
                break;
        }
diff --combined src/wx/film_editor.cc
index 07139313953f445102145663a6e47bcfa608b824,eb36ce1ff26087e9fb45ef74bff66709fcc4df18..feb49ed78a394b392f93e118ae604fe3e2948ce9
@@@ -25,7 -25,6 +25,7 @@@
  #include <iomanip>
  #include <wx/wx.h>
  #include <wx/notebook.h>
 +#include <wx/listctrl.h>
  #include <boost/thread.hpp>
  #include <boost/filesystem.hpp>
  #include <boost/lexical_cast.hpp>
@@@ -38,9 -37,6 +38,9 @@@
  #include "lib/filter.h"
  #include "lib/config.h"
  #include "lib/ffmpeg_decoder.h"
 +#include "lib/imagemagick_content.h"
 +#include "lib/sndfile_content.h"
 +#include "lib/dcp_content_type.h"
  #include "filter_dialog.h"
  #include "wx_util.h"
  #include "film_editor.h"
@@@ -49,8 -45,6 +49,8 @@@
  #include "dci_metadata_dialog.h"
  #include "scaler.h"
  #include "audio_dialog.h"
 +#include "imagemagick_content_dialog.h"
 +#include "audio_mapping_view.h"
  
  using std::string;
  using std::cout;
@@@ -61,24 -55,22 +61,24 @@@ using std::setprecision
  using std::list;
  using std::vector;
  using boost::shared_ptr;
 +using boost::weak_ptr;
  using boost::dynamic_pointer_cast;
 +using boost::lexical_cast;
  
  /** @param f Film to edit */
  FilmEditor::FilmEditor (shared_ptr<Film> f, wxWindow* parent)
        : wxPanel (parent)
 -      , _film (f)
        , _generally_sensitive (true)
        , _audio_dialog (0)
  {
        wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
 -      SetSizer (s);
        _notebook = new wxNotebook (this, wxID_ANY);
        s->Add (_notebook, 1);
  
        make_film_panel ();
        _notebook->AddPage (_film_panel, _("Film"), true);
 +      make_content_panel ();
 +      _notebook->AddPage (_content_panel, _("Content"), false);
        make_video_panel ();
        _notebook->AddPage (_video_panel, _("Video"), false);
        make_audio_panel ();
        make_subtitle_panel ();
        _notebook->AddPage (_subtitle_panel, _("Subtitles"), false);
  
 -      set_film (_film);
 +      set_film (f);
        connect_to_widgets ();
  
        JobManager::instance()->ActiveJobsChanged.connect (
                bind (&FilmEditor::active_jobs_changed, this, _1)
                );
        
 -      setup_visibility ();
        setup_formats ();
 +
 +      SetSizerAndFit (s);
  }
  
  void
@@@ -126,8 -117,14 +126,8 @@@ FilmEditor::make_film_panel (
        grid->Add (_edit_dci_button, wxGBPosition (r, 1), wxDefaultSpan);
        ++r;
  
 -      add_label_to_grid_bag_sizer (grid, _film_panel, _("Content"), wxGBPosition (r, 0));
 -      _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), _("Select Content File"), wxT("*.*"));
 -      grid->Add (_content, wxGBPosition (r, 1), wxDefaultSpan, wxEXPAND);
 -      ++r;
 -
 -      _trust_content_header = new wxCheckBox (_film_panel, wxID_ANY, _("Trust content's header"));
 -      video_control (_trust_content_header);
 -      grid->Add (_trust_content_header, wxGBPosition (r, 0), wxGBSpan(1, 2));
 +      _trust_content_headers = new wxCheckBox (_film_panel, wxID_ANY, _("Trust content's header"));
 +      grid->Add (_trust_content_headers, wxGBPosition (r, 0), wxGBSpan(1, 2));
        ++r;
  
        add_label_to_grid_bag_sizer (grid, _film_panel, _("Content Type"), wxGBPosition (r, 0));
        grid->Add (_dcp_content_type, wxGBPosition (r, 1));
        ++r;
  
 -      video_control (add_label_to_grid_bag_sizer (grid, _film_panel, _("Original Frame Rate"), wxGBPosition (r, 0)));
 -      _source_frame_rate = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
 -      grid->Add (video_control (_source_frame_rate), wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
 -      ++r;
 -
        {
                add_label_to_grid_bag_sizer (grid, _film_panel, _("DCP Frame Rate"), wxGBPosition (r, 0));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
        }
        ++r;
  
-       _frame_rate_description = new wxStaticText (_film_panel, wxID_ANY, wxT (" \n "), wxDefaultPosition, wxDefaultSize);
+       _frame_rate_description = new wxStaticText (_film_panel, wxID_ANY, wxT (" \n \n "), wxDefaultPosition, wxDefaultSize);
 -      grid->Add (video_control (_frame_rate_description), wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
 +      grid->Add (_frame_rate_description, wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
        wxFont font = _frame_rate_description->GetFont();
        font.SetStyle(wxFONTSTYLE_ITALIC);
        font.SetPointSize(font.GetPointSize() - 1);
        _frame_rate_description->SetFont(font);
        ++r;
        
 -      video_control (add_label_to_grid_bag_sizer (grid, _film_panel, _("Original Size"), wxGBPosition (r, 0)));
 -      _original_size = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
 -      grid->Add (video_control (_original_size), wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
 -      ++r;
 -      
 -      video_control (add_label_to_grid_bag_sizer (grid, _film_panel, _("Length"), wxGBPosition (r, 0)));
 +      add_label_to_grid_bag_sizer (grid, _film_panel, _("Length"), wxGBPosition (r, 0));
        _length = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
 -      grid->Add (video_control (_length), wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
 +      grid->Add (_length, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
        ++r;
  
  
        {
 -              video_control (add_label_to_grid_bag_sizer (grid, _film_panel, _("Trim frames"), wxGBPosition (r, 0)));
 +              add_label_to_grid_bag_sizer (grid, _film_panel, _("Trim frames"), wxGBPosition (r, 0));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 -              video_control (add_label_to_sizer (s, _film_panel, _("Start")));
 +              add_label_to_sizer (s, _film_panel, _("Start"));
                _trim_start = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
 -              s->Add (video_control (_trim_start));
 -              video_control (add_label_to_sizer (s, _film_panel, _("End")));
 +              s->Add (_trim_start);
 +              add_label_to_sizer (s, _film_panel, _("End"));
                _trim_end = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
 -              s->Add (video_control (_trim_end));
 +              s->Add (_trim_end);
  
                grid->Add (s, wxGBPosition (r, 1));
        }
        ++r;
  
 -      _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, _("A/B"));
 -      video_control (_dcp_ab);
 -      grid->Add (_dcp_ab, wxGBPosition (r, 0));
 -      ++r;
 -
 -      /* STILL-only stuff */
 -      {
 -              still_control (add_label_to_grid_bag_sizer (grid, _film_panel, _("Duration"), wxGBPosition (r, 0)));
 -              wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 -              _still_duration = new wxSpinCtrl (_film_panel);
 -              still_control (_still_duration);
 -              s->Add (_still_duration, 1, wxEXPAND);
 -              /// TRANSLATORS: `s' here is an abbreviation for seconds, the unit of time
 -              still_control (add_label_to_sizer (s, _film_panel, _("s")));
 -              grid->Add (s, wxGBPosition (r, 1));
 -      }
 +      _ab = new wxCheckBox (_film_panel, wxID_ANY, _("A/B"));
 +      grid->Add (_ab, wxGBPosition (r, 0));
        ++r;
  
        vector<DCPContentType const *> const ct = DCPContentType::all ();
@@@ -196,15 -217,8 +196,15 @@@ FilmEditor::connect_to_widgets (
        _use_dci_name->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::use_dci_name_toggled), 0, this);
        _edit_dci_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::edit_dci_button_clicked), 0, this);
        _format->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::format_changed), 0, this);
 -      _content->Connect (wxID_ANY, wxEVT_COMMAND_FILEPICKER_CHANGED, wxCommandEventHandler (FilmEditor::content_changed), 0, this);
 -      _trust_content_header->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::trust_content_header_changed), 0, this);
 +      _trust_content_headers->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::trust_content_headers_changed), 0, this);
 +      _content->Connect (wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler (FilmEditor::content_selection_changed), 0, this);
 +      _content->Connect (wxID_ANY, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler (FilmEditor::content_selection_changed), 0, this);
 +      _content->Connect (wxID_ANY, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler (FilmEditor::content_activated), 0, this);
 +      _content_add->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::content_add_clicked), 0, this);
 +      _content_remove->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::content_remove_clicked), 0, this);
 +      _content_edit->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::content_edit_clicked), 0, this);
 +      _content_earlier->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::content_earlier_clicked), 0, this);
 +      _content_later->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::content_later_clicked), 0, this);
        _left_crop->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::left_crop_changed), 0, this);
        _right_crop->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::right_crop_changed), 0, this);
        _top_crop->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::top_crop_changed), 0, this);
        _dcp_content_type->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::dcp_content_type_changed), 0, this);
        _dcp_frame_rate->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::dcp_frame_rate_changed), 0, this);
        _best_dcp_frame_rate->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::best_dcp_frame_rate_clicked), 0, this);
 -      _dcp_ab->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::dcp_ab_toggled), 0, this);
 -      _still_duration->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::still_duration_changed), 0, this);
 +      _ab->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::ab_toggled), 0, this);
        _trim_start->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::trim_start_changed), 0, this);
        _trim_end->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::trim_end_changed), 0, this);
        _with_subtitles->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::with_subtitles_toggled), 0, this);
        _subtitle_scale->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::subtitle_scale_changed), 0, this);
        _colour_lut->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::colour_lut_changed), 0, this);
        _j2k_bandwidth->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::j2k_bandwidth_changed), 0, this);
 -      _subtitle_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::subtitle_stream_changed), 0, this);
 -      _audio_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::audio_stream_changed), 0, this);
 +      _ffmpeg_subtitle_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::ffmpeg_subtitle_stream_changed), 0, this);
 +      _ffmpeg_audio_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::ffmpeg_audio_stream_changed), 0, this);
        _audio_gain->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::audio_gain_changed), 0, this);
        _audio_gain_calculate_button->Connect (
                wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::audio_gain_calculate_button_clicked), 0, this
                );
        _show_audio->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::show_audio_clicked), 0, this);
        _audio_delay->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::audio_delay_changed), 0, this);
 -      _use_content_audio->Connect (wxID_ANY, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler (FilmEditor::use_audio_changed), 0, this);
 -      _use_external_audio->Connect (wxID_ANY, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler (FilmEditor::use_audio_changed), 0, this);
 -      for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
 -              _external_audio[i]->Connect (
 -                      wxID_ANY, wxEVT_COMMAND_FILEPICKER_CHANGED, wxCommandEventHandler (FilmEditor::external_audio_changed), 0, this
 -                      );
 -      }
  }
  
  void
@@@ -248,14 -270,6 +248,6 @@@ FilmEditor::make_video_panel (
        grid->Add (_format, wxGBPosition (r, 1));
        ++r;
  
-       _format_description = new wxStaticText (_video_panel, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize);
-       grid->Add (_format_description, wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
-       wxFont font = _format_description->GetFont();
-       font.SetStyle(wxFONTSTYLE_ITALIC);
-       font.SetPointSize(font.GetPointSize() - 1);
-       _format_description->SetFont(font);
-       ++r;
        add_label_to_grid_bag_sizer (grid, _video_panel, _("Left crop"), wxGBPosition (r, 0));
        _left_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
        grid->Add (_left_crop, wxGBPosition (r, 1));
        grid->Add (_bottom_crop, wxGBPosition (r, 1));
        ++r;
  
+       _scaling_description = new wxStaticText (_video_panel, wxID_ANY, wxT ("\n \n \n \n"), wxDefaultPosition, wxDefaultSize);
+       grid->Add (_scaling_description, wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
+       wxFont font = _scaling_description->GetFont();
+       font.SetStyle(wxFONTSTYLE_ITALIC);
+       font.SetPointSize(font.GetPointSize() - 1);
+       _scaling_description->SetFont(font);
+       ++r;
        /* VIDEO-only stuff */
        {
 -              video_control (add_label_to_grid_bag_sizer (grid, _video_panel, _("Filters"), wxGBPosition (r, 0)));
 +              add_label_to_grid_bag_sizer (grid, _video_panel, _("Filters"), wxGBPosition (r, 0));
                wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _filters = new wxStaticText (_video_panel, wxID_ANY, _("None"));
 -              video_control (_filters);
                s->Add (_filters, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM | wxRIGHT, 6);
                _filters_button = new wxButton (_video_panel, wxID_ANY, _("Edit..."));
 -              video_control (_filters_button);
                s->Add (_filters_button, 0);
                grid->Add (s, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
        }
        ++r;
  
 -      video_control (add_label_to_grid_bag_sizer (grid, _video_panel, _("Scaler"), wxGBPosition (r, 0)));
 +      add_label_to_grid_bag_sizer (grid, _video_panel, _("Scaler"), wxGBPosition (r, 0));
        _scaler = new wxChoice (_video_panel, wxID_ANY);
 -      grid->Add (video_control (_scaler), wxGBPosition (r, 1));
 +      grid->Add (_scaler, wxGBPosition (r, 1));
        ++r;
  
        vector<Scaler const *> const sc = Scaler::all ();
        _top_crop->SetRange (0, 1024);
        _right_crop->SetRange (0, 1024);
        _bottom_crop->SetRange (0, 1024);
 -      _still_duration->SetRange (1, 60 * 60);
        _trim_start->SetRange (0, 100);
        _trim_end->SetRange (0, 100);
        _j2k_bandwidth->SetRange (50, 250);
  }
  
 +void
 +FilmEditor::make_content_panel ()
 +{
 +      _content_panel = new wxPanel (_notebook);
 +      _content_sizer = new wxBoxSizer (wxVERTICAL);
 +      _content_panel->SetSizer (_content_sizer);
 +      
 +        {
 +                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 +                
 +                _content = new wxListCtrl (_content_panel, wxID_ANY, wxDefaultPosition, wxSize (320, 160), wxLC_REPORT | wxLC_NO_HEADER | wxLC_SINGLE_SEL);
 +                s->Add (_content, 1, wxEXPAND | wxTOP | wxBOTTOM, 6);
 +
 +                _content->InsertColumn (0, wxT(""));
 +              _content->SetColumnWidth (0, 512);
 +
 +                wxBoxSizer* b = new wxBoxSizer (wxVERTICAL);
 +                _content_add = new wxButton (_content_panel, wxID_ANY, _("Add..."));
 +                b->Add (_content_add);
 +                _content_remove = new wxButton (_content_panel, wxID_ANY, _("Remove"));
 +                b->Add (_content_remove);
 +                _content_edit = new wxButton (_content_panel, wxID_ANY, _("Edit..."));
 +                b->Add (_content_edit);
 +                _content_earlier = new wxButton (_content_panel, wxID_ANY, _("Earlier"));
 +                b->Add (_content_earlier);
 +                _content_later = new wxButton (_content_panel, wxID_ANY, _("Later"));
 +                b->Add (_content_later);
 +
 +                s->Add (b, 0, wxALL, 4);
 +
 +                _content_sizer->Add (s, 1, wxEXPAND | wxALL, 6);
 +        }
 +
 +      _content_information = new wxTextCtrl (_content_panel, wxID_ANY, wxT ("\n\n\n\n"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE);
 +      _content_sizer->Add (_content_information, 1, wxEXPAND | wxALL, 6);
 +}
 +
  void
  FilmEditor::make_audio_panel ()
  {
        grid->AddSpacer (0);
  
        {
 -              video_control (add_label_to_sizer (grid, _audio_panel, _("Audio Gain")));
 +              add_label_to_sizer (grid, _audio_panel, _("Audio Gain"));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _audio_gain = new wxSpinCtrl (_audio_panel);
 -              s->Add (video_control (_audio_gain), 1);
 -              video_control (add_label_to_sizer (s, _audio_panel, _("dB")));
 +              s->Add (_audio_gain, 1);
 +              add_label_to_sizer (s, _audio_panel, _("dB"));
                _audio_gain_calculate_button = new wxButton (_audio_panel, wxID_ANY, _("Calculate..."));
 -              video_control (_audio_gain_calculate_button);
                s->Add (_audio_gain_calculate_button, 1, wxEXPAND);
                grid->Add (s);
        }
  
        {
 -              video_control (add_label_to_sizer (grid, _audio_panel, _("Audio Delay")));
 +              add_label_to_sizer (grid, _audio_panel, _("Audio Delay"));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _audio_delay = new wxSpinCtrl (_audio_panel);
 -              s->Add (video_control (_audio_delay), 1);
 +              s->Add (_audio_delay, 1);
                /// TRANSLATORS: this is an abbreviation for milliseconds, the unit of time
 -              video_control (add_label_to_sizer (s, _audio_panel, _("ms")));
 +              add_label_to_sizer (s, _audio_panel, _("ms"));
                grid->Add (s);
        }
  
 -      {
 -              _use_content_audio = new wxRadioButton (_audio_panel, wxID_ANY, _("Use content's audio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
 -              grid->Add (video_control (_use_content_audio));
 -              wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 -              _audio_stream = new wxChoice (_audio_panel, wxID_ANY);
 -              s->Add (video_control (_audio_stream), 1);
 -              _audio = new wxStaticText (_audio_panel, wxID_ANY, wxT (""));
 -              s->Add (video_control (_audio), 1, wxALIGN_CENTER_VERTICAL | wxLEFT, 8);
 -              grid->Add (s, 1, wxEXPAND);
 -      }
 -
 -      _use_external_audio = new wxRadioButton (_audio_panel, wxID_ANY, _("Use external audio"));
 -      grid->Add (_use_external_audio);
 -      grid->AddSpacer (0);
 -
 -      for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
 -              add_label_to_sizer (grid, _audio_panel, std_to_wx (audio_channel_name (i)));
 -              _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), _("Select Audio File"), wxT ("*.wav"));
 -              grid->Add (_external_audio[i], 1, wxEXPAND);
 -      }
 +        {
 +                add_label_to_sizer (grid, _audio_panel, _("Audio Stream"));
 +                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 +                _ffmpeg_audio_stream = new wxChoice (_audio_panel, wxID_ANY);
 +                s->Add (_ffmpeg_audio_stream, 1);
 +                _audio = new wxStaticText (_audio_panel, wxID_ANY, wxT (""));
 +                s->Add (_audio, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, 8);
 +                grid->Add (s, 1, wxEXPAND);
 +        }
  
 +      _audio_mapping = new AudioMappingView (_audio_panel);
 +      _audio_sizer->Add (_audio_mapping, 1, wxEXPAND | wxALL, 6);
 +      
        _audio_gain->SetRange (-60, 60);
        _audio_delay->SetRange (-1000, 1000);
  }
@@@ -425,21 -422,27 +425,26 @@@ FilmEditor::make_subtitle_panel (
        _subtitle_sizer->Add (grid, 0, wxALL, 8);
  
        _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, _("With Subtitles"));
 -      video_control (_with_subtitles);
        grid->Add (_with_subtitles, 1);
        
 -      _subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY);
 -      grid->Add (video_control (_subtitle_stream));
 +      _ffmpeg_subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY);
 +      grid->Add (_ffmpeg_subtitle_stream);
  
-       add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Offset"));
-       _subtitle_offset = new wxSpinCtrl (_subtitle_panel);
-       grid->Add (_subtitle_offset, 1);
+       {
 -              video_control (add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Offset")));
++              add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Offset"));
+               wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+               _subtitle_offset = new wxSpinCtrl (_subtitle_panel);
+               s->Add (_subtitle_offset);
 -              video_control (add_label_to_sizer (s, _subtitle_panel, _("pixels")));
++              add_label_to_sizer (s, _subtitle_panel, _("pixels"));
+               grid->Add (s);
+       }
  
        {
 -              video_control (add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Scale")));
 +              add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Scale"));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _subtitle_scale = new wxSpinCtrl (_subtitle_panel);
 -              s->Add (video_control (_subtitle_scale));
 -              video_control (add_label_to_sizer (s, _subtitle_panel, _("%")));
 +              s->Add (_subtitle_scale);
 +              add_label_to_sizer (s, _subtitle_panel, _("%"));
                grid->Add (s);
        }
  
@@@ -491,25 -494,41 +496,25 @@@ FilmEditor::bottom_crop_changed (wxComm
        _film->set_bottom_crop (_bottom_crop->GetValue ());
  }
  
 -/** Called when the content filename has been changed */
 -void
 -FilmEditor::content_changed (wxCommandEvent &)
 -{
 -      if (!_film) {
 -              return;
 -      }
 -
 -      try {
 -              _film->set_content (wx_to_std (_content->GetPath ()));
 -      } catch (std::exception& e) {
 -              _content->SetPath (std_to_wx (_film->directory ()));
 -              error_dialog (this, wxString::Format (_("Could not set content: %s"), std_to_wx (e.what()).data()));
 -      }
 -}
 -
  void
 -FilmEditor::trust_content_header_changed (wxCommandEvent &)
 +FilmEditor::trust_content_headers_changed (wxCommandEvent &)
  {
        if (!_film) {
                return;
        }
  
 -      _film->set_trust_content_header (_trust_content_header->GetValue ());
 +      _film->set_trust_content_headers (_trust_content_headers->GetValue ());
  }
  
  /** Called when the DCP A/B switch has been toggled */
  void
 -FilmEditor::dcp_ab_toggled (wxCommandEvent &)
 +FilmEditor::ab_toggled (wxCommandEvent &)
  {
        if (!_film) {
                return;
        }
        
 -      _film->set_dcp_ab (_dcp_ab->GetValue ());
 +      _film->set_ab (_ab->GetValue ());
  }
  
  /** Called when the name widget has been changed */
@@@ -597,25 -616,49 +602,25 @@@ FilmEditor::film_changed (Film::Propert
        case Film::NONE:
                break;
        case Film::CONTENT:
 -              checked_set (_content, _film->content ());
 -              setup_visibility ();
 +              setup_content ();
                setup_formats ();
 +              setup_format ();
                setup_subtitle_control_sensitivity ();
                setup_streams ();
                setup_show_audio_sensitivity ();
-               setup_length ();
 -              setup_frame_rate_description ();
                break;
 -      case Film::TRUST_CONTENT_HEADER:
 -              checked_set (_trust_content_header, _film->trust_content_header ());
 -              break;
 -      case Film::SUBTITLE_STREAMS:
 -              setup_subtitle_control_sensitivity ();
 -              setup_streams ();
 -              break;
 -      case Film::CONTENT_AUDIO_STREAMS:
 -              setup_streams ();
 -              setup_show_audio_sensitivity ();
 -              setup_frame_rate_description ();
 +      case Film::TRUST_CONTENT_HEADERS:
 +              checked_set (_trust_content_headers, _film->trust_content_headers ());
                break;
        case Film::FORMAT:
 -      {
 -              int n = 0;
 -              vector<Format const *>::iterator i = _formats.begin ();
 -              while (i != _formats.end() && *i != _film->format ()) {
 -                      ++i;
 -                      ++n;
 -              }
 -              if (i == _formats.end()) {
 -                      checked_set (_format, -1);
 -              } else {
 -                      checked_set (_format, n);
 -              }
 -              setup_dcp_name ();
 -              setup_scaling_description ();
 +              setup_format ();
                break;
 -      }
        case Film::CROP:
                checked_set (_left_crop, _film->crop().left);
                checked_set (_right_crop, _film->crop().right);
                checked_set (_top_crop, _film->crop().top);
                checked_set (_bottom_crop, _film->crop().bottom);
+               setup_scaling_description ();
                break;
        case Film::FILTERS:
        {
                checked_set (_name, _film->name());
                setup_dcp_name ();
                break;
 -      case Film::SOURCE_FRAME_RATE:
 -              s << fixed << setprecision(2) << _film->source_frame_rate();
 -              _source_frame_rate->SetLabel (std_to_wx (s.str ()));
 -              setup_frame_rate_description ();
 -              break;
 -      case Film::SIZE:
 -              if (_film->size().width == 0 && _film->size().height == 0) {
 -                      _original_size->SetLabel (wxT (""));
 -              } else {
 -                      s << _film->size().width << " x " << _film->size().height;
 -                      _original_size->SetLabel (std_to_wx (s.str ()));
 -              }
 -              setup_scaling_description ();
 -              break;
 -      case Film::LENGTH:
 -              if (_film->source_frame_rate() > 0 && _film->length()) {
 -                      s << _film->length().get() << " "
 -                        << wx_to_std (_("frames")) << "; " << seconds_to_hms (_film->length().get() / _film->source_frame_rate());
 -              } else if (_film->length()) {
 -                      s << _film->length().get() << " "
 -                        << wx_to_std (_("frames"));
 -              } 
 -              _length->SetLabel (std_to_wx (s.str ()));
 -              if (_film->length()) {
 -                      _trim_start->SetRange (0, _film->length().get());
 -                      _trim_end->SetRange (0, _film->length().get());
 -              }
 -              break;
        case Film::DCP_CONTENT_TYPE:
                checked_set (_dcp_content_type, DCPContentType::as_index (_film->dcp_content_type ()));
                setup_dcp_name ();
                break;
 -      case Film::DCP_AB:
 -              checked_set (_dcp_ab, _film->dcp_ab ());
 +      case Film::AB:
 +              checked_set (_ab, _film->ab ());
                break;
        case Film::SCALER:
                checked_set (_scaler, Scaler::as_index (_film->scaler ()));
        case Film::AUDIO_DELAY:
                checked_set (_audio_delay, _film->audio_delay ());
                break;
 -      case Film::STILL_DURATION:
 -              checked_set (_still_duration, _film->still_duration ());
 -              break;
        case Film::WITH_SUBTITLES:
                checked_set (_with_subtitles, _film->with_subtitles ());
                setup_subtitle_control_sensitivity ();
        case Film::DCI_METADATA:
                setup_dcp_name ();
                break;
 -      case Film::CONTENT_AUDIO_STREAM:
 -              if (_film->content_audio_stream()) {
 -                      checked_set (_audio_stream, _film->content_audio_stream()->to_string());
 -              }
 -              setup_dcp_name ();
 -              setup_audio_details ();
 -              setup_audio_control_sensitivity ();
 -              setup_show_audio_sensitivity ();
 -              setup_frame_rate_description ();
 -              break;
 -      case Film::USE_CONTENT_AUDIO:
 -              checked_set (_use_content_audio, _film->use_content_audio());
 -              checked_set (_use_external_audio, !_film->use_content_audio());
 -              setup_dcp_name ();
 -              setup_audio_details ();
 -              setup_audio_control_sensitivity ();
 -              setup_show_audio_sensitivity ();
 -              setup_frame_rate_description ();
 -              break;
 -      case Film::SUBTITLE_STREAM:
 -              if (_film->subtitle_stream()) {
 -                      checked_set (_subtitle_stream, _film->subtitle_stream()->to_string());
 -              }
 -              break;
 -      case Film::EXTERNAL_AUDIO:
 -      {
 -              vector<string> a = _film->external_audio ();
 -              for (size_t i = 0; i < a.size() && i < MAX_AUDIO_CHANNELS; ++i) {
 -                      checked_set (_external_audio[i], a[i]);
 -              }
 -              setup_audio_details ();
 -              setup_show_audio_sensitivity ();
 -              setup_frame_rate_description ();
 -              break;
 -      }
        case Film::DCP_FRAME_RATE:
                for (unsigned int i = 0; i < _dcp_frame_rate->GetCount(); ++i) {
                        if (wx_to_std (_dcp_frame_rate->GetString(i)) == boost::lexical_cast<string> (_film->dcp_frame_rate())) {
                        }
                }
  
 -              if (_film->source_frame_rate()) {
 -                      _best_dcp_frame_rate->Enable (best_dcp_frame_rate (_film->source_frame_rate ()) != _film->dcp_frame_rate ());
 +              if (_film->video_frame_rate()) {
-                       _frame_rate_description->SetLabel (std_to_wx (FrameRateConversion (_film->video_frame_rate(), _film->dcp_frame_rate()).description));
 +                      _best_dcp_frame_rate->Enable (best_dcp_frame_rate (_film->video_frame_rate ()) != _film->dcp_frame_rate ());
                } else {
-                       _frame_rate_description->SetLabel (wxT (""));
                        _best_dcp_frame_rate->Disable ();
                }
 -
+               setup_frame_rate_description ();
 +              break;
 +      case Film::AUDIO_MAPPING:
 +              _audio_mapping->set_mapping (_film->audio_mapping ());
 +              break;
 +      }
 +}
 +
 +void
 +FilmEditor::film_content_changed (weak_ptr<Content> content, int property)
 +{
 +      if (!_film) {
 +              /* We call this method ourselves (as well as using it as a signal handler)
 +                 so _film can be 0.
 +              */
 +              return;
 +      }
 +              
 +      if (property == FFmpegContentProperty::SUBTITLE_STREAMS) {
 +              setup_subtitle_control_sensitivity ();
 +              setup_streams ();
 +      } else if (property == FFmpegContentProperty::AUDIO_STREAMS) {
 +              setup_streams ();
 +              setup_show_audio_sensitivity ();
 +      } else if (property == VideoContentProperty::VIDEO_LENGTH) {
 +              setup_length ();
 +              boost::shared_ptr<Content> c = content.lock ();
 +              if (c && c == selected_content()) {
 +                      setup_content_information ();
 +              }
 +      } else if (property == FFmpegContentProperty::AUDIO_STREAM) {
 +              if (_film->ffmpeg_audio_stream()) {
 +                      checked_set (_ffmpeg_audio_stream, boost::lexical_cast<string> (_film->ffmpeg_audio_stream()->id));
 +              }
 +              setup_dcp_name ();
 +              setup_audio_details ();
 +              setup_show_audio_sensitivity ();
 +      } else if (property == FFmpegContentProperty::SUBTITLE_STREAM) {
 +              if (_film->ffmpeg_subtitle_stream()) {
 +                      checked_set (_ffmpeg_subtitle_stream, boost::lexical_cast<string> (_film->ffmpeg_subtitle_stream()->id));
 +              }
        }
  }
  
-       setup_dcp_name ();
 +void
 +FilmEditor::setup_format ()
 +{
 +      int n = 0;
 +      vector<Format const *>::iterator i = _formats.begin ();
 +      while (i != _formats.end() && *i != _film->format ()) {
 +              ++i;
 +              ++n;
 +      }
++      
 +      if (i == _formats.end()) {
 +              checked_set (_format, -1);
 +      } else {
 +              checked_set (_format, n);
 +      }
-       if (_film->format ()) {
-               _format_description->SetLabel (std_to_wx (_film->format()->description ()));
-       } else {
-               _format_description->SetLabel (wxT (""));
-       }
 +      
 -      if (_film->source_frame_rate()) {
 -              d << std_to_wx (FrameRateConversion (_film->source_frame_rate(), _film->dcp_frame_rate()).description);
++      setup_dcp_name ();
++      setup_scaling_description ();
 +}     
 +
 +void
 +FilmEditor::setup_length ()
 +{
 +      stringstream s;
 +      if (_film->video_frame_rate() > 0 && _film->video_length()) {
 +              s << _film->video_length() << " "
 +                << wx_to_std (_("frames")) << "; " << seconds_to_hms (_film->video_length() / _film->video_frame_rate());
 +      } else if (_film->video_length()) {
 +              s << _film->video_length() << " "
 +                << wx_to_std (_("frames"));
 +      } 
 +      _length->SetLabel (std_to_wx (s.str ()));
 +      if (_film->video_length()) {
 +              _trim_start->SetRange (0, _film->video_length());
 +              _trim_end->SetRange (0, _film->video_length());
 +      }
 +}     
 +
+ void
+ FilmEditor::setup_frame_rate_description ()
+ {
+       wxString d;
 -              if (_film->audio_stream() && _film->audio_stream()->sample_rate() != _film->target_audio_sample_rate ()) {
++      if (_film->video_frame_rate()) {
++              d << std_to_wx (FrameRateConversion (_film->video_frame_rate(), _film->dcp_frame_rate()).description);
+ #ifdef HAVE_SWRESAMPLE
 -                              _film->audio_stream()->sample_rate(),
++              if (_film->audio_frame_rate() != _film->target_audio_sample_rate ()) {
+                       d << wxString::Format (
+                               _("Audio will be resampled from %dHz to %dHz\n"),
++                              _film->audio_frame_rate(),
+                               _film->target_audio_sample_rate()
+                               );
+               } else {
+                       d << "\n";
+               }
+ #else
+               d << "\n";
+ #endif                
+       }
+       _frame_rate_description->SetLabel (d);
+ }
  
  /** Called when the format widget has been changed */
  void
@@@ -814,17 -865,12 +838,17 @@@ FilmEditor::dcp_content_type_changed (w
  void
  FilmEditor::set_film (shared_ptr<Film> f)
  {
 -      _film = f;
 -
+       set_things_sensitive (_film != 0);
 +      if (_film == f) {
 +              return;
 +      }
 +      
 +      _film = f;
 +
-       set_things_sensitive (_film != 0);
        if (_film) {
                _film->Changed.connect (bind (&FilmEditor::film_changed, this, _1));
 +              _film->ContentChanged.connect (bind (&FilmEditor::film_content_changed, this, _1, _2));
        }
  
        if (_film) {
        film_changed (Film::NAME);
        film_changed (Film::USE_DCI_NAME);
        film_changed (Film::CONTENT);
 -      film_changed (Film::TRUST_CONTENT_HEADER);
 +      film_changed (Film::TRUST_CONTENT_HEADERS);
        film_changed (Film::DCP_CONTENT_TYPE);
        film_changed (Film::FORMAT);
        film_changed (Film::CROP);
        film_changed (Film::SCALER);
        film_changed (Film::TRIM_START);
        film_changed (Film::TRIM_END);
 -      film_changed (Film::DCP_AB);
 -      film_changed (Film::CONTENT_AUDIO_STREAM);
 -      film_changed (Film::EXTERNAL_AUDIO);
 -      film_changed (Film::USE_CONTENT_AUDIO);
 +      film_changed (Film::AB);
        film_changed (Film::AUDIO_GAIN);
        film_changed (Film::AUDIO_DELAY);
 -      film_changed (Film::STILL_DURATION);
        film_changed (Film::WITH_SUBTITLES);
        film_changed (Film::SUBTITLE_OFFSET);
        film_changed (Film::SUBTITLE_SCALE);
        film_changed (Film::COLOUR_LUT);
        film_changed (Film::J2K_BANDWIDTH);
        film_changed (Film::DCI_METADATA);
 -      film_changed (Film::SIZE);
 -      film_changed (Film::LENGTH);
 -      film_changed (Film::CONTENT_AUDIO_STREAMS);
 -      film_changed (Film::SUBTITLE_STREAMS);
 -      film_changed (Film::SOURCE_FRAME_RATE);
        film_changed (Film::DCP_FRAME_RATE);
 +      film_changed (Film::AUDIO_MAPPING);
 +
 +      film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::SUBTITLE_STREAMS);
 +      film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::SUBTITLE_STREAM);
 +      film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::AUDIO_STREAMS);
 +      film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::AUDIO_STREAM);
  }
  
  /** Updates the sensitivity of lots of widgets to a given value.
@@@ -879,30 -928,30 +903,30 @@@ FilmEditor::set_things_sensitive (bool 
        _edit_dci_button->Enable (s);
        _format->Enable (s);
        _content->Enable (s);
 -      _trust_content_header->Enable (s);
 +      _trust_content_headers->Enable (s);
 +      _content->Enable (s);
        _left_crop->Enable (s);
        _right_crop->Enable (s);
        _top_crop->Enable (s);
        _bottom_crop->Enable (s);
        _filters_button->Enable (s);
        _scaler->Enable (s);
 -      _audio_stream->Enable (s);
 +      _ffmpeg_audio_stream->Enable (s);
        _dcp_content_type->Enable (s);
        _dcp_frame_rate->Enable (s);
        _trim_start->Enable (s);
        _trim_end->Enable (s);
 -      _dcp_ab->Enable (s);
 +      _ab->Enable (s);
        _colour_lut->Enable (s);
        _j2k_bandwidth->Enable (s);
        _audio_gain->Enable (s);
        _audio_gain_calculate_button->Enable (s);
        _show_audio->Enable (s);
        _audio_delay->Enable (s);
 -      _still_duration->Enable (s);
  
        setup_subtitle_control_sensitivity ();
 -      setup_audio_control_sensitivity ();
        setup_show_audio_sensitivity ();
 +      setup_content_button_sensitivity ();
  }
  
  /** Called when the `Edit filters' button has been clicked */
@@@ -949,6 -998,68 +973,24 @@@ FilmEditor::audio_delay_changed (wxComm
        _film->set_audio_delay (_audio_delay->GetValue ());
  }
  
 -wxControl *
 -FilmEditor::video_control (wxControl* c)
 -{
 -      _video_controls.push_back (c);
 -      return c;
 -}
 -
 -wxControl *
 -FilmEditor::still_control (wxControl* c)
 -{
 -      _still_controls.push_back (c);
 -      return c;
 -}
 -
 -void
 -FilmEditor::setup_visibility ()
 -{
 -      ContentType c = VIDEO;
 -
 -      if (_film) {
 -              c = _film->content_type ();
 -      }
 -
 -      for (list<wxControl*>::iterator i = _video_controls.begin(); i != _video_controls.end(); ++i) {
 -              (*i)->Show (c == VIDEO);
 -      }
 -
 -      for (list<wxControl*>::iterator i = _still_controls.begin(); i != _still_controls.end(); ++i) {
 -              (*i)->Show (c == STILL);
 -      }
 -
 -      setup_notebook_size ();
 -}
 -
+ void
+ FilmEditor::setup_notebook_size ()
+ {
+       _notebook->InvalidateBestSize ();
+       
+       _film_sizer->Layout ();
+       _film_sizer->SetSizeHints (_film_panel);
+       _video_sizer->Layout ();
+       _video_sizer->SetSizeHints (_video_panel);
+       _audio_sizer->Layout ();
+       _audio_sizer->SetSizeHints (_audio_panel);
+       _subtitle_sizer->Layout ();
+       _subtitle_sizer->SetSizeHints (_subtitle_panel);
+       _notebook->Fit ();
+       Fit ();
+ }
 -void
 -FilmEditor::still_duration_changed (wxCommandEvent &)
 -{
 -      if (!_film) {
 -              return;
 -      }
 -
 -      _film->set_still_duration (_still_duration->GetValue ());
 -}
 -
  void
  FilmEditor::trim_start_changed (wxCommandEvent &)
  {
@@@ -999,7 -1110,20 +1041,7 @@@ FilmEditor::audio_gain_calculate_button
  void
  FilmEditor::setup_formats ()
  {
 -      ContentType c = VIDEO;
 -
 -      if (_film) {
 -              c = _film->content_type ();
 -      }
 -      
 -      _formats.clear ();
 -
 -      vector<Format const *> fmt = Format::all ();
 -      for (vector<Format const *>::iterator i = fmt.begin(); i != fmt.end(); ++i) {
 -              if (c == VIDEO || (c == STILL && dynamic_cast<VariableFormat const *> (*i))) {
 -                      _formats.push_back (*i);
 -              }
 -      }
 +      _formats = Format::all ();
  
        _format->Clear ();
        for (vector<Format const *>::iterator i = _formats.begin(); i != _formats.end(); ++i) {
@@@ -1024,7 -1148,7 +1066,7 @@@ FilmEditor::setup_subtitle_control_sens
  {
        bool h = false;
        if (_generally_sensitive && _film) {
 -              h = !_film->subtitle_streams().empty();
 +              h = !_film->ffmpeg_subtitle_streams().empty();
        }
        
        _with_subtitles->Enable (h);
                j = _film->with_subtitles ();
        }
        
 -      _subtitle_stream->Enable (j);
 +      _ffmpeg_subtitle_stream->Enable (j);
        _subtitle_offset->Enable (j);
        _subtitle_scale->Enable (j);
  }
  
 -void
 -FilmEditor::setup_audio_control_sensitivity ()
 -{
 -      _use_content_audio->Enable (_generally_sensitive && _film && !_film->content_audio_streams().empty());
 -      _use_external_audio->Enable (_generally_sensitive);
 -      
 -      bool const source = _generally_sensitive && _use_content_audio->GetValue();
 -      bool const external = _generally_sensitive && _use_external_audio->GetValue();
 -
 -      _audio_stream->Enable (source);
 -      for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
 -              _external_audio[i]->Enable (external);
 -      }
 -}
 -
  void
  FilmEditor::use_dci_name_toggled (wxCommandEvent &)
  {
@@@ -1065,86 -1204,77 +1107,88 @@@ FilmEditor::edit_dci_button_clicked (wx
  void
  FilmEditor::setup_streams ()
  {
 -      _audio_stream->Clear ();
 -      vector<shared_ptr<AudioStream> > a = _film->content_audio_streams ();
 -      for (vector<shared_ptr<AudioStream> >::iterator i = a.begin(); i != a.end(); ++i) {
 -              shared_ptr<FFmpegAudioStream> ffa = dynamic_pointer_cast<FFmpegAudioStream> (*i);
 -              assert (ffa);
 -              _audio_stream->Append (std_to_wx (ffa->name()), new wxStringClientData (std_to_wx (ffa->to_string ())));
 +      if (!_film) {
 +              return;
 +      }
 +      
 +      _ffmpeg_audio_stream->Clear ();
 +      vector<FFmpegAudioStream> a = _film->ffmpeg_audio_streams ();
 +      for (vector<FFmpegAudioStream>::iterator i = a.begin(); i != a.end(); ++i) {
 +              _ffmpeg_audio_stream->Append (std_to_wx (i->name), new wxStringClientData (std_to_wx (boost::lexical_cast<string> (i->id))));
        }
        
 -      if (_film->use_content_audio() && _film->audio_stream()) {
 -              checked_set (_audio_stream, _film->audio_stream()->to_string());
 +      if (_film->ffmpeg_audio_stream()) {
 +              checked_set (_ffmpeg_audio_stream, boost::lexical_cast<string> (_film->ffmpeg_audio_stream()->id));
        }
  
 -      _subtitle_stream->Clear ();
 -      vector<shared_ptr<SubtitleStream> > s = _film->subtitle_streams ();
 -      for (vector<shared_ptr<SubtitleStream> >::iterator i = s.begin(); i != s.end(); ++i) {
 -              _subtitle_stream->Append (std_to_wx ((*i)->name()), new wxStringClientData (std_to_wx ((*i)->to_string ())));
 +      _ffmpeg_subtitle_stream->Clear ();
 +      vector<FFmpegSubtitleStream> s = _film->ffmpeg_subtitle_streams ();
 +      for (vector<FFmpegSubtitleStream>::iterator i = s.begin(); i != s.end(); ++i) {
 +              _ffmpeg_subtitle_stream->Append (std_to_wx (i->name), new wxStringClientData (std_to_wx (boost::lexical_cast<string> (i->id))));
        }
 -      if (_film->subtitle_stream()) {
 -              checked_set (_subtitle_stream, _film->subtitle_stream()->to_string());
 +      
 +      if (_film->ffmpeg_subtitle_stream()) {
 +              checked_set (_ffmpeg_subtitle_stream, boost::lexical_cast<string> (_film->ffmpeg_subtitle_stream()->id));
        } else {
 -              _subtitle_stream->SetSelection (wxNOT_FOUND);
 +              _ffmpeg_subtitle_stream->SetSelection (wxNOT_FOUND);
        }
  }
  
  void
 -FilmEditor::audio_stream_changed (wxCommandEvent &)
 +FilmEditor::ffmpeg_audio_stream_changed (wxCommandEvent &)
  {
        if (!_film) {
                return;
        }
  
 -      _film->set_content_audio_stream (
 -              audio_stream_factory (
 -                      string_client_data (_audio_stream->GetClientObject (_audio_stream->GetSelection ())),
 -                      Film::state_version
 -                      )
 -              );
 +      vector<FFmpegAudioStream> a = _film->ffmpeg_audio_streams ();
 +      vector<FFmpegAudioStream>::iterator i = a.begin ();
 +      string const s = string_client_data (_ffmpeg_audio_stream->GetClientObject (_ffmpeg_audio_stream->GetSelection ()));
 +      while (i != a.end() && lexical_cast<string> (i->id) != s) {
 +              ++i;
 +      }
 +
 +      if (i != a.end ()) {
 +              _film->set_ffmpeg_audio_stream (*i);
 +      }
  }
  
  void
 -FilmEditor::subtitle_stream_changed (wxCommandEvent &)
 +FilmEditor::ffmpeg_subtitle_stream_changed (wxCommandEvent &)
  {
        if (!_film) {
                return;
        }
  
 -      _film->set_subtitle_stream (
 -              subtitle_stream_factory (
 -                      string_client_data (_subtitle_stream->GetClientObject (_subtitle_stream->GetSelection ())),
 -                      Film::state_version
 -                      )
 -              );
 +      vector<FFmpegSubtitleStream> a = _film->ffmpeg_subtitle_streams ();
 +      vector<FFmpegSubtitleStream>::iterator i = a.begin ();
 +      string const s = string_client_data (_ffmpeg_subtitle_stream->GetClientObject (_ffmpeg_subtitle_stream->GetSelection ()));
 +      while (i != a.end() && lexical_cast<string> (i->id) != s) {
 +              ++i;
 +      }
 +
 +      if (i != a.end ()) {
 +              _film->set_ffmpeg_subtitle_stream (*i);
 +      }
  }
  
  void
  FilmEditor::setup_audio_details ()
  {
 -      if (!_film->content_audio_stream()) {
 +      if (!_film->ffmpeg_audio_stream()) {
                _audio->SetLabel (wxT (""));
        } else {
-               stringstream s;
+               wxString s;
 -              if (_film->audio_stream()->channels() == 1) {
 +              if (_film->audio_channels() == 1) {
-                       s << wx_to_std (_("1 channel"));
+                       s << _("1 channel");
                } else {
-                       s << _film->audio_channels() << " " << wx_to_std (_("channels"));
 -                      s << _film->audio_stream()->channels () << " " << _("channels");
++                      s << _film->audio_channels() << " " << _("channels");
                }
-               s << ", " << _film->audio_frame_rate() << wx_to_std (_("Hz"));
-               _audio->SetLabel (std_to_wx (s.str ()));
 -              s << ", " << _film->audio_stream()->sample_rate() << _("Hz");
++              s << ", " << _film->audio_frame_rate() << _("Hz");
+               _audio->SetLabel (s);
        }
+       setup_notebook_size ();
  }
  
  void
@@@ -1153,6 -1283,23 +1197,6 @@@ FilmEditor::active_jobs_changed (bool a
        set_things_sensitive (!a);
  }
  
 -void
 -FilmEditor::use_audio_changed (wxCommandEvent &)
 -{
 -      _film->set_use_content_audio (_use_content_audio->GetValue());
 -}
 -
 -void
 -FilmEditor::external_audio_changed (wxCommandEvent &)
 -{
 -      vector<string> a;
 -      for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
 -              a.push_back (wx_to_std (_external_audio[i]->GetPath()));
 -      }
 -
 -      _film->set_external_audio (a);
 -}
 -
  void
  FilmEditor::setup_dcp_name ()
  {
@@@ -1185,7 -1332,7 +1229,7 @@@ FilmEditor::best_dcp_frame_rate_clicke
                return;
        }
        
 -      _film->set_dcp_frame_rate (best_dcp_frame_rate (_film->source_frame_rate ()));
 +      _film->set_dcp_frame_rate (best_dcp_frame_rate (_film->video_frame_rate ()));
  }
  
  void
@@@ -1194,159 -1341,57 +1238,214 @@@ FilmEditor::setup_show_audio_sensitivit
        _show_audio->Enable (_film && _film->has_audio ());
  }
  
 -              _film->size().width, _film->size().height,
 -              float (_film->size().width) / _film->size().height
 +void
 +FilmEditor::setup_content ()
 +{
 +      string selected_summary;
 +      int const s = _content->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
 +      if (s != -1) {
 +              selected_summary = wx_to_std (_content->GetItemText (s));
 +      }
 +      
 +      _content->DeleteAllItems ();
 +
 +      ContentList content = _film->content ();
 +      for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
 +              int const t = _content->GetItemCount ();
 +              _content->InsertItem (t, std_to_wx ((*i)->summary ()));
 +              if ((*i)->summary() == selected_summary) {
 +                      _content->SetItemState (t, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
 +              }
 +      }
 +
 +      if (selected_summary.empty () && !content.empty ()) {
 +              /* Select the first item of content if non was selected before */
 +              _content->SetItemState (0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
 +      }
 +}
 +
 +void
 +FilmEditor::content_add_clicked (wxCommandEvent &)
 +{
 +      wxFileDialog* d = new wxFileDialog (this);
 +      int const r = d->ShowModal ();
 +      d->Destroy ();
 +
 +      if (r != wxID_OK) {
 +              return;
 +      }
 +
 +      boost::filesystem::path p (wx_to_std (d->GetPath()));
 +
 +      if (ImageMagickContent::valid_file (p)) {
 +              _film->add_content (shared_ptr<ImageMagickContent> (new ImageMagickContent (p)));
 +      } else if (SndfileContent::valid_file (p)) {
 +              _film->add_content (shared_ptr<SndfileContent> (new SndfileContent (p)));
 +      } else {
 +              _film->add_content (shared_ptr<FFmpegContent> (new FFmpegContent (p)));
 +      }
 +      
 +}
 +
 +void
 +FilmEditor::content_remove_clicked (wxCommandEvent &)
 +{
 +      shared_ptr<Content> c = selected_content ();
 +      if (c) {
 +              _film->remove_content (c);
 +      }
 +}
 +
 +void
 +FilmEditor::content_activated (wxListEvent& ev)
 +{
 +      ContentList c = _film->content ();
 +      assert (ev.GetIndex() >= 0 && size_t (ev.GetIndex()) < c.size ());
 +
 +      edit_content (c[ev.GetIndex()]);
 +}
 +
 +void
 +FilmEditor::content_edit_clicked (wxCommandEvent &)
 +{
 +      shared_ptr<Content> c = selected_content ();
 +      if (!c) {
 +              return;
 +      }
 +
 +      edit_content (c);
 +}
 +
 +void
 +FilmEditor::edit_content (shared_ptr<Content> c)
 +{
 +      shared_ptr<ImageMagickContent> im = dynamic_pointer_cast<ImageMagickContent> (c);
 +      if (im) {
 +              ImageMagickContentDialog* d = new ImageMagickContentDialog (this, im);
 +              d->ShowModal ();
 +              d->Destroy ();
 +
 +              im->set_video_length (d->video_length() * 24);
 +      }
 +}
 +
 +void
 +FilmEditor::content_earlier_clicked (wxCommandEvent &)
 +{
 +      shared_ptr<Content> c = selected_content ();
 +      if (c) {
 +              _film->move_content_earlier (c);
 +      }
 +}
 +
 +void
 +FilmEditor::content_later_clicked (wxCommandEvent &)
 +{
 +      shared_ptr<Content> c = selected_content ();
 +      if (c) {
 +              _film->move_content_later (c);
 +      }
 +}
 +
 +void
 +FilmEditor::content_selection_changed (wxListEvent &)
 +{
 +        setup_content_button_sensitivity ();
 +      setup_content_information ();
 +}
 +
 +void
 +FilmEditor::setup_content_information ()
 +{
 +      shared_ptr<Content> c = selected_content ();
 +      if (!c) {
 +              _content_information->SetValue (wxT (""));
 +              return;
 +      }
 +
 +      _content_information->SetValue (std_to_wx (c->information ()));
 +}
 +
 +void
 +FilmEditor::setup_content_button_sensitivity ()
 +{
 +        _content_add->Enable (_generally_sensitive);
 +
 +      shared_ptr<Content> selection = selected_content ();
 +
 +        _content_edit->Enable (selection && _generally_sensitive && dynamic_pointer_cast<ImageMagickContent> (selection));
 +        _content_remove->Enable (selection && _generally_sensitive);
 +        _content_earlier->Enable (selection && _generally_sensitive);
 +        _content_later->Enable (selection && _generally_sensitive);
 +}
 +
 +shared_ptr<Content>
 +FilmEditor::selected_content ()
 +{
 +      int const s = _content->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
 +      if (s == -1) {
 +              return shared_ptr<Content> ();
 +      }
 +
 +      ContentList c = _film->content ();
 +      if (s < 0 || size_t (s) >= c.size ()) {
 +              return shared_ptr<Content> ();
 +      }
 +      
 +      return c[s];
 +}
++
+ void
+ FilmEditor::setup_scaling_description ()
+ {
+       wxString d;
+       int lines = 0;
+       d << wxString::Format (
+               _("Original video is %dx%d (%.2f:1)\n"),
 -              libdcp::Size const cropped = _film->cropped_size (_film->size ());
++              _film->video_size().width, _film->video_size().height,
++              float (_film->video_size().width) / _film->video_size().height
+               );
+       ++lines;
+       Crop const crop = _film->crop ();
+       if (crop.left || crop.right || crop.top || crop.bottom) {
++              libdcp::Size const cropped = _film->cropped_size (_film->video_size ());
+               d << wxString::Format (
+                       _("Cropped to %dx%d (%.2f:1)\n"),
+                       cropped.width, cropped.height,
+                       float (cropped.width) / cropped.height
+                       );
+               ++lines;
+       }
+       Format const * format = _film->format ();
+       if (format) {
+               int const padding = format->dcp_padding (_film);
+               libdcp::Size scaled = format->dcp_size ();
+               scaled.width -= padding * 2;
+               d << wxString::Format (
+                       _("Scaled to %dx%d (%.2f:1)\n"),
+                       scaled.width, scaled.height,
+                       float (scaled.width) / scaled.height
+                       );
+               ++lines;
+               if (padding) {
+                       d << wxString::Format (
+                               _("Padded with black to %dx%d (%.2f:1)\n"),
+                               format->dcp_size().width, format->dcp_size().height,
+                               float (format->dcp_size().width) / format->dcp_size().height
+                               );
+                       ++lines;
+               }
+       }
+       for (int i = lines; i < 4; ++i) {
+               d << " \n";
+       }
+       _scaling_description->SetLabel (d);
+ }
diff --combined src/wx/film_editor.h
index bc6b045c409999ae073d518487f88d8b77623c7b,7123620d3753156b0d37382f4945b3fa0f123f7a..0f3d8eb507a5eabc0c6e316f81fd7b03c4f6924c
@@@ -16,7 -16,7 +16,7 @@@
      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  
  */
 -
 + 
  /** @file src/film_editor.h
   *  @brief A wx widget to edit a film's metadata, and perform various functions.
   */
  #include "lib/film.h"
  
  class wxNotebook;
 +class wxListCtrl;
 +class wxListEvent;
  class Film;
  class AudioDialog;
 +class AudioMappingView;
  
  /** @class FilmEditor
   *  @brief A wx widget to edit a film's metadata, and perform various functions.
@@@ -44,12 -41,12 +44,12 @@@ public
        FilmEditor (boost::shared_ptr<Film>, wxWindow *);
  
        void set_film (boost::shared_ptr<Film>);
 -      void setup_visibility ();
  
        boost::signals2::signal<void (std::string)> FileChanged;
  
  private:
        void make_film_panel ();
 +      void make_content_panel ();
        void make_video_panel ();
        void make_audio_panel ();
        void make_subtitle_panel ();
        void right_crop_changed (wxCommandEvent &);
        void top_crop_changed (wxCommandEvent &);
        void bottom_crop_changed (wxCommandEvent &);
 -      void content_changed (wxCommandEvent &);
 -      void trust_content_header_changed (wxCommandEvent &);
 +      void trust_content_headers_changed (wxCommandEvent &);
 +      void content_selection_changed (wxListEvent &);
 +      void content_activated (wxListEvent &);
 +      void content_add_clicked (wxCommandEvent &);
 +      void content_remove_clicked (wxCommandEvent &);
 +      void content_edit_clicked (wxCommandEvent &);
 +      void content_earlier_clicked (wxCommandEvent &);
 +      void content_later_clicked (wxCommandEvent &);
 +      void imagemagick_video_length_changed (wxCommandEvent &);
        void format_changed (wxCommandEvent &);
        void trim_start_changed (wxCommandEvent &);
        void trim_end_changed (wxCommandEvent &);
        void dcp_content_type_changed (wxCommandEvent &);
 -      void dcp_ab_toggled (wxCommandEvent &);
 +      void ab_toggled (wxCommandEvent &);
        void scaler_changed (wxCommandEvent &);
        void audio_gain_changed (wxCommandEvent &);
        void audio_gain_calculate_button_clicked (wxCommandEvent &);
        void subtitle_scale_changed (wxCommandEvent &);
        void colour_lut_changed (wxCommandEvent &);
        void j2k_bandwidth_changed (wxCommandEvent &);
 -      void still_duration_changed (wxCommandEvent &);
 -      void audio_stream_changed (wxCommandEvent &);
 -      void subtitle_stream_changed (wxCommandEvent &);
 -      void use_audio_changed (wxCommandEvent &);
 -      void external_audio_changed (wxCommandEvent &);
 +      void ffmpeg_audio_stream_changed (wxCommandEvent &);
 +      void ffmpeg_subtitle_stream_changed (wxCommandEvent &);
        void dcp_frame_rate_changed (wxCommandEvent &);
        void best_dcp_frame_rate_clicked (wxCommandEvent &);
 +      void edit_filters_clicked (wxCommandEvent &);
  
        /* Handle changes to the model */
        void film_changed (Film::Property);
 -
 -      /* Button clicks */
 -      void edit_filters_clicked (wxCommandEvent &);
 +      void film_content_changed (boost::weak_ptr<Content>, int);
  
        void set_things_sensitive (bool);
        void setup_formats ();
        void setup_subtitle_control_sensitivity ();
 -      void setup_audio_control_sensitivity ();
        void setup_streams ();
        void setup_audio_details ();
        void setup_dcp_name ();
        void setup_show_audio_sensitivity ();
-       void setup_content_button_sensitivity ();
-       void setup_length ();
+       void setup_scaling_description ();
+       void setup_notebook_size ();
+       void setup_frame_rate_description ();
 +      void setup_content ();
 +      void setup_format ();
++      void setup_length ();
 +      void setup_content_information ();
++      void setup_content_button_sensitivity ();
        
 -      wxControl* video_control (wxControl *);
 -      wxControl* still_control (wxControl *);
 -
        void active_jobs_changed (bool);
 +      boost::shared_ptr<Content> selected_content ();
 +      void edit_content (boost::shared_ptr<Content>);
  
        wxNotebook* _notebook;
        wxPanel* _film_panel;
        wxSizer* _film_sizer;
 +      wxPanel* _content_panel;
 +      wxSizer* _content_sizer;
        wxPanel* _video_panel;
        wxSizer* _video_sizer;
        wxPanel* _audio_panel;
        wxTextCtrl* _name;
        wxStaticText* _dcp_name;
        wxCheckBox* _use_dci_name;
 +      wxListCtrl* _content;
 +      wxButton* _content_add;
 +      wxButton* _content_remove;
 +      wxButton* _content_edit;
 +      wxButton* _content_earlier;
 +      wxButton* _content_later;
 +      wxTextCtrl* _content_information;
        wxButton* _edit_dci_button;
 -      /** The Film's format */
        wxChoice* _format;
 -      /** The Film's content file */
 -      wxFilePickerCtrl* _content;
 -      wxCheckBox* _trust_content_header;
 -      /** The Film's left crop */
 +      wxStaticText* _format_description;
 +      wxCheckBox* _trust_content_headers;
+       wxStaticText* _scaling_description;
        wxSpinCtrl* _left_crop;
 -      /** The Film's right crop */
        wxSpinCtrl* _right_crop;
 -      /** The Film's top crop */
        wxSpinCtrl* _top_crop;
 -      /** The Film's bottom crop */
        wxSpinCtrl* _bottom_crop;
 -      /** Currently-applied filters */
        wxStaticText* _filters;
 -      /** Button to open the filters dialogue */
        wxButton* _filters_button;
 -      /** The Film's scaler */
        wxChoice* _scaler;
 -      wxRadioButton* _use_content_audio;
 -      wxChoice* _audio_stream;
 -      wxRadioButton* _use_external_audio;
 -      wxFilePickerCtrl* _external_audio[MAX_AUDIO_CHANNELS];
 -      /** The Film's audio gain */
        wxSpinCtrl* _audio_gain;
 -      /** A button to open the gain calculation dialogue */
        wxButton* _audio_gain_calculate_button;
        wxButton* _show_audio;
 -      /** The Film's audio delay */
        wxSpinCtrl* _audio_delay;
 +      wxChoice* _ffmpeg_audio_stream;
 +      AudioMappingView* _audio_mapping;
        wxCheckBox* _with_subtitles;
 -      wxChoice* _subtitle_stream;
 +      wxChoice* _ffmpeg_subtitle_stream;
        wxSpinCtrl* _subtitle_offset;
        wxSpinCtrl* _subtitle_scale;
        wxChoice* _colour_lut;
        wxSpinCtrl* _j2k_bandwidth;
 -      /** The Film's DCP content type */
        wxChoice* _dcp_content_type;
 -      /** The Film's source frame rate */
 -      wxStaticText* _source_frame_rate;
        wxChoice* _dcp_frame_rate;
        wxButton* _best_dcp_frame_rate;
        wxStaticText* _frame_rate_description;
 -      /** The Film's original size */
 -      wxStaticText* _original_size;
 -      /** The Film's length */
        wxStaticText* _length;
        /** The Film's audio details */
        wxStaticText* _audio;
 -      /** The Film's duration for still sources */
 -      wxSpinCtrl* _still_duration;
  
        wxSpinCtrl* _trim_start;
        wxSpinCtrl* _trim_end;
        /** Selector to generate an A/B comparison DCP */
 -      wxCheckBox* _dcp_ab;
 -
 -      std::list<wxControl*> _video_controls;
 -      std::list<wxControl*> _still_controls;
 +      wxCheckBox* _ab;
  
        std::vector<Format const *> _formats;
  
diff --combined src/wx/film_viewer.cc
index bd56efd579055347dc0b5522061a98803188d915,4dca5cad85223f17e26ea1cc541fa76c0c2ea76b..f8373d3fdc1f31655d9bea599396c24c4c880a1c
  #include "lib/format.h"
  #include "lib/util.h"
  #include "lib/job_manager.h"
 -#include "lib/options.h"
  #include "lib/subtitle.h"
  #include "lib/image.h"
  #include "lib/scaler.h"
  #include "lib/exceptions.h"
  #include "lib/examine_content_job.h"
  #include "lib/filter.h"
 +#include "lib/player.h"
 +#include "lib/video_content.h"
 +#include "lib/ffmpeg_content.h"
 +#include "lib/imagemagick_content.h"
  #include "film_viewer.h"
  #include "wx_util.h"
  #include "video_decoder.h"
@@@ -48,7 -45,6 +48,7 @@@ using std::max
  using std::cout;
  using std::list;
  using boost::shared_ptr;
 +using boost::dynamic_pointer_cast;
  using libdcp::Size;
  
  FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
@@@ -58,7 -54,6 +58,6 @@@
        , _play_button (new wxToggleButton (this, wxID_ANY, _("Play")))
        , _display_frame_x (0)
        , _got_frame (false)
-       , _clear_required (false)
  {
        _panel->SetDoubleBuffered (true);
  #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
@@@ -101,23 -96,43 +100,23 @@@ FilmViewer::film_changed (Film::Propert
                break;
        case Film::CONTENT:
        {
 -              DecodeOptions o;
 -              o.decode_audio = false;
 -              o.decode_subtitles = true;
 -              o.video_sync = false;
 -
 -              try {
 -                      _decoders = decoder_factory (_film, o);
 -              } catch (StringError& e) {
 -                      error_dialog (this, wxString::Format (_("Could not open content file (%s)"), std_to_wx(e.what()).data()));
 -                      return;
 -              }
 -              
 -              if (_decoders.video == 0) {
 -                      break;
 -              }
 -              _decoders.video->Video.connect (bind (&FilmViewer::process_video, this, _1, _2, _3));
 -              _decoders.video->OutputChanged.connect (boost::bind (&FilmViewer::decoder_changed, this));
 -              _decoders.video->set_subtitle_stream (_film->subtitle_stream());
                calculate_sizes ();
                get_frame ();
                _panel->Refresh ();
 -              _slider->Show (_film->content_type() == VIDEO);
 -              _play_button->Show (_film->content_type() == VIDEO);
                _v_sizer->Layout ();
                break;
        }
        case Film::WITH_SUBTITLES:
        case Film::SUBTITLE_OFFSET:
        case Film::SUBTITLE_SCALE:
 +              raw_to_display ();
 +              _panel->Refresh ();
 +              _panel->Update ();
 +              break;
        case Film::SCALER:
        case Film::FILTERS:
 -              update_from_raw ();
 -              break;
 -      case Film::SUBTITLE_STREAM:
 -              if (_decoders.video) {
 -                      _decoders.video->set_subtitle_stream (_film->subtitle_stream ());
 -              }
 +      case Film::CROP:
 +              update_from_decoder ();
                break;
        default:
                break;
@@@ -130,22 -145,13 +129,22 @@@ FilmViewer::set_film (shared_ptr<Film> 
        if (_film == f) {
                return;
        }
 -      
 +
        _film = f;
  
        if (!_film) {
                return;
        }
  
 +      _player = f->player ();
 +      _player->disable_audio ();
 +      _player->disable_video_sync ();
 +      /* Don't disable subtitles here as we may need them, and it's nice to be able to turn them
 +         on and off without needing obtain a new Player.
 +      */
 +      
 +      _player->Video.connect (bind (&FilmViewer::process_video, this, _1, _2, _3));
 +      
        _film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
  
        film_changed (Film::CONTENT);
        film_changed (Film::WITH_SUBTITLES);
        film_changed (Film::SUBTITLE_OFFSET);
        film_changed (Film::SUBTITLE_SCALE);
 -      film_changed (Film::SUBTITLE_STREAM);
  }
  
  void
 -FilmViewer::decoder_changed ()
 +FilmViewer::update_from_decoder ()
  {
 -      if (_decoders.video == 0 || _decoders.video->seek_to_last ()) {
 +      if (!_player || _player->seek_to_last ()) {
                return;
        }
  
  void
  FilmViewer::timer (wxTimerEvent &)
  {
 -      if (!_film || !_decoders.video) {
 +      if (!_player) {
                return;
        }
        
  
        get_frame ();
  
 -      if (_film->length()) {
 -              int const new_slider_position = 4096 * _decoders.video->last_source_time() / (_film->length().get() / _film->source_frame_rate());
 +      if (_film->video_length()) {
 +              int const new_slider_position = 4096 * _player->last_video_time() / (_film->video_length() / _film->video_frame_rate());
                if (new_slider_position != _slider->GetValue()) {
                        _slider->SetValue (new_slider_position);
                }
@@@ -193,11 -200,6 +192,6 @@@ FilmViewer::paint_panel (wxPaintEvent &
  {
        wxPaintDC dc (_panel);
  
-       if (_clear_required) {
-               dc.Clear ();
-               _clear_required = false;
-       }
        if (!_display_frame || !_film || !_out_size.width || !_out_size.height) {
                dc.Clear ();
                return;
                wxBitmap sub_bitmap (sub);
                dc.DrawBitmap (sub_bitmap, _display_sub_position.x, _display_sub_position.y);
        }
+       if (_film_size.width < _panel_size.width) {
+               wxPen p (GetBackgroundColour ());
+               wxBrush b (GetBackgroundColour ());
+               dc.SetPen (p);
+               dc.SetBrush (b);
+               dc.DrawRectangle (_film_size.width, 0, _panel_size.width - _film_size.width, _panel_size.height);
+       }
+       if (_film_size.height < _panel_size.height) {
+               wxPen p (GetBackgroundColour ());
+               wxBrush b (GetBackgroundColour ());
+               dc.SetPen (p);
+               dc.SetBrush (b);
+               dc.DrawRectangle (0, _film_size.height, _panel_size.width, _panel_size.height - _film_size.height);
+       }               
  }
  
  
  void
  FilmViewer::slider_moved (wxScrollEvent &)
  {
 -      if (!_film || !_film->length() || !_decoders.video) {
 +      if (!_film || !_player) {
                return;
        }
 -      
 -      if (_decoders.video->seek (_slider->GetValue() * _film->length().get() / (4096 * _film->source_frame_rate()))) {
 +
 +      if (_player->seek (_slider->GetValue() * _film->video_length() / (4096 * _film->video_frame_rate()))) {
                return;
        }
        
@@@ -267,12 -285,7 +277,7 @@@ FilmViewer::raw_to_display (
                return;
        }
  
-       libdcp::Size old_size;
-       if (_display_frame) {
-               old_size = _display_frame->size();
-       }
 -      boost::shared_ptr<Image> input = _raw_frame;
 +      shared_ptr<Image> input = _raw_frame;
  
        pair<string, string> const s = Filter::ffmpeg_strings (_film->filters());
        if (!s.second.empty ()) {
        /* Get a compacted image as we have to feed it to wxWidgets */
        _display_frame = input->scale_and_convert_to_rgb (_film_size, 0, _film->scaler(), false);
  
-       if (old_size != _display_frame->size()) {
-               _clear_required = true;
-       }
        if (_raw_sub) {
  
                /* Our output is already cropped by the decoder, so we need to account for that
                   when working out the scale that we are applying.
                */
  
 -              Size const cropped_size = _film->cropped_size (_film->size ());
 +              Size const cropped_size = _film->cropped_size (_film->video_size ());
  
                Rect tx = subtitle_transformed_area (
                        float (_film_size.width) / cropped_size.width,
  void
  FilmViewer::calculate_sizes ()
  {
 -      if (!_film) {
 +      if (!_film || !_player) {
                return;
        }
  
@@@ -361,7 -370,7 +362,7 @@@ FilmViewer::check_play_state (
        }
        
        if (_play_button->GetValue()) {
 -              _timer.Start (1000 / _film->source_frame_rate());
 +              _timer.Start (1000 / _film->video_frame_rate());
        } else {
                _timer.Stop ();
        }
@@@ -378,24 -387,21 +379,24 @@@ FilmViewer::process_video (shared_ptr<I
        _got_frame = true;
  }
  
 +/** Get a new _raw_frame from the decoder and then do
 + *  raw_to_display ().
 + */
  void
  FilmViewer::get_frame ()
  {
        /* Clear our raw frame in case we don't get a new one */
        _raw_frame.reset ();
  
 -      if (_decoders.video == 0) {
 +      if (!_player) {
                _display_frame.reset ();
                return;
        }
 -      
 +
        try {
                _got_frame = false;
                while (!_got_frame) {
 -                      if (_decoders.video->pass ()) {
 +                      if (_player->pass ()) {
                                /* We didn't get a frame before the decoder gave up,
                                   so clear our display frame.
                                */
diff --combined src/wx/film_viewer.h
index 22f44370381836acca1aeb666deb03035ef2cb9a,f89269d2b32c68ebe6762fbc64d51116bdf431a4..0f7b142b50f55630b04dabad29f41550481336c5
@@@ -23,6 -23,7 +23,6 @@@
  
  #include <wx/wx.h>
  #include "lib/film.h"
 -#include "lib/decoder_factory.h"
  
  class wxToggleButton;
  class FFmpegPlayer;
@@@ -32,25 -33,6 +32,25 @@@ class Subtitle
  
  /** @class FilmViewer
   *  @brief A wx widget to view a preview of a Film.
 + *
 + *  The film takes the following path through the viewer:
 + *
 + *  1.  get_frame() asks our _player to decode some data.  If it does, process_video()
 + *      will be called.
 + *
 + *  2.  process_video() takes the image and subtitle from the decoder (_raw_frame and _raw_sub)
 + *      and calls raw_to_display().
 + * 
 + *  3.  raw_to_display() copies _raw_frame to _display_frame, processing it and scaling it.
 + *
 + *  4.  calling _panel->Refresh() and _panel->Update() results in paint_panel() being called;
 + *      this creates frame_bitmap from _display_frame and blits it to the display.  It also
 + *      blits the subtitle, if required.
 + *
 + * update_from_decoder() asks the player to re-emit its current frame on the next pass(), and then
 + * starts from step #1.
 + *
 + * update_from_raw() starts at step #3, then calls _panel->Refresh and _panel->Update.
   */
  class FilmViewer : public wxPanel
  {
@@@ -70,13 -52,12 +70,13 @@@ private
        void calculate_sizes ();
        void check_play_state ();
        void update_from_raw ();
 -      void decoder_changed ();
 +      void update_from_decoder ();
        void raw_to_display ();
        void get_frame ();
        void active_jobs_changed (bool);
  
        boost::shared_ptr<Film> _film;
 +      boost::shared_ptr<Player> _player;
  
        wxSizer* _v_sizer;
        wxPanel* _panel;
@@@ -84,6 -65,7 +84,6 @@@
        wxToggleButton* _play_button;
        wxTimer _timer;
  
 -      Decoders _decoders;
        boost::shared_ptr<Image> _raw_frame;
        boost::shared_ptr<Subtitle> _raw_sub;
        boost::shared_ptr<Image> _display_frame;
@@@ -98,6 -80,4 +98,4 @@@
        libdcp::Size _film_size;
        /** Size of the panel that we have available */
        libdcp::Size _panel_size;
-       bool _clear_required;
  };
diff --combined wscript
index a85f3bf9cde08424a60ba5ccd766d361aa929687,f7c6964335052cc10eed37819899d86dcbefd0a2..829a9e8341a7fb86a29de9fbb1daf1ebaf61bcc5
+++ b/wscript
@@@ -37,6 -37,7 +37,7 @@@ def configure(conf)
      else:
          conf.env.append_value('CXXFLAGS', '-DDVDOMATIC_POSIX')
          conf.env.append_value('CXXFLAGS', '-DPOSIX_LOCALE_PREFIX="%s/share/locale"' % conf.env['PREFIX'])
+         conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dvdomatic"' % conf.env['PREFIX'])
          boost_lib_suffix = ''
          boost_thread = 'boost_thread'
          conf.env.append_value('LINKFLAGS', '-pthread')
@@@ -55,7 -56,6 +56,7 @@@
  
      if not conf.options.static:
          conf.check_cfg(package = 'libdcp', atleast_version = '0.41', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
 +        conf.check_cfg(package = 'libcxml', atleast_version = '0.01', args = '--cflags --libs', uselib_store = 'CXML', mandatory = True)
          conf.check_cfg(package = 'libavformat', args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = True)
          conf.check_cfg(package = 'libavfilter', args = '--cflags --libs', uselib_store = 'AVFILTER', mandatory = True)
          conf.check_cfg(package = 'libavcodec', args = '--cflags --libs', uselib_store = 'AVCODEC', mandatory = True)
@@@ -72,8 -72,6 +73,8 @@@
          conf.env.HAVE_DCP = 1
          conf.env.STLIB_DCP = ['dcp', 'asdcp-libdcp', 'kumu-libdcp']
          conf.env.LIB_DCP = ['glibmm-2.4', 'xml++-2.6', 'ssl', 'crypto', 'bz2']
 +        conf.env.HAVE_CXML = 1
 +        conf.env.STLIB_CXML = ['cxml']
          conf.env.HAVE_AVFORMAT = 1
          conf.env.STLIB_AVFORMAT = ['avformat']
          conf.env.HAVE_AVFILTER = 1
@@@ -234,6 -232,9 +235,9 @@@ def build(bld)
      for r in ['22x22', '32x32', '48x48', '64x64', '128x128']:
          bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dvdomatic.png' % r)
  
+     if not bld.env.TARGET_WINDOWS:
+         bld.install_files('${PREFIX}/share/dvdomatic', 'icons/taskbar_icon.png')
      bld.add_post_fun(post)
  
  def dist(ctx):