#include <iostream>
#include "format.h"
#include "film.h"
+#include "playlist.h"
#include "i18n.h"
{
/// 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")
));
}
* @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
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)
{
}
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 */
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
/** @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);
/** 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;
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;
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%"
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"
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"
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"
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."
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"
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"
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)"
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"
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)"
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"
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)"
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"
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"
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."
msgid "Transitional"
msgstr "Transitional"
- #: src/lib/job.cc:95
+ #: src/lib/job.cc:100
msgid "Unknown error"
msgstr "Error desconocido"
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"
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"
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"
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"
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"
#. / 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"
#: 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"
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"
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"
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"
msgid "A/B transcode %1"
msgstr "Transcodage A/B %1"
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
msgid "Academy"
msgstr "Academy"
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 ""
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"
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"
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"
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"
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"
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"
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é"
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"
msgid "remaining"
msgstr "restant"
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
msgid "sRGB"
msgstr "sRGB"
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"
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"
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"
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"
msgid "A/B transcode %1"
msgstr "Transcodifica A/B %1"
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
msgid "Academy"
msgstr "Academy"
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 ""
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"
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"
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"
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 ""
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"
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"
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"
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"
msgid "remaining"
msgstr "restano"
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
msgid "sRGB"
msgstr "sRGB"
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"
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"
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"
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"
msgid "A/B transcode %1"
msgstr "A/B konvertera %1"
- #: src/lib/format.cc:95
+ #: src/lib/format.cc:91
msgid "Academy"
msgstr "Academy"
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"
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"
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"
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"
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)"
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"
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"
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"
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"
msgid "remaining"
msgstr "återstående tid"
- #: src/lib/util.cc:497
+ #: src/lib/util.cc:498
msgid "sRGB"
msgstr "sRGB"
#: 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"
#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;
Filter::setup_filters ();
SoundProcessor::setup_sound_processors ();
- ui_thread = this_thread::get_id ();
+ ui_thread = boost::this_thread::get_id ();
}
#ifdef DVDOMATIC_WINDOWS
* @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);
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.
*/
, _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 ());
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 ());
}
}
+/** 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 ()
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);
}
}
}
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 ());
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 {
*/
#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;
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);
}
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 ();
_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);
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
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;
}
#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>
#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"
#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;
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
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 ();
_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
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);
}
_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);
}
_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 */
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
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.
_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 */
_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 &)
{
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) {
{
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 &)
{
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
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 ()
{
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
_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);
+ }
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.
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;
#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"
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)
, _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
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;
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);
}
{
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;
}
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;
}
}
if (_play_button->GetValue()) {
- _timer.Start (1000 / _film->source_frame_rate());
+ _timer.Start (1000 / _film->video_frame_rate());
} else {
_timer.Stop ();
}
_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.
*/
#include <wx/wx.h>
#include "lib/film.h"
-#include "lib/decoder_factory.h"
class wxToggleButton;
class FFmpegPlayer;
/** @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
{
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;
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;
libdcp::Size _film_size;
/** Size of the panel that we have available */
libdcp::Size _panel_size;
-
- bool _clear_required;
};
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')
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)
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
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):