summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-01-05 09:37:57 +0000
committerCarl Hetherington <cth@carlh.net>2017-01-05 09:37:57 +0000
commitc8be0644833dce6ff39202430bba0ab358f3e096 (patch)
tree1007061e5aac388825260ad1c016e8efd6f43919 /src
parent23690fa77d69f841569b7b7e03feb55db34622bb (diff)
parent736f9d8154080ea5837b31af623ef863eea1a7c5 (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src')
-rw-r--r--src/lib/content.cc2
-rw-r--r--src/lib/dcpomatic_time.h17
-rw-r--r--src/lib/ffmpeg.cc2
-rw-r--r--src/lib/film.cc2
-rw-r--r--src/lib/po/fr_FR.po12
-rw-r--r--src/tools/po/fr_FR.po8
-rw-r--r--src/wx/about_dialog.cc5
-rw-r--r--src/wx/film_viewer.h3
-rw-r--r--src/wx/po/fr_FR.po28
-rw-r--r--src/wx/timing_panel.cc10
10 files changed, 47 insertions, 42 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index b5bae69b6..942e9e533 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -327,7 +327,7 @@ Content::reel_split_points () const
{
list<DCPTime> t;
/* XXX: this is questionable; perhaps the position itself should be forced to be on a frame boundary */
- t.push_back (position().round_up (film()->video_frame_rate()));
+ t.push_back (position().ceil (film()->video_frame_rate()));
return t;
}
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index 893bce257..16d93ca28 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -118,10 +118,12 @@ public:
* at some sampling rate.
* @param r Sampling rate.
*/
- Time<S, O> round_up (float r) const {
- Type const n = llrintf (HZ / r);
- Type const a = _t + n - 1;
- return Time<S, O> (a - (a % n));
+ Time<S, O> ceil (float r) const {
+ return Time<S, O> (llrint (HZ * frames_ceil(r) / double(r)));
+ }
+
+ Time<S, O> floor (float r) const {
+ return Time<S, O> (llrint (HZ * frames_floor(r) / double(r)));
}
double seconds () const {
@@ -143,7 +145,7 @@ public:
template <typename T>
int64_t frames_floor (T r) const {
- return floor (_t * r / HZ);
+ return ::floor (_t * r / HZ);
}
template <typename T>
@@ -152,7 +154,7 @@ public:
the calculation will round down before we get the chance
to ceil().
*/
- return ceil (_t * double(r) / HZ);
+ return ::ceil (_t * double(r) / HZ);
}
/** @param r Frames per second */
@@ -211,7 +213,8 @@ public:
}
private:
- friend struct dcptime_round_up_test;
+ friend struct dcptime_ceil_test;
+ friend struct dcptime_floor_test;
Type _t;
static const int HZ = 96000;
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index af6c8e167..ce87cc14f 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -381,7 +381,7 @@ FFmpeg::pts_offset (vector<shared_ptr<FFmpegAudioStream> > audio_streams, option
/* Now adjust so that the video pts starts on a frame */
if (first_video) {
ContentTime const fvc = first_video.get() + po;
- po += fvc.round_up (video_frame_rate) - fvc;
+ po += fvc.ceil (video_frame_rate) - fvc;
}
return po;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index d331516dd..68266b4ec 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1416,7 +1416,7 @@ list<DCPTimePeriod>
Film::reels () const
{
list<DCPTimePeriod> p;
- DCPTime const len = length().round_up (video_frame_rate ());
+ DCPTime const len = length().ceil (video_frame_rate ());
switch (reel_type ()) {
case REELTYPE_SINGLE:
diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po
index 89fb615b0..3e872127f 100644
--- a/src/lib/po/fr_FR.po
+++ b/src/lib/po/fr_FR.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-16 16:15+0000\n"
-"PO-Revision-Date: 2016-11-14 01:09+0100\n"
+"PO-Revision-Date: 2016-12-23 11:11+0100\n"
"Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -920,7 +920,7 @@ msgstr "ArD"
#: src/lib/colour_conversion.cc:288
msgid "S-Gamut3/S-Log3"
-msgstr ""
+msgstr "S-Gamut3/S-Log3"
#: src/lib/ffmpeg_content.cc:516 src/lib/ffmpeg_content.cc:535
msgid "SMPTE 170M (BT601)"
@@ -932,7 +932,7 @@ msgstr "SMPTE 170M (BT601-6)"
#: src/lib/ffmpeg_content.cc:565
msgid "SMPTE 2085, Y'D'zD'x"
-msgstr ""
+msgstr "SMPTE 2085, Y'D'zD'x"
#: src/lib/ffmpeg_content.cc:517 src/lib/ffmpeg_content.cc:536
#: src/lib/ffmpeg_content.cc:561
@@ -952,14 +952,12 @@ msgid "SMPTE ST 428-1 (CIE 1931 XYZ)"
msgstr "SMPTE ST 428-1 (CIE 1931 XYZ)"
#: src/lib/ffmpeg_content.cc:521
-#, fuzzy
msgid "SMPTE ST 431-2 (2011)"
-msgstr "SMPTE ST 428-1"
+msgstr "SMPTE ST 431-2 (2011)"
#: src/lib/ffmpeg_content.cc:522
-#, fuzzy
msgid "SMPTE ST 432-1 D65 (2010)"
-msgstr "SMPTE ST 428-1"
+msgstr "SMPTE ST 432-1 D65 (2010)"
#: src/lib/scp_uploader.cc:56
msgid "SSH error (%1)"
diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po
index 0de32114b..695ca1040 100644
--- a/src/tools/po/fr_FR.po
+++ b/src/tools/po/fr_FR.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-16 16:15+0000\n"
-"PO-Revision-Date: 2016-11-14 01:12+0100\n"
+"PO-Revision-Date: 2016-12-23 11:18+0100\n"
"Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -230,11 +230,9 @@ msgid "Encoding servers..."
msgstr "Serveurs d'encodage"
#: src/tools/dcpomatic_kdm.cc:276
-#, fuzzy, c-format
+#, c-format
msgid "File %s already exists. Do you want to overwrite it?"
-msgstr ""
-"Le répertoire %s existe déjà et n'est pas vide. Etes-vous sûr de vouloir "
-"l'utiliser ?"
+msgstr "Le fichier %s existe déjà. Etes-vous sûr de vouloir le remplacer ?"
#. / TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
#. / project (Film) has been changed since it was last saved.
diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc
index 34f45ed59..bcde05862 100644
--- a/src/wx/about_dialog.cc
+++ b/src/wx/about_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2017 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -80,7 +80,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
t = new wxStaticText (
this, wxID_ANY,
- _("(C) 2012-2016 Carl Hetherington, Terrence Meiczinger\n Ole Laursen, Brecht Sanders"),
+ _("(C) 2012-2017 Carl Hetherington, Terrence Meiczinger\n Ole Laursen, Brecht Sanders"),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
);
@@ -246,6 +246,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
supported_by.Add (wxT ("Aditya Pratama"));
supported_by.Add (wxT ("Ceridwen Productions"));
supported_by.Add (wxT ("Ivan Pullman"));
+ supported_by.Add (wxT ("Arts Quest"));
supported_by.Add (wxT ("Desiderio Garcia Ramirez"));
supported_by.Add (wxT ("Steve Reverand"));
supported_by.Add (wxT ("Mark Rolfe"));
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index a67820a8c..aa588b926 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -41,6 +41,7 @@ public:
void set_film (boost::shared_ptr<Film>);
+ /** @return our `playhead' position; this may not lie exactly on a frame boundary */
DCPTime position () const {
return _position;
}
diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po
index c2c3f2842..c4bf8f6c7 100644
--- a/src/wx/po/fr_FR.po
+++ b/src/wx/po/fr_FR.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-16 16:15+0000\n"
-"PO-Revision-Date: 2016-11-14 01:09+0100\n"
+"PO-Revision-Date: 2016-12-23 11:17+0100\n"
"Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -544,9 +544,8 @@ msgid "Default JPEG2000 bandwidth"
msgstr "Qualité JPEG2000 par défaut"
#: src/wx/config_dialog.cc:463
-#, fuzzy
msgid "Default KDM directory"
-msgstr "Dossier de sortie par défaut"
+msgstr "Répertoire KDM par défaut"
#: src/wx/config_dialog.cc:451
msgid "Default audio delay"
@@ -729,7 +728,7 @@ msgstr "Durée Fondu fin"
#: src/wx/kdm_dialog.cc:132
msgid "File %s already exists. Do you want to overwrite it?"
-msgstr ""
+msgstr "Le fichier %s existe déjà. Voulez-vous le remplacer?"
#: src/wx/kdm_output_panel.cc:51
msgid "Filename format"
@@ -814,12 +813,11 @@ msgstr "Gain pour le canal audio %d dans le canal du DCP %d"
#: src/wx/colour_conversion_editor.cc:60
msgid "Gamma"
-msgstr ""
+msgstr "Gamma"
#: src/wx/colour_conversion_editor.cc:61
-#, fuzzy
msgid "Gamma, linearised for small values"
-msgstr "Linéariser la courbe d'entrée gamma pour les bas niveaux"
+msgstr "Gamma, linéarisée pour les bas niveaux"
#: src/wx/config_dialog.cc:1488 src/wx/content_properties_dialog.cc:70
msgid "General"
@@ -900,7 +898,7 @@ msgstr "puissance d'entrée"
#: src/wx/colour_conversion_editor.cc:58
msgid "Input transfer function"
-msgstr ""
+msgstr "Fonction transfert d'entrée"
#: src/wx/audio_dialog.cc:351
#, c-format
@@ -920,9 +918,8 @@ msgid "Interop"
msgstr "MXF-Interop"
#: src/wx/colour_conversion_editor.cc:203
-#, fuzzy
msgid "Inverse 2.6 gamma correction on output"
-msgstr "Correction gamma d'entrée"
+msgstr "Inversion de la correction gamma 2.6 en entrée"
#: src/wx/config_dialog.cc:227
msgid "Issuer"
@@ -1107,7 +1104,8 @@ msgstr "DEMANDE de KDM:"
msgid "NEEDS OV: "
msgstr "OV Nécessaire:"
-#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72 src/wx/screen_dialog.cc:68
+#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72
+#: src/wx/screen_dialog.cc:68
msgid "Name"
msgstr "Nom"
@@ -1393,7 +1391,7 @@ msgstr "Résolution"
#: src/wx/image_subtitle_colour_dialog.cc:70
msgid "Restore to original colours"
-msgstr ""
+msgstr "Rétablir Couleurs originelles"
#: src/wx/normal_job_view.cc:56
msgid "Resume"
@@ -1421,7 +1419,7 @@ msgstr "Nom commun racine"
#: src/wx/colour_conversion_editor.cc:62
msgid "S-Gamut3"
-msgstr ""
+msgstr "S-Gamut3"
#: src/wx/config_dialog.cc:1168
msgid "SCP (for AAM and Doremi)"
@@ -1972,6 +1970,8 @@ msgid ""
"You cannot add a screen called '%s' as the cinema already has a screen with "
"this name."
msgstr ""
+"Vous ne pouvez pas ajouter un écran appelé '%s' car le cinéma possède déjà "
+"un écran appelé ainsi."
#: src/wx/screens_panel.cc:258
#, c-format
@@ -1979,6 +1979,8 @@ msgid ""
"You cannot change this screen's name to '%s' as the cinema already has a "
"screen with this name."
msgstr ""
+"Vous ne pouvez pas modifier le nom de l'écran en '%s' car le cinéma possède "
+"déjà un écran nommé ainsi."
#: src/wx/report_problem_dialog.cc:66
msgid "Your email address"
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index bd4177ffb..d7ed46f46 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -441,14 +441,15 @@ TimingPanel::film_changed (Film::Property p)
void
TimingPanel::trim_start_to_playhead_clicked ()
{
- DCPTime const ph = _viewer->position ();
+ shared_ptr<const Film> film = _parent->film ();
+ DCPTime const ph = _viewer->position().floor (film->video_frame_rate ());
optional<DCPTime> new_ph;
_viewer->set_coalesce_player_changes (true);
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
- FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
+ FrameRateChange const frc = film->active_frame_rate_change (i->position ());
i->set_trim_start (i->trim_start() + ContentTime (ph - i->position (), frc));
new_ph = i->position ();
}
@@ -464,10 +465,11 @@ TimingPanel::trim_start_to_playhead_clicked ()
void
TimingPanel::trim_end_to_playhead_clicked ()
{
- DCPTime const ph = _viewer->position ();
+ shared_ptr<const Film> film = _parent->film ();
+ DCPTime const ph = _viewer->position().floor (film->video_frame_rate ());
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
- FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
+ FrameRateChange const frc = film->active_frame_rate_change (i->position ());
i->set_trim_end (ContentTime (i->position() + i->full_length() - ph - DCPTime::from_frames (1, frc.dcp), frc) - i->trim_start());
}
}