summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-09 22:18:42 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-09 22:18:42 +0000
commite8204f55c981493b99814f71a50b3c3d62601032 (patch)
tree19e155586aca13839e440a0574ed5aa5cfa4c4d5 /src/lib
parentae9b0b509787d244366eb8f69bdf9d563b6c6bb6 (diff)
parente28def57ff4591f02ca3585a506ea58fbeba5d46 (diff)
Merge master.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/audio_buffers.cc8
-rw-r--r--src/lib/audio_buffers.h2
-rw-r--r--src/lib/audio_mapping.cc92
-rw-r--r--src/lib/audio_mapping.h21
-rw-r--r--src/lib/config.cc8
-rw-r--r--src/lib/config.h19
-rw-r--r--src/lib/content.cc4
-rw-r--r--src/lib/ffmpeg_content.cc2
-rw-r--r--src/lib/ffmpeg_decoder.cc2
-rw-r--r--src/lib/film.cc30
-rw-r--r--src/lib/film.h3
-rw-r--r--src/lib/image_content.cc16
-rw-r--r--src/lib/image_content.h1
-rw-r--r--src/lib/image_examiner.cc2
-rw-r--r--src/lib/player.cc22
-rw-r--r--src/lib/po/de_DE.po80
-rw-r--r--src/lib/po/es_ES.po83
-rw-r--r--src/lib/po/fr_FR.po80
-rw-r--r--src/lib/po/it_IT.po74
-rw-r--r--src/lib/po/sv_SE.po74
-rw-r--r--src/lib/sndfile_content.cc4
-rw-r--r--src/lib/update.cc170
-rw-r--r--src/lib/update.h89
-rw-r--r--src/lib/video_content.h2
-rw-r--r--src/lib/writer.cc38
-rw-r--r--src/lib/writer.h2
-rw-r--r--src/lib/wscript1
27 files changed, 644 insertions, 285 deletions
diff --git a/src/lib/audio_buffers.cc b/src/lib/audio_buffers.cc
index e80142b8e..a1c9b81ac 100644
--- a/src/lib/audio_buffers.cc
+++ b/src/lib/audio_buffers.cc
@@ -210,9 +210,11 @@ AudioBuffers::move (int from, int to, int frames)
}
}
-/** Add data from from `from', `from_channel' to our channel `to_channel' */
+/** Add data from from `from', `from_channel' to our channel `to_channel'.
+ * @param gain Linear gain to apply to the data before it is added.
+ */
void
-AudioBuffers::accumulate_channel (AudioBuffers const * from, int from_channel, int to_channel)
+AudioBuffers::accumulate_channel (AudioBuffers const * from, int from_channel, int to_channel, float gain)
{
int const N = frames ();
assert (from->frames() == N);
@@ -222,7 +224,7 @@ AudioBuffers::accumulate_channel (AudioBuffers const * from, int from_channel, i
float* d = _data[to_channel];
for (int i = 0; i < N; ++i) {
- *d++ += *s++;
+ *d++ += (*s++) * gain;
}
}
diff --git a/src/lib/audio_buffers.h b/src/lib/audio_buffers.h
index 75bc686f8..c9030dbfa 100644
--- a/src/lib/audio_buffers.h
+++ b/src/lib/audio_buffers.h
@@ -61,7 +61,7 @@ public:
void copy_from (AudioBuffers const * from, int frames_to_copy, int read_offset, int write_offset);
void move (int from, int to, int frames);
- void accumulate_channel (AudioBuffers const *, int, int);
+ void accumulate_channel (AudioBuffers const *, int, int, float gain = 1);
void accumulate_frames (AudioBuffers const *, int read_offset, int write_offset, int frames);
private:
diff --git a/src/lib/audio_mapping.cc b/src/lib/audio_mapping.cc
index 362000125..ae7702998 100644
--- a/src/lib/audio_mapping.cc
+++ b/src/lib/audio_mapping.cc
@@ -21,6 +21,7 @@
#include <libxml++/libxml++.h>
#include <libcxml/cxml.h>
#include "audio_mapping.h"
+#include "util.h"
using std::list;
using std::cout;
@@ -41,77 +42,86 @@ AudioMapping::AudioMapping ()
* @param c Number of channels.
*/
AudioMapping::AudioMapping (int c)
- : _content_channels (c)
{
+ setup (c);
+}
+void
+AudioMapping::setup (int c)
+{
+ _content_channels = c;
+
+ _gain.resize (_content_channels);
+ for (int i = 0; i < _content_channels; ++i) {
+ _gain[i].resize (MAX_AUDIO_CHANNELS);
+ }
}
void
AudioMapping::make_default ()
{
+ for (int i = 0; i < _content_channels; ++i) {
+ for (int j = 0; j < MAX_AUDIO_CHANNELS; ++j) {
+ _gain[i][j] = 0;
+ }
+ }
+
if (_content_channels == 1) {
/* Mono -> Centre */
- add (0, libdcp::CENTRE);
+ set (0, libdcp::CENTRE, 1);
} else {
/* 1:1 mapping */
for (int i = 0; i < _content_channels; ++i) {
- add (i, static_cast<libdcp::Channel> (i));
+ set (i, static_cast<libdcp::Channel> (i), 1);
}
}
}
-AudioMapping::AudioMapping (shared_ptr<const cxml::Node> node)
+AudioMapping::AudioMapping (shared_ptr<const cxml::Node> node, int state_version)
{
- _content_channels = node->number_child<int> ("ContentChannels");
-
- list<cxml::NodePtr> const c = node->node_children ("Map");
- for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
- add ((*i)->number_child<int> ("ContentIndex"), static_cast<libdcp::Channel> ((*i)->number_child<int> ("DCP")));
+ setup (node->number_child<int> ("ContentChannels"));
+
+ if (state_version <= 5) {
+ /* Old-style: on/off mapping */
+ list<cxml::NodePtr> const c = node->node_children ("Map");
+ for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
+ set ((*i)->number_child<int> ("ContentIndex"), static_cast<libdcp::Channel> ((*i)->number_child<int> ("DCP")), 1);
+ }
+ } else {
+ list<cxml::NodePtr> const c = node->node_children ("Gain");
+ for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
+ set (
+ (*i)->number_attribute<int> ("Content"),
+ static_cast<libdcp::Channel> ((*i)->number_attribute<int> ("DCP")),
+ lexical_cast<float> ((*i)->content ())
+ );
+ }
}
}
void
-AudioMapping::add (int c, libdcp::Channel d)
+AudioMapping::set (int c, libdcp::Channel d, float g)
{
- _content_to_dcp.push_back (make_pair (c, d));
+ _gain[c][d] = g;
}
-list<int>
-AudioMapping::dcp_to_content (libdcp::Channel d) const
+float
+AudioMapping::get (int c, libdcp::Channel d) const
{
- list<int> c;
- for (list<pair<int, libdcp::Channel> >::const_iterator i = _content_to_dcp.begin(); i != _content_to_dcp.end(); ++i) {
- if (i->second == d) {
- c.push_back (i->first);
- }
- }
-
- return c;
-}
-
-list<libdcp::Channel>
-AudioMapping::content_to_dcp (int c) const
-{
- assert (c < _content_channels);
-
- list<libdcp::Channel> d;
- for (list<pair<int, libdcp::Channel> >::const_iterator i = _content_to_dcp.begin(); i != _content_to_dcp.end(); ++i) {
- if (i->first == c) {
- d.push_back (i->second);
- }
- }
-
- return d;
+ return _gain[c][d];
}
void
AudioMapping::as_xml (xmlpp::Node* node) const
{
node->add_child ("ContentChannels")->add_child_text (lexical_cast<string> (_content_channels));
-
- for (list<pair<int, libdcp::Channel> >::const_iterator i = _content_to_dcp.begin(); i != _content_to_dcp.end(); ++i) {
- xmlpp::Node* t = node->add_child ("Map");
- t->add_child ("ContentIndex")->add_child_text (lexical_cast<string> (i->first));
- t->add_child ("DCP")->add_child_text (lexical_cast<string> (i->second));
+
+ for (int c = 0; c < _content_channels; ++c) {
+ for (int d = 0; d < MAX_AUDIO_CHANNELS; ++d) {
+ xmlpp::Element* t = node->add_child ("Gain");
+ t->set_attribute ("Content", lexical_cast<string> (c));
+ t->set_attribute ("DCP", lexical_cast<string> (d));
+ t->add_child_text (lexical_cast<string> (get (c, static_cast<libdcp::Channel> (d))));
+ }
}
}
diff --git a/src/lib/audio_mapping.h b/src/lib/audio_mapping.h
index 9a507b550..26087bfff 100644
--- a/src/lib/audio_mapping.h
+++ b/src/lib/audio_mapping.h
@@ -20,7 +20,7 @@
#ifndef DCPOMATIC_AUDIO_MAPPING_H
#define DCPOMATIC_AUDIO_MAPPING_H
-#include <list>
+#include <vector>
#include <libdcp/types.h>
#include <boost/shared_ptr.hpp>
@@ -34,37 +34,34 @@ namespace cxml {
/** A many-to-many mapping from some content channels to DCP channels.
* The number of content channels is set on construction and fixed,
- * and then each of those content channels can be mapped to zero or
- * more DCP channels.
+ * and then each of those content channels are mapped to each DCP channel
+ * by a linear gain.
*/
class AudioMapping
{
public:
AudioMapping ();
AudioMapping (int);
- AudioMapping (boost::shared_ptr<const cxml::Node>);
+ AudioMapping (boost::shared_ptr<const cxml::Node>, int);
/* Default copy constructor is fine */
void as_xml (xmlpp::Node *) const;
- void add (int, libdcp::Channel);
void make_default ();
- std::list<int> dcp_to_content (libdcp::Channel) const;
- std::list<std::pair<int, libdcp::Channel> > content_to_dcp () const {
- return _content_to_dcp;
- }
+ void set (int, libdcp::Channel, float);
+ float get (int, libdcp::Channel) const;
int content_channels () const {
return _content_channels;
}
- std::list<libdcp::Channel> content_to_dcp (int) const;
-
private:
+ void setup (int);
+
int _content_channels;
- std::list<std::pair<int, libdcp::Channel> > _content_to_dcp;
+ std::vector<std::vector<float> > _gain;
};
#endif
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 454b03e3a..5a9e1619a 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -68,6 +68,8 @@ Config::Config ()
, _kdm_email (
_("Dear Projectionist\n\nPlease find attached KDMs for $CPL_NAME.\n\nThe KDMs are valid from $START_TIME until $END_TIME.\n\nBest regards,\nDCP-o-matic")
)
+ , _check_for_updates (false)
+ , _check_for_test_updates (false)
{
_allowed_dcp_frame_rates.push_back (24);
_allowed_dcp_frame_rates.push_back (25);
@@ -180,6 +182,9 @@ Config::read ()
_mail_password = f.optional_string_child("MailPassword").get_value_or ("");
_kdm_from = f.string_child ("KDMFrom");
_kdm_email = f.string_child ("KDMEmail");
+
+ _check_for_updates = f.optional_bool_child("CheckForUpdates").get_value_or (false);
+ _check_for_test_updates = f.optional_bool_child("CheckForTestUpdates").get_value_or (false);
}
void
@@ -354,6 +359,9 @@ Config::write () const
root->add_child("KDMFrom")->add_child_text (_kdm_from);
root->add_child("KDMEmail")->add_child_text (_kdm_email);
+ root->add_child("CheckForUpdates")->add_child_text (_check_for_updates ? "1" : "0");
+ root->add_child("CheckForTestUpdates")->add_child_text (_check_for_test_updates ? "1" : "0");
+
doc.write_to_file_formatted (file(false).string ());
}
diff --git a/src/lib/config.h b/src/lib/config.h
index 67d293884..791e41e8f 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -171,6 +171,14 @@ public:
return _kdm_email;
}
+ bool check_for_updates () const {
+ return _check_for_updates;
+ }
+
+ bool check_for_test_updates () const {
+ return _check_for_test_updates;
+ }
+
/** @param n New number of local encoding threads */
void set_num_local_encoding_threads (int n) {
_num_local_encoding_threads = n;
@@ -284,6 +292,14 @@ public:
void set_kdm_email (std::string e) {
_kdm_email = e;
}
+
+ void set_check_for_updates (bool c) {
+ _check_for_updates = c;
+ }
+
+ void set_check_for_test_updates (bool c) {
+ _check_for_test_updates = c;
+ }
void write () const;
@@ -341,6 +357,9 @@ private:
std::string _mail_password;
std::string _kdm_from;
std::string _kdm_email;
+ /** true to check for updates on startup */
+ bool _check_for_updates;
+ bool _check_for_test_updates;
/** Singleton instance, or 0 */
static Config* _instance;
diff --git a/src/lib/content.cc b/src/lib/content.cc
index ab666db3c..ea1c19acd 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -150,6 +150,10 @@ Content::set_position (DCPTime p)
{
{
boost::mutex::scoped_lock lm (_mutex);
+ if (p == _position) {
+ return;
+ }
+
_position = p;
}
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index eb873fe65..394c16aa5 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -373,7 +373,7 @@ FFmpegStream::as_xml (xmlpp::Node* root) const
FFmpegAudioStream::FFmpegAudioStream (shared_ptr<const cxml::Node> node, int version)
: FFmpegStream (node, version)
- , mapping (node->node_child ("Mapping"))
+ , mapping (node->node_child ("Mapping"), version)
{
frame_rate = node->number_child<int> ("FrameRate");
channels = node->number_child<int64_t> ("Channels");
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index a2b3e5d3b..8742c48ec 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -561,7 +561,7 @@ FFmpegDecoder::decode_subtitle_packet ()
/* Subtitle PTS in seconds (within the source, not taking into account any of the
source that we may have chopped off for the DCP)
*/
- double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _video_pts_offset;
+ double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _pts_offset;
/* hence start time for this sub */
ContentTime const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 932048d8b..57d23ec4e 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -81,7 +81,10 @@ using boost::optional;
using libdcp::Size;
using libdcp::Signer;
-int const Film::state_version = 5;
+/* 5 -> 6
+ * AudioMapping XML changed.
+ */
+int const Film::state_version = 6;
/** Construct a Film object in a given directory.
*
@@ -980,3 +983,28 @@ Film::make_kdms (
return kdms;
}
+
+/** @return The approximate disk space required to encode a DCP of this film with the
+ * current settings, in bytes.
+ */
+uint64_t
+Film::required_disk_space () const
+{
+ return uint64_t (j2k_bandwidth() / 8) * length() / TIME_HZ;
+}
+
+/** This method checks the disk that the Film is on and tries to decide whether or not
+ * there will be enough space to make a DCP for it. If so, true is returned; if not,
+ * false is returned and required and availabe are filled in with the amount of disk space
+ * required and available respectively (in Gb).
+ *
+ * Note: the decision made by this method isn't, of course, 100% reliable.
+ */
+bool
+Film::should_be_enough_disk_space (double& required, double& available) const
+{
+ boost::filesystem::space_info s = boost::filesystem::space (internal_video_mxf_dir ());
+ required = double (required_disk_space ()) / 1073741824.0f;
+ available = double (s.available) / 1073741824.0f;
+ return (available - required) > 1;
+}
diff --git a/src/lib/film.h b/src/lib/film.h
index 24ddad0bd..5d83ec6ed 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -108,6 +108,9 @@ public:
DCPTime video_frames_to_time (VideoFrame) const;
DCPTime audio_frames_to_time (AudioFrame) const;
+ uint64_t required_disk_space () const;
+ bool should_be_enough_disk_space (double &, double &) const;
+
/* Proxies for some Playlist methods */
ContentList content () const;
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index 87276ce4d..a7f951bea 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -144,3 +144,19 @@ ImageContent::still () const
{
return number_of_paths() == 1;
}
+
+void
+ImageContent::set_video_frame_rate (float r)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ if (_video_frame_rate == r) {
+ return;
+ }
+
+ _video_frame_rate = r;
+ }
+
+ signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
+}
+
diff --git a/src/lib/image_content.h b/src/lib/image_content.h
index ef2bc0447..f929e2b6f 100644
--- a/src/lib/image_content.h
+++ b/src/lib/image_content.h
@@ -47,6 +47,7 @@ public:
void set_video_length (VideoFrame);
bool still () const;
+ void set_video_frame_rate (float);
};
#endif
diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc
index 17064fd45..12fe2b8a6 100644
--- a/src/lib/image_examiner.cc
+++ b/src/lib/image_examiner.cc
@@ -36,7 +36,7 @@ using boost::shared_ptr;
using boost::lexical_cast;
using boost::bad_lexical_cast;
-ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job> job)
+ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>)
: _film (film)
, _image_content (content)
, _video_length (0)
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 3db2fe6c9..260476242 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -334,10 +334,17 @@ Player::emit_audio (weak_ptr<Piece> weak_piece, shared_ptr<DecodedAudio> audio)
/* Remap channels */
shared_ptr<AudioBuffers> dcp_mapped (new AudioBuffers (_film->audio_channels(), audio->data->frames()));
dcp_mapped->make_silent ();
- list<pair<int, libdcp::Channel> > map = content->audio_mapping().content_to_dcp ();
- for (list<pair<int, libdcp::Channel> >::iterator i = map.begin(); i != map.end(); ++i) {
- if (i->first < audio->data->channels() && i->second < dcp_mapped->channels()) {
- dcp_mapped->accumulate_channel (audio->data.get(), i->first, i->second);
+ AudioMapping map = content->audio_mapping ();
+ for (int i = 0; i < map.content_channels(); ++i) {
+ for (int j = 0; j < _film->audio_channels(); ++j) {
+ if (map.get (i, static_cast<libdcp::Channel> (j)) > 0) {
+ dcp_mapped->accumulate_channel (
+ audio->data.get(),
+ i,
+ static_cast<libdcp::Channel> (j),
+ map.get (i, static_cast<libdcp::Channel> (j))
+ );
+ }
}
}
@@ -528,7 +535,10 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent)
update_subtitle ();
Changed (frequent);
- } else if (property == VideoContentProperty::VIDEO_CROP || property == VideoContentProperty::VIDEO_RATIO) {
+ } else if (
+ property == VideoContentProperty::VIDEO_CROP || property == VideoContentProperty::VIDEO_RATIO ||
+ property == VideoContentProperty::VIDEO_FRAME_RATE
+ ) {
Changed (frequent);
@@ -599,7 +609,7 @@ Player::film_changed (Film::Property p)
last time we were run.
*/
- if (p == Film::SCALER || p == Film::WITH_SUBTITLES || p == Film::CONTAINER) {
+ if (p == Film::SCALER || p == Film::WITH_SUBTITLES || p == Film::CONTAINER || p == Film::VIDEO_FRAME_RATE) {
Changed (false);
}
}
diff --git a/src/lib/po/de_DE.po b/src/lib/po/de_DE.po
index 2eacedf57..3d8a26f66 100644
--- a/src/lib/po/de_DE.po
+++ b/src/lib/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-05 18:00+0000\n"
+"POT-Creation-Date: 2014-01-07 20:01+0000\n"
"PO-Revision-Date: 2014-01-05 23:06+0100\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -102,7 +102,7 @@ msgstr "Abgebrochen"
msgid "Cannot handle pixel format %1 during %2"
msgstr "Cannot handle pixel format %1 during %2"
-#: src/lib/util.cc:766
+#: src/lib/util.cc:768
msgid "Centre"
msgstr "Center"
@@ -110,7 +110,7 @@ msgstr "Center"
msgid "Checking existing image data"
msgstr "Überprüfe bestehende Bilddateien"
-#: src/lib/writer.cc:401
+#: src/lib/writer.cc:420
msgid "Computing audio digest"
msgstr "Ton berechnen"
@@ -118,11 +118,11 @@ msgstr "Ton berechnen"
msgid "Computing digest"
msgstr "Teil berechnen"
-#: src/lib/writer.cc:398
+#: src/lib/writer.cc:417
msgid "Computing image digest"
msgstr "Bild berechnen"
-#: src/lib/util.cc:796
+#: src/lib/util.cc:798
msgid "Content and DCP have the same rate.\n"
msgstr "Inhalt und DCP haben die selbe Rate.\n"
@@ -194,7 +194,7 @@ msgstr "%1 konnte nicht geöffnet werden."
msgid "Could not open %1 to send"
msgstr "%1 konnte nicht zum senden geöffnet werden"
-#: src/lib/film.cc:949
+#: src/lib/film.cc:952
msgid "Could not read DCP to make KDM for"
msgstr "DCP konnte nicht zur Schlüsselerstellung geöffnet werden"
@@ -210,11 +210,11 @@ msgstr "Remote Datei (%1) kann nicht gespeichert werden"
msgid "Cubic interpolating deinterlacer"
msgstr "Kubisch interpolierender Deinterlacer"
-#: src/lib/util.cc:808
+#: src/lib/util.cc:810
msgid "DCP will run at %1%% of the content speed.\n"
msgstr "DCP läuft mit %1% der Orginal Geschwindigkeit.\n"
-#: src/lib/util.cc:799
+#: src/lib/util.cc:801
msgid "DCP will use every other frame of the content.\n"
msgstr "DCP benutzt jedes ungerade Bild des Inhalts.\n"
@@ -265,11 +265,11 @@ msgstr "De-Ringer"
msgid "Dolby CP650 and CP750"
msgstr "Dolby CP650 und CP750"
-#: src/lib/util.cc:801
+#: src/lib/util.cc:803
msgid "Each content frame will be doubled in the DCP.\n"
msgstr "Jedes Bild des Inhalts wird im DCP verdoppelt.\n"
-#: src/lib/util.cc:803
+#: src/lib/util.cc:805
msgid "Each content frame will be repeated %1 more times in the DCP.\n"
msgstr "Jedes Bild des Inhalts wird %1 mal im DCP wiederholt.\n"
@@ -277,7 +277,7 @@ msgstr "Jedes Bild des Inhalts wird %1 mal im DCP wiederholt.\n"
msgid "Email KDMs for %1"
msgstr "Email KDMs für %1"
-#: src/lib/writer.cc:109
+#: src/lib/writer.cc:112
msgid "Encoding image data"
msgstr "Bilddaten bearbeiten"
@@ -365,15 +365,15 @@ msgstr "Kernel De-Interlacer"
msgid "Lanczos"
msgstr "Lanczos"
-#: src/lib/util.cc:764
+#: src/lib/util.cc:766
msgid "Left"
msgstr "Links"
-#: src/lib/util.cc:768
+#: src/lib/util.cc:770
msgid "Left surround"
msgstr "Links Surround"
-#: src/lib/util.cc:767
+#: src/lib/util.cc:769
msgid "Lfe (sub)"
msgstr "LFE (Subwoofer)"
@@ -431,15 +431,15 @@ msgstr "Werbung"
msgid "Rating"
msgstr "Rating"
-#: src/lib/config.cc:81 src/lib/config.cc:165
+#: src/lib/config.cc:83 src/lib/config.cc:167
msgid "Rec. 709"
msgstr "Rec. 709"
-#: src/lib/util.cc:765
+#: src/lib/util.cc:767
msgid "Right"
msgstr "Rechts"
-#: src/lib/util.cc:769
+#: src/lib/util.cc:771
msgid "Right surround"
msgstr "Rechts Surround"
@@ -487,7 +487,7 @@ msgstr ""
"Das Laufwer auf dem der Film gespeichert werden soll hat zu wenig Freien "
"Speicher. Bitte Speicher freigeben und nochmals versuchen."
-#: src/lib/film.cc:372
+#: src/lib/film.cc:375
msgid ""
"This film was created with an older version of DCP-o-matic, and "
"unfortunately it cannot be loaded into this version. You will need to "
@@ -545,7 +545,7 @@ msgstr "X"
msgid "Yet Another Deinterlacing Filter"
msgstr "Noch ein anderer De-Interlacer"
-#: src/lib/film.cc:276
+#: src/lib/film.cc:279
msgid "You must add some content to the DCP before creating it"
msgstr "Sie müssen einen Inhalt hinzufügen bevor Sie ein DCP erstellen können."
@@ -557,11 +557,11 @@ msgstr "[Bewegte Bilder]"
msgid "[still]"
msgstr "[Standbild]"
-#: src/lib/film.cc:237
+#: src/lib/film.cc:240
msgid "cannot contain slashes"
msgstr "Darf keine Schrägstriche enthalten"
-#: src/lib/util.cc:546
+#: src/lib/util.cc:548
msgid "connect timed out"
msgstr "Zeit zur Verbindung abgelaufen"
@@ -569,11 +569,11 @@ msgstr "Zeit zur Verbindung abgelaufen"
msgid "connecting"
msgstr "verbinde..."
-#: src/lib/film.cc:272
+#: src/lib/film.cc:275
msgid "container"
msgstr "Container"
-#: src/lib/film.cc:280
+#: src/lib/film.cc:283
msgid "content type"
msgstr "Inhalt Typ"
@@ -601,6 +601,10 @@ msgstr "Untertitel-Decoder nicht gefunden"
msgid "could not find video decoder"
msgstr "Bild-Decoder nicht gefunden"
+#: src/lib/writer.cc:387
+msgid "could not move audio MXF into the DCP (%1)"
+msgstr ""
+
#: src/lib/sndfile_decoder.cc:45
msgid "could not open audio file for reading"
msgstr "Tondatei kann nicht zum lesen geöffnet werden."
@@ -641,26 +645,22 @@ msgstr "SSH Session kann nicht gestartet werden"
msgid "could not write to file %1 (%2)"
msgstr "Datei %1 kann nicht geschrieben werden (%2)"
-#: src/lib/util.cc:566
+#: src/lib/util.cc:568
msgid "error during async_accept (%1)"
msgstr "error during async_accept (%1)"
-#: src/lib/util.cc:542
+#: src/lib/util.cc:544
msgid "error during async_connect (%1)"
msgstr "error during async_connect (%1)"
-#: src/lib/util.cc:615
+#: src/lib/util.cc:617
msgid "error during async_read (%1)"
msgstr "error during async_read (%1)"
-#: src/lib/util.cc:587
+#: src/lib/util.cc:589
msgid "error during async_write (%1)"
msgstr "error during async_write (%1)"
-#: src/lib/image_examiner.cc:68
-msgid "first frame in moving image directory is number %1"
-msgstr "Erstes Bild im Bilderordner ist Nummer %1"
-
#: src/lib/transcode_job.cc:94
msgid "frames per second"
msgstr "Bilder pro Sekunde"
@@ -681,7 +681,7 @@ msgstr "Minute"
msgid "minutes"
msgstr "Minuten"
-#: src/lib/util.cc:687
+#: src/lib/util.cc:689
msgid "missing key %1 in key-value set"
msgstr "Key %1 in Key-value set fehlt"
@@ -697,7 +697,7 @@ msgstr "wird verschoben"
msgid "multi-part subtitles not yet supported"
msgstr "Multi-Part Untertitel noch nicht unterstützt"
-#: src/lib/film.cc:237 src/lib/film.cc:284
+#: src/lib/film.cc:240 src/lib/film.cc:287
msgid "name"
msgstr "Name"
@@ -711,11 +711,11 @@ msgstr "Nur Bitmap Untertitel werden unterstützt"
msgid "remaining"
msgstr "verbleibend"
-#: src/lib/config.cc:79 src/lib/video_content.cc:169
+#: src/lib/config.cc:81 src/lib/video_content.cc:169
msgid "sRGB"
msgstr "sRGB"
-#: src/lib/config.cc:80
+#: src/lib/config.cc:82
msgid "sRGB non-linearised"
msgstr "sRGB nicht linearisiert"
@@ -727,10 +727,12 @@ msgstr "Sekunden"
msgid "still"
msgstr "Standbild"
-#: src/lib/image_examiner.cc:72
-msgid "there are %1 images in the directory but the last one is number %2"
-msgstr "Im Ordner sind %1 Bilder aber die letzte Nummer ist %2"
-
#: src/lib/ffmpeg_examiner.cc:169
msgid "unknown"
msgstr "unbekannt"
+
+#~ msgid "first frame in moving image directory is number %1"
+#~ msgstr "Erstes Bild im Bilderordner ist Nummer %1"
+
+#~ msgid "there are %1 images in the directory but the last one is number %2"
+#~ msgstr "Im Ordner sind %1 Bilder aber die letzte Nummer ist %2"
diff --git a/src/lib/po/es_ES.po b/src/lib/po/es_ES.po
index 42a5d9397..054fef215 100644
--- a/src/lib/po/es_ES.po
+++ b/src/lib/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LIBDCPOMATIC\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-05 18:00+0000\n"
+"POT-Creation-Date: 2014-01-07 20:01+0000\n"
"PO-Revision-Date: 2013-11-09 03:09-0500\n"
"Last-Translator: Manuel AC <manuel.acevedo@civantos.>\n"
"Language-Team: Manuel AC <manuel.acevedo@civantos.com>\n"
@@ -103,7 +103,7 @@ msgstr "Cancelado"
msgid "Cannot handle pixel format %1 during %2"
msgstr "No se puede usar el formato de pixel %1 para %2"
-#: src/lib/util.cc:766
+#: src/lib/util.cc:768
msgid "Centre"
msgstr "Centro"
@@ -111,7 +111,7 @@ msgstr "Centro"
msgid "Checking existing image data"
msgstr ""
-#: src/lib/writer.cc:401
+#: src/lib/writer.cc:420
msgid "Computing audio digest"
msgstr ""
@@ -119,11 +119,11 @@ msgstr ""
msgid "Computing digest"
msgstr ""
-#: src/lib/writer.cc:398
+#: src/lib/writer.cc:417
msgid "Computing image digest"
msgstr ""
-#: src/lib/util.cc:796
+#: src/lib/util.cc:798
#, fuzzy
msgid "Content and DCP have the same rate.\n"
msgstr "La fuente y el DCP tienen la misma velocidad.\n"
@@ -153,7 +153,6 @@ msgid "Content to be joined must have the same ratio."
msgstr ""
#: src/lib/subtitle_content.cc:65
-#, fuzzy
msgid "Content to be joined must have the same subtitle offset."
msgstr ""
@@ -198,7 +197,7 @@ msgstr "no se pudo abrir el fichero para lectura"
msgid "Could not open %1 to send"
msgstr "No se pudo abrir %1 para enviar"
-#: src/lib/film.cc:949
+#: src/lib/film.cc:952
msgid "Could not read DCP to make KDM for"
msgstr "No se pudo leer el DCP para hacer el KDM"
@@ -214,12 +213,12 @@ msgstr "No se pudo escribir el fichero remoto (%1)"
msgid "Cubic interpolating deinterlacer"
msgstr "Desentrelazado por interpolación cúbica"
-#: src/lib/util.cc:808
+#: src/lib/util.cc:810
#, fuzzy
msgid "DCP will run at %1%% of the content speed.\n"
msgstr "El DCP se reproducirá al %1%% de la velocidad de la fuente.\n"
-#: src/lib/util.cc:799
+#: src/lib/util.cc:801
#, fuzzy
msgid "DCP will use every other frame of the content.\n"
msgstr "El DCP usará fotogramas alternos de la fuente.\n"
@@ -264,12 +263,12 @@ msgstr "Deringing filter"
msgid "Dolby CP650 and CP750"
msgstr "Dolby CP750"
-#: src/lib/util.cc:801
+#: src/lib/util.cc:803
#, fuzzy
msgid "Each content frame will be doubled in the DCP.\n"
msgstr "Se doblará cada fotograma de la fuente en el DCP.\n"
-#: src/lib/util.cc:803
+#: src/lib/util.cc:805
#, fuzzy
msgid "Each content frame will be repeated %1 more times in the DCP.\n"
msgstr "Se doblará cada fotograma de la fuente en el DCP.\n"
@@ -278,7 +277,7 @@ msgstr "Se doblará cada fotograma de la fuente en el DCP.\n"
msgid "Email KDMs for %1"
msgstr ""
-#: src/lib/writer.cc:109
+#: src/lib/writer.cc:112
msgid "Encoding image data"
msgstr ""
@@ -366,15 +365,15 @@ msgstr "Kernel deinterlacer"
msgid "Lanczos"
msgstr "Lanczos"
-#: src/lib/util.cc:764
+#: src/lib/util.cc:766
msgid "Left"
msgstr "Izquierda"
-#: src/lib/util.cc:768
+#: src/lib/util.cc:770
msgid "Left surround"
msgstr "Surround izquierda"
-#: src/lib/util.cc:767
+#: src/lib/util.cc:769
msgid "Lfe (sub)"
msgstr ""
@@ -432,16 +431,16 @@ msgstr "Anuncio de servicio público"
msgid "Rating"
msgstr "Clasificación"
-#: src/lib/config.cc:81 src/lib/config.cc:165
+#: src/lib/config.cc:83 src/lib/config.cc:167
#, fuzzy
msgid "Rec. 709"
msgstr "Rec 709"
-#: src/lib/util.cc:765
+#: src/lib/util.cc:767
msgid "Right"
msgstr "Derecha"
-#: src/lib/util.cc:769
+#: src/lib/util.cc:771
msgid "Right surround"
msgstr "Surround derecha"
@@ -489,7 +488,7 @@ msgstr ""
"En el dispositivo donde se encuentra la película queda poco espacio. Libere "
"espacio en el disco y pruebe de nuevo."
-#: src/lib/film.cc:372
+#: src/lib/film.cc:375
msgid ""
"This film was created with an older version of DCP-o-matic, and "
"unfortunately it cannot be loaded into this version. You will need to "
@@ -547,7 +546,7 @@ msgstr "X"
msgid "Yet Another Deinterlacing Filter"
msgstr "Yet Another Deinterlacing Filter"
-#: src/lib/film.cc:276
+#: src/lib/film.cc:279
msgid "You must add some content to the DCP before creating it"
msgstr "Tienes que añadir contenido al DCP antes de crearlo."
@@ -560,11 +559,11 @@ msgstr ""
msgid "[still]"
msgstr "imagen fija"
-#: src/lib/film.cc:237
+#: src/lib/film.cc:240
msgid "cannot contain slashes"
msgstr "no puede contener barras"
-#: src/lib/util.cc:546
+#: src/lib/util.cc:548
msgid "connect timed out"
msgstr "tiempo de conexión agotado"
@@ -572,12 +571,12 @@ msgstr "tiempo de conexión agotado"
msgid "connecting"
msgstr "conectando"
-#: src/lib/film.cc:272
+#: src/lib/film.cc:275
#, fuzzy
msgid "container"
msgstr "contenido"
-#: src/lib/film.cc:280
+#: src/lib/film.cc:283
msgid "content type"
msgstr "tipo de contenido"
@@ -606,6 +605,10 @@ msgstr "no se pudo encontrar decodificador de subtítutlos"
msgid "could not find video decoder"
msgstr "no se pudo encontrar decodificador de vídeo"
+#: src/lib/writer.cc:387
+msgid "could not move audio MXF into the DCP (%1)"
+msgstr ""
+
#: src/lib/sndfile_decoder.cc:45
#, fuzzy
msgid "could not open audio file for reading"
@@ -652,27 +655,22 @@ msgstr "no se pudo abrir la sesión SSH"
msgid "could not write to file %1 (%2)"
msgstr "No se pudo escribir el fichero remoto (%1)"
-#: src/lib/util.cc:566
+#: src/lib/util.cc:568
msgid "error during async_accept (%1)"
msgstr ""
-#: src/lib/util.cc:542
+#: src/lib/util.cc:544
msgid "error during async_connect (%1)"
msgstr ""
-#: src/lib/util.cc:615
+#: src/lib/util.cc:617
msgid "error during async_read (%1)"
msgstr ""
-#: src/lib/util.cc:587
+#: src/lib/util.cc:589
msgid "error during async_write (%1)"
msgstr ""
-#: src/lib/image_examiner.cc:68
-msgid "first frame in moving image directory is number %1"
-msgstr ""
-"primera imagen en el directorio de imagen en movimiento es la número %1"
-
#: src/lib/transcode_job.cc:94
msgid "frames per second"
msgstr "fotogramas por segundo"
@@ -693,7 +691,7 @@ msgstr "minuto"
msgid "minutes"
msgstr "minutos"
-#: src/lib/util.cc:687
+#: src/lib/util.cc:689
msgid "missing key %1 in key-value set"
msgstr "falta la clave %1 en el par clave-valor"
@@ -709,7 +707,7 @@ msgstr ""
msgid "multi-part subtitles not yet supported"
msgstr "todavía no se soportan subtítulos en múltiples partes"
-#: src/lib/film.cc:237 src/lib/film.cc:284
+#: src/lib/film.cc:240 src/lib/film.cc:287
msgid "name"
msgstr "nombre"
@@ -723,11 +721,11 @@ msgstr "todavía no se soportan subtítulos que no son en mapas de bits"
msgid "remaining"
msgstr "pendiente"
-#: src/lib/config.cc:79 src/lib/video_content.cc:169
+#: src/lib/config.cc:81 src/lib/video_content.cc:169
msgid "sRGB"
msgstr "sRGB"
-#: src/lib/config.cc:80
+#: src/lib/config.cc:82
msgid "sRGB non-linearised"
msgstr "sRGB no-lineal"
@@ -740,15 +738,18 @@ msgstr "segundos"
msgid "still"
msgstr "imagen fija"
-#: src/lib/image_examiner.cc:72
-msgid "there are %1 images in the directory but the last one is number %2"
-msgstr "hay %1 imágenes en el directorio, la última es la %2"
-
#: src/lib/ffmpeg_examiner.cc:169
#, fuzzy
msgid "unknown"
msgstr "Error desconocido"
+#~ msgid "first frame in moving image directory is number %1"
+#~ msgstr ""
+#~ "primera imagen en el directorio de imagen en movimiento es la número %1"
+
+#~ msgid "there are %1 images in the directory but the last one is number %2"
+#~ msgstr "hay %1 imágenes en el directorio, la última es la %2"
+
#, fuzzy
#~ msgid "Examining content"
#~ msgstr "Examinar contenido"
diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po
index 3e33e761a..8789b8738 100644
--- a/src/lib/po/fr_FR.po
+++ b/src/lib/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-05 18:00+0000\n"
+"POT-Creation-Date: 2014-01-07 20:01+0000\n"
"PO-Revision-Date: 2013-11-25 19:37+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -102,7 +102,7 @@ msgstr "Annulé"
msgid "Cannot handle pixel format %1 during %2"
msgstr "Format du pixel %1 non géré par %2"
-#: src/lib/util.cc:766
+#: src/lib/util.cc:768
msgid "Centre"
msgstr "Centre"
@@ -110,7 +110,7 @@ msgstr "Centre"
msgid "Checking existing image data"
msgstr ""
-#: src/lib/writer.cc:401
+#: src/lib/writer.cc:420
msgid "Computing audio digest"
msgstr ""
@@ -118,11 +118,11 @@ msgstr ""
msgid "Computing digest"
msgstr ""
-#: src/lib/writer.cc:398
+#: src/lib/writer.cc:417
msgid "Computing image digest"
msgstr ""
-#: src/lib/util.cc:796
+#: src/lib/util.cc:798
#, fuzzy
msgid "Content and DCP have the same rate.\n"
msgstr "Le DCP et la source ont les mêmes cadences.\n"
@@ -195,7 +195,7 @@ msgstr "lecture du fichier %1 impossible"
msgid "Could not open %1 to send"
msgstr "Ouverture de %1 pour envoi impossible"
-#: src/lib/film.cc:949
+#: src/lib/film.cc:952
msgid "Could not read DCP to make KDM for"
msgstr "DCP illisible pour fabrication de KDM"
@@ -211,12 +211,12 @@ msgstr "Écriture vers fichier distant (%1) impossible"
msgid "Cubic interpolating deinterlacer"
msgstr "Désentrelacement cubique interpolé"
-#: src/lib/util.cc:808
+#: src/lib/util.cc:810
#, fuzzy
msgid "DCP will run at %1%% of the content speed.\n"
msgstr "La cadence du DCP sera %1%% par rapport à la source.\n"
-#: src/lib/util.cc:799
+#: src/lib/util.cc:801
#, fuzzy
msgid "DCP will use every other frame of the content.\n"
msgstr "Le DCP utilisera une image sur deux de la source.\n"
@@ -259,12 +259,12 @@ msgstr "Filtre anti bourdonnement"
msgid "Dolby CP650 and CP750"
msgstr "Dolby CP750"
-#: src/lib/util.cc:801
+#: src/lib/util.cc:803
#, fuzzy
msgid "Each content frame will be doubled in the DCP.\n"
msgstr "Chaque image source sera dupliquée dans le DCP.\n"
-#: src/lib/util.cc:803
+#: src/lib/util.cc:805
#, fuzzy
msgid "Each content frame will be repeated %1 more times in the DCP.\n"
msgstr "Chaque image source sera dupliquée dans le DCP.\n"
@@ -273,7 +273,7 @@ msgstr "Chaque image source sera dupliquée dans le DCP.\n"
msgid "Email KDMs for %1"
msgstr ""
-#: src/lib/writer.cc:109
+#: src/lib/writer.cc:112
msgid "Encoding image data"
msgstr ""
@@ -361,15 +361,15 @@ msgstr "Désentrelaceur noyau"
msgid "Lanczos"
msgstr "Lanczos"
-#: src/lib/util.cc:764
+#: src/lib/util.cc:766
msgid "Left"
msgstr "Gauche"
-#: src/lib/util.cc:768
+#: src/lib/util.cc:770
msgid "Left surround"
msgstr "Arrière gauche"
-#: src/lib/util.cc:767
+#: src/lib/util.cc:769
msgid "Lfe (sub)"
msgstr "Basses fréquences"
@@ -427,15 +427,15 @@ msgstr "Public Service Announcement"
msgid "Rating"
msgstr "Classification"
-#: src/lib/config.cc:81 src/lib/config.cc:165
+#: src/lib/config.cc:83 src/lib/config.cc:167
msgid "Rec. 709"
msgstr "Rec. 709"
-#: src/lib/util.cc:765
+#: src/lib/util.cc:767
msgid "Right"
msgstr "Droite"
-#: src/lib/util.cc:769
+#: src/lib/util.cc:771
msgid "Right surround"
msgstr "Arrière droite"
@@ -483,7 +483,7 @@ msgstr ""
"Le disque contenant le film est plein. Libérez de l'espace et essayez à "
"nouveau."
-#: src/lib/film.cc:372
+#: src/lib/film.cc:375
msgid ""
"This film was created with an older version of DCP-o-matic, and "
"unfortunately it cannot be loaded into this version. You will need to "
@@ -541,7 +541,7 @@ msgstr "X"
msgid "Yet Another Deinterlacing Filter"
msgstr "Un autre filtre de désentrelacement"
-#: src/lib/film.cc:276
+#: src/lib/film.cc:279
msgid "You must add some content to the DCP before creating it"
msgstr "Ajoutez un contenu pour créer le DCP"
@@ -555,11 +555,11 @@ msgstr "%1 [diaporama]"
msgid "[still]"
msgstr "%1 [fixe]"
-#: src/lib/film.cc:237
+#: src/lib/film.cc:240
msgid "cannot contain slashes"
msgstr "slash interdit"
-#: src/lib/util.cc:546
+#: src/lib/util.cc:548
msgid "connect timed out"
msgstr "temps de connexion expiré"
@@ -567,11 +567,11 @@ msgstr "temps de connexion expiré"
msgid "connecting"
msgstr "connexion"
-#: src/lib/film.cc:272
+#: src/lib/film.cc:275
msgid "container"
msgstr "conteneur"
-#: src/lib/film.cc:280
+#: src/lib/film.cc:283
msgid "content type"
msgstr "type de contenu"
@@ -599,6 +599,10 @@ msgstr "décodeur de sous-titre introuvable"
msgid "could not find video decoder"
msgstr "décodeur vidéo introuvable"
+#: src/lib/writer.cc:387
+msgid "could not move audio MXF into the DCP (%1)"
+msgstr ""
+
#: src/lib/sndfile_decoder.cc:45
msgid "could not open audio file for reading"
msgstr "lecture du fichier audio impossible"
@@ -640,26 +644,22 @@ msgstr "démarrage de session SSH impossible"
msgid "could not write to file %1 (%2)"
msgstr "Écriture vers fichier distant (%1) impossible (%2)"
-#: src/lib/util.cc:566
+#: src/lib/util.cc:568
msgid "error during async_accept (%1)"
msgstr ""
-#: src/lib/util.cc:542
+#: src/lib/util.cc:544
msgid "error during async_connect (%1)"
msgstr ""
-#: src/lib/util.cc:615
+#: src/lib/util.cc:617
msgid "error during async_read (%1)"
msgstr ""
-#: src/lib/util.cc:587
+#: src/lib/util.cc:589
msgid "error during async_write (%1)"
msgstr ""
-#: src/lib/image_examiner.cc:68
-msgid "first frame in moving image directory is number %1"
-msgstr "la première image dans le dossier est la numéro %1"
-
#: src/lib/transcode_job.cc:94
msgid "frames per second"
msgstr "images par seconde"
@@ -680,7 +680,7 @@ msgstr "minute"
msgid "minutes"
msgstr "minutes"
-#: src/lib/util.cc:687
+#: src/lib/util.cc:689
msgid "missing key %1 in key-value set"
msgstr "clé %1 non sélectionnée"
@@ -696,7 +696,7 @@ msgstr ""
msgid "multi-part subtitles not yet supported"
msgstr "sous-titres en plusieurs parties non supportés"
-#: src/lib/film.cc:237 src/lib/film.cc:284
+#: src/lib/film.cc:240 src/lib/film.cc:287
msgid "name"
msgstr "nom"
@@ -710,11 +710,11 @@ msgstr "sous-titres non-bitmap non supportés actuellement"
msgid "remaining"
msgstr "restant"
-#: src/lib/config.cc:79 src/lib/video_content.cc:169
+#: src/lib/config.cc:81 src/lib/video_content.cc:169
msgid "sRGB"
msgstr "sRGB"
-#: src/lib/config.cc:80
+#: src/lib/config.cc:82
msgid "sRGB non-linearised"
msgstr "sRGB non linéarisé"
@@ -727,15 +727,17 @@ msgstr "secondes"
msgid "still"
msgstr "%1 [fixe]"
-#: src/lib/image_examiner.cc:72
-msgid "there are %1 images in the directory but the last one is number %2"
-msgstr "il y a %1 images dans le dossier mais la dernière est la numéro %2"
-
#: src/lib/ffmpeg_examiner.cc:169
#, fuzzy
msgid "unknown"
msgstr "Erreur inconnue"
+#~ msgid "first frame in moving image directory is number %1"
+#~ msgstr "la première image dans le dossier est la numéro %1"
+
+#~ msgid "there are %1 images in the directory but the last one is number %2"
+#~ msgstr "il y a %1 images dans le dossier mais la dernière est la numéro %2"
+
#, fuzzy
#~ msgid "Examining content"
#~ msgstr "Examen du contenu"
diff --git a/src/lib/po/it_IT.po b/src/lib/po/it_IT.po
index f4828103e..a1cbb19fb 100644
--- a/src/lib/po/it_IT.po
+++ b/src/lib/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: IT VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-05 18:00+0000\n"
+"POT-Creation-Date: 2014-01-07 20:01+0000\n"
"PO-Revision-Date: 2013-04-28 10:26+0100\n"
"Last-Translator: Maci <macibro@gmail.com>\n"
"Language-Team: \n"
@@ -103,7 +103,7 @@ msgstr "Cancellato"
msgid "Cannot handle pixel format %1 during %2"
msgstr "Non posso gestire il formato di pixel %1 durante %2"
-#: src/lib/util.cc:766
+#: src/lib/util.cc:768
msgid "Centre"
msgstr "Centro"
@@ -111,7 +111,7 @@ msgstr "Centro"
msgid "Checking existing image data"
msgstr ""
-#: src/lib/writer.cc:401
+#: src/lib/writer.cc:420
msgid "Computing audio digest"
msgstr ""
@@ -119,11 +119,11 @@ msgstr ""
msgid "Computing digest"
msgstr ""
-#: src/lib/writer.cc:398
+#: src/lib/writer.cc:417
msgid "Computing image digest"
msgstr ""
-#: src/lib/util.cc:796
+#: src/lib/util.cc:798
#, fuzzy
msgid "Content and DCP have the same rate.\n"
msgstr "Il DCP e il sorgente hanno la stessa frequenza.\n"
@@ -197,7 +197,7 @@ msgstr "non riesco ad aprire %1"
msgid "Could not open %1 to send"
msgstr "Non posso aprire %1 da inviare"
-#: src/lib/film.cc:949
+#: src/lib/film.cc:952
msgid "Could not read DCP to make KDM for"
msgstr ""
@@ -213,12 +213,12 @@ msgstr "Non posso scrivere il file remoto (%1)"
msgid "Cubic interpolating deinterlacer"
msgstr "Deinterlacciatore cubico interpolato"
-#: src/lib/util.cc:808
+#: src/lib/util.cc:810
#, fuzzy
msgid "DCP will run at %1%% of the content speed.\n"
msgstr "Il DCP andrà al %1%% della velocità del sorgente.\n"
-#: src/lib/util.cc:799
+#: src/lib/util.cc:801
#, fuzzy
msgid "DCP will use every other frame of the content.\n"
msgstr "Il DCP userà ogni altro fotogramma del sorgente.\n"
@@ -261,12 +261,12 @@ msgstr "Filtro deringing"
msgid "Dolby CP650 and CP750"
msgstr "Dolby CP750"
-#: src/lib/util.cc:801
+#: src/lib/util.cc:803
#, fuzzy
msgid "Each content frame will be doubled in the DCP.\n"
msgstr "Ogni fotogramma del sorgente sarà raddoppiato nel DCP.\n"
-#: src/lib/util.cc:803
+#: src/lib/util.cc:805
#, fuzzy
msgid "Each content frame will be repeated %1 more times in the DCP.\n"
msgstr "Ogni fotogramma del sorgente sarà raddoppiato nel DCP.\n"
@@ -275,7 +275,7 @@ msgstr "Ogni fotogramma del sorgente sarà raddoppiato nel DCP.\n"
msgid "Email KDMs for %1"
msgstr ""
-#: src/lib/writer.cc:109
+#: src/lib/writer.cc:112
msgid "Encoding image data"
msgstr ""
@@ -363,15 +363,15 @@ msgstr "Deinterlacciatore Kernel"
msgid "Lanczos"
msgstr "Lanczos"
-#: src/lib/util.cc:764
+#: src/lib/util.cc:766
msgid "Left"
msgstr "Sinistro"
-#: src/lib/util.cc:768
+#: src/lib/util.cc:770
msgid "Left surround"
msgstr "Surround sinistro"
-#: src/lib/util.cc:767
+#: src/lib/util.cc:769
msgid "Lfe (sub)"
msgstr "Lfe(sub)"
@@ -429,16 +429,16 @@ msgstr "Annuncio di pubblico servizio"
msgid "Rating"
msgstr "Punteggio"
-#: src/lib/config.cc:81 src/lib/config.cc:165
+#: src/lib/config.cc:83 src/lib/config.cc:167
#, fuzzy
msgid "Rec. 709"
msgstr "Rec 709"
-#: src/lib/util.cc:765
+#: src/lib/util.cc:767
msgid "Right"
msgstr "Destro"
-#: src/lib/util.cc:769
+#: src/lib/util.cc:771
msgid "Right surround"
msgstr "Surround destro"
@@ -486,7 +486,7 @@ msgstr ""
"Sul disco dove è memorizzato il film non c'è abbastanza spazio. Liberare "
"altro spazio e riprovare."
-#: src/lib/film.cc:372
+#: src/lib/film.cc:375
msgid ""
"This film was created with an older version of DCP-o-matic, and "
"unfortunately it cannot be loaded into this version. You will need to "
@@ -541,7 +541,7 @@ msgstr "X"
msgid "Yet Another Deinterlacing Filter"
msgstr "Altro filtro di deinterlacciamento"
-#: src/lib/film.cc:276
+#: src/lib/film.cc:279
msgid "You must add some content to the DCP before creating it"
msgstr ""
@@ -554,11 +554,11 @@ msgstr ""
msgid "[still]"
msgstr "ancora"
-#: src/lib/film.cc:237
+#: src/lib/film.cc:240
msgid "cannot contain slashes"
msgstr "non può contenere barre"
-#: src/lib/util.cc:546
+#: src/lib/util.cc:548
msgid "connect timed out"
msgstr "connessione scaduta"
@@ -566,12 +566,12 @@ msgstr "connessione scaduta"
msgid "connecting"
msgstr "mi sto connettendo"
-#: src/lib/film.cc:272
+#: src/lib/film.cc:275
#, fuzzy
msgid "container"
msgstr "contenuto"
-#: src/lib/film.cc:280
+#: src/lib/film.cc:283
msgid "content type"
msgstr "tipo di contenuto"
@@ -599,6 +599,10 @@ msgstr "non riesco a trovare il decoder dei sottotitoli"
msgid "could not find video decoder"
msgstr "non riesco a trovare il decoder video"
+#: src/lib/writer.cc:387
+msgid "could not move audio MXF into the DCP (%1)"
+msgstr ""
+
#: src/lib/sndfile_decoder.cc:45
#, fuzzy
msgid "could not open audio file for reading"
@@ -642,26 +646,22 @@ msgstr "non posso avviare la sessione SSH"
msgid "could not write to file %1 (%2)"
msgstr "non posso scrivere il file (%1)"
-#: src/lib/util.cc:566
+#: src/lib/util.cc:568
msgid "error during async_accept (%1)"
msgstr ""
-#: src/lib/util.cc:542
+#: src/lib/util.cc:544
msgid "error during async_connect (%1)"
msgstr ""
-#: src/lib/util.cc:615
+#: src/lib/util.cc:617
msgid "error during async_read (%1)"
msgstr ""
-#: src/lib/util.cc:587
+#: src/lib/util.cc:589
msgid "error during async_write (%1)"
msgstr ""
-#: src/lib/image_examiner.cc:68
-msgid "first frame in moving image directory is number %1"
-msgstr ""
-
#: src/lib/transcode_job.cc:94
msgid "frames per second"
msgstr "fotogrammi al secondo"
@@ -682,7 +682,7 @@ msgstr "minuto"
msgid "minutes"
msgstr "minuti"
-#: src/lib/util.cc:687
+#: src/lib/util.cc:689
msgid "missing key %1 in key-value set"
msgstr "persa la chiave %1 tra i valori chiave"
@@ -698,7 +698,7 @@ msgstr ""
msgid "multi-part subtitles not yet supported"
msgstr "sottotitoli multi-part non ancora supportati"
-#: src/lib/film.cc:237 src/lib/film.cc:284
+#: src/lib/film.cc:240 src/lib/film.cc:287
msgid "name"
msgstr "nome"
@@ -712,11 +712,11 @@ msgstr "sottotitoli non-bitmap non ancora supportati"
msgid "remaining"
msgstr "restano"
-#: src/lib/config.cc:79 src/lib/video_content.cc:169
+#: src/lib/config.cc:81 src/lib/video_content.cc:169
msgid "sRGB"
msgstr "sRGB"
-#: src/lib/config.cc:80
+#: src/lib/config.cc:82
msgid "sRGB non-linearised"
msgstr ""
@@ -729,10 +729,6 @@ msgstr "secondi"
msgid "still"
msgstr "ancora"
-#: src/lib/image_examiner.cc:72
-msgid "there are %1 images in the directory but the last one is number %2"
-msgstr ""
-
#: src/lib/ffmpeg_examiner.cc:169
#, fuzzy
msgid "unknown"
diff --git a/src/lib/po/sv_SE.po b/src/lib/po/sv_SE.po
index fcd4564ba..3d0b5f546 100644
--- a/src/lib/po/sv_SE.po
+++ b/src/lib/po/sv_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-05 18:00+0000\n"
+"POT-Creation-Date: 2014-01-07 20:01+0000\n"
"PO-Revision-Date: 2013-04-10 15:35+0100\n"
"Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n"
"Language-Team: \n"
@@ -103,7 +103,7 @@ msgstr "Avbruten"
msgid "Cannot handle pixel format %1 during %2"
msgstr "Kan inte hantera pixelformat %1 under %2"
-#: src/lib/util.cc:766
+#: src/lib/util.cc:768
msgid "Centre"
msgstr "Mitt"
@@ -111,7 +111,7 @@ msgstr "Mitt"
msgid "Checking existing image data"
msgstr ""
-#: src/lib/writer.cc:401
+#: src/lib/writer.cc:420
msgid "Computing audio digest"
msgstr ""
@@ -119,11 +119,11 @@ msgstr ""
msgid "Computing digest"
msgstr ""
-#: src/lib/writer.cc:398
+#: src/lib/writer.cc:417
msgid "Computing image digest"
msgstr ""
-#: src/lib/util.cc:796
+#: src/lib/util.cc:798
#, fuzzy
msgid "Content and DCP have the same rate.\n"
msgstr "DCP och källa har samma bildfrekvens.\n"
@@ -197,7 +197,7 @@ msgstr "kunde inte öppna fil %1"
msgid "Could not open %1 to send"
msgstr "Kunde inte öppna %1 för att skicka"
-#: src/lib/film.cc:949
+#: src/lib/film.cc:952
msgid "Could not read DCP to make KDM for"
msgstr ""
@@ -213,12 +213,12 @@ msgstr "Kunde inte skriva till fjärrfil (%1)"
msgid "Cubic interpolating deinterlacer"
msgstr "Kubiskt interpolerande avflätare"
-#: src/lib/util.cc:808
+#: src/lib/util.cc:810
#, fuzzy
msgid "DCP will run at %1%% of the content speed.\n"
msgstr "DCP kommer att köras på %1%% av källans hastighet.\n"
-#: src/lib/util.cc:799
+#: src/lib/util.cc:801
#, fuzzy
msgid "DCP will use every other frame of the content.\n"
msgstr "DCP kommer att använda varannan bild från källan.\n"
@@ -261,12 +261,12 @@ msgstr "Avringningsfilter"
msgid "Dolby CP650 and CP750"
msgstr "Dolby CP750"
-#: src/lib/util.cc:801
+#: src/lib/util.cc:803
#, fuzzy
msgid "Each content 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"
-#: src/lib/util.cc:803
+#: src/lib/util.cc:805
#, fuzzy
msgid "Each content frame will be repeated %1 more times in the DCP.\n"
msgstr "Varje bild från källan kommer att användas två gånger i DCPn.\n"
@@ -275,7 +275,7 @@ msgstr "Varje bild från källan kommer att användas två gånger i DCPn.\n"
msgid "Email KDMs for %1"
msgstr ""
-#: src/lib/writer.cc:109
+#: src/lib/writer.cc:112
msgid "Encoding image data"
msgstr ""
@@ -363,15 +363,15 @@ msgstr "Kernel-avflätare"
msgid "Lanczos"
msgstr "Lanczos"
-#: src/lib/util.cc:764
+#: src/lib/util.cc:766
msgid "Left"
msgstr "Vänster"
-#: src/lib/util.cc:768
+#: src/lib/util.cc:770
msgid "Left surround"
msgstr "Vänster surround"
-#: src/lib/util.cc:767
+#: src/lib/util.cc:769
msgid "Lfe (sub)"
msgstr "Lfe (sub)"
@@ -429,16 +429,16 @@ msgstr "Offentligt Servicemeddelande"
msgid "Rating"
msgstr "Klassificeringsklipp"
-#: src/lib/config.cc:81 src/lib/config.cc:165
+#: src/lib/config.cc:83 src/lib/config.cc:167
#, fuzzy
msgid "Rec. 709"
msgstr "Rec 709"
-#: src/lib/util.cc:765
+#: src/lib/util.cc:767
msgid "Right"
msgstr "Höger"
-#: src/lib/util.cc:769
+#: src/lib/util.cc:771
msgid "Right surround"
msgstr "Höger surround"
@@ -486,7 +486,7 @@ msgstr ""
"Enheten som filmen lagras på har för lite ledigt utrymme. Frigör utrymme och "
"försök igen."
-#: src/lib/film.cc:372
+#: src/lib/film.cc:375
msgid ""
"This film was created with an older version of DCP-o-matic, and "
"unfortunately it cannot be loaded into this version. You will need to "
@@ -544,7 +544,7 @@ msgstr "X"
msgid "Yet Another Deinterlacing Filter"
msgstr "Yet Another Deinterlacing Filter"
-#: src/lib/film.cc:276
+#: src/lib/film.cc:279
msgid "You must add some content to the DCP before creating it"
msgstr ""
@@ -557,12 +557,12 @@ msgstr ""
msgid "[still]"
msgstr "stillbild"
-#: src/lib/film.cc:237
+#: src/lib/film.cc:240
msgid "cannot contain slashes"
msgstr "får inte innehålla snedstreck"
# Svengelska
-#: src/lib/util.cc:546
+#: src/lib/util.cc:548
#, fuzzy
msgid "connect timed out"
msgstr "uppkopplingen tajmade ur"
@@ -571,12 +571,12 @@ msgstr "uppkopplingen tajmade ur"
msgid "connecting"
msgstr "kopplar upp"
-#: src/lib/film.cc:272
+#: src/lib/film.cc:275
#, fuzzy
msgid "container"
msgstr "innehåll"
-#: src/lib/film.cc:280
+#: src/lib/film.cc:283
msgid "content type"
msgstr "innehållstyp"
@@ -604,6 +604,10 @@ msgstr "kunde inte hitta undertext-avkodare"
msgid "could not find video decoder"
msgstr "kunde inte hitta video-avkodare"
+#: src/lib/writer.cc:387
+msgid "could not move audio MXF into the DCP (%1)"
+msgstr ""
+
#: src/lib/sndfile_decoder.cc:45
#, fuzzy
msgid "could not open audio file for reading"
@@ -647,26 +651,22 @@ msgstr "kunde inte starta SSH-session"
msgid "could not write to file %1 (%2)"
msgstr "kunde inte skriva till fil %1 (%2)"
-#: src/lib/util.cc:566
+#: src/lib/util.cc:568
msgid "error during async_accept (%1)"
msgstr ""
-#: src/lib/util.cc:542
+#: src/lib/util.cc:544
msgid "error during async_connect (%1)"
msgstr ""
-#: src/lib/util.cc:615
+#: src/lib/util.cc:617
msgid "error during async_read (%1)"
msgstr ""
-#: src/lib/util.cc:587
+#: src/lib/util.cc:589
msgid "error during async_write (%1)"
msgstr ""
-#: src/lib/image_examiner.cc:68
-msgid "first frame in moving image directory is number %1"
-msgstr ""
-
#: src/lib/transcode_job.cc:94
msgid "frames per second"
msgstr "bilder per sekund"
@@ -687,7 +687,7 @@ msgstr "minut"
msgid "minutes"
msgstr "minuter"
-#: src/lib/util.cc:687
+#: src/lib/util.cc:689
msgid "missing key %1 in key-value set"
msgstr "saknad nyckel %1 i nyckel-värde grupp"
@@ -703,7 +703,7 @@ msgstr ""
msgid "multi-part subtitles not yet supported"
msgstr "undertexter i flera delar stöds inte ännu"
-#: src/lib/film.cc:237 src/lib/film.cc:284
+#: src/lib/film.cc:240 src/lib/film.cc:287
msgid "name"
msgstr "namn"
@@ -717,11 +717,11 @@ msgstr "icke-rastergrafiska undertexter stöds inte ännu"
msgid "remaining"
msgstr "återstående tid"
-#: src/lib/config.cc:79 src/lib/video_content.cc:169
+#: src/lib/config.cc:81 src/lib/video_content.cc:169
msgid "sRGB"
msgstr "sRGB"
-#: src/lib/config.cc:80
+#: src/lib/config.cc:82
msgid "sRGB non-linearised"
msgstr ""
@@ -734,10 +734,6 @@ msgstr "sekunder"
msgid "still"
msgstr "stillbild"
-#: src/lib/image_examiner.cc:72
-msgid "there are %1 images in the directory but the last one is number %2"
-msgstr ""
-
#: src/lib/ffmpeg_examiner.cc:169
#, fuzzy
msgid "unknown"
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc
index 48bdb56ec..d3acc7d2e 100644
--- a/src/lib/sndfile_content.cc
+++ b/src/lib/sndfile_content.cc
@@ -43,10 +43,10 @@ SndfileContent::SndfileContent (shared_ptr<const Film> f, boost::filesystem::pat
}
-SndfileContent::SndfileContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int)
+SndfileContent::SndfileContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int version)
: Content (f, node)
, AudioContent (f, node)
- , _audio_mapping (node->node_child ("AudioMapping"))
+ , _audio_mapping (node->node_child ("AudioMapping"), version)
{
_audio_channels = node->number_child<int> ("AudioChannels");
_audio_length = node->number_child<AudioFrame> ("AudioLength");
diff --git a/src/lib/update.cc b/src/lib/update.cc
new file mode 100644
index 000000000..a98ee5b5d
--- /dev/null
+++ b/src/lib/update.cc
@@ -0,0 +1,170 @@
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <string>
+#include <sstream>
+#include <boost/algorithm/string.hpp>
+#include <curl/curl.h>
+#include <libcxml/cxml.h>
+#include "update.h"
+#include "version.h"
+#include "ui_signaller.h"
+
+#define BUFFER_SIZE 1024
+
+using std::cout;
+using std::min;
+using std::string;
+using std::stringstream;
+using boost::lexical_cast;
+
+UpdateChecker* UpdateChecker::_instance = 0;
+
+static size_t
+write_callback_wrapper (void* data, size_t size, size_t nmemb, void* user)
+{
+ return reinterpret_cast<UpdateChecker*>(user)->write_callback (data, size, nmemb);
+}
+
+UpdateChecker::UpdateChecker ()
+ : _buffer (new char[BUFFER_SIZE])
+ , _offset (0)
+ , _curl (0)
+ , _state (NOT_RUN)
+ , _emits (0)
+ , _to_do (0)
+{
+ curl_global_init (CURL_GLOBAL_ALL);
+ _curl = curl_easy_init ();
+
+ curl_easy_setopt (_curl, CURLOPT_URL, "http://dcpomatic.com/update");
+ curl_easy_setopt (_curl, CURLOPT_WRITEFUNCTION, write_callback_wrapper);
+ curl_easy_setopt (_curl, CURLOPT_WRITEDATA, this);
+ curl_easy_setopt (_curl, CURLOPT_TIMEOUT, 20);
+
+ string const agent = "dcpomatic/" + string (dcpomatic_version);
+ curl_easy_setopt (_curl, CURLOPT_USERAGENT, agent.c_str ());
+
+ _thread = new boost::thread (boost::bind (&UpdateChecker::thread, this));
+}
+
+UpdateChecker::~UpdateChecker ()
+{
+ /* We are not cleaning up our thread, but hey well */
+
+ curl_easy_cleanup (_curl);
+ curl_global_cleanup ();
+ delete[] _buffer;
+}
+
+void
+UpdateChecker::run ()
+{
+ boost::mutex::scoped_lock lm (_process_mutex);
+ _to_do++;
+ _condition.notify_one ();
+}
+
+void
+UpdateChecker::thread ()
+{
+ while (1) {
+ boost::mutex::scoped_lock lock (_process_mutex);
+ while (_to_do == 0) {
+ _condition.wait (lock);
+ }
+ --_to_do;
+ lock.unlock ();
+
+ try {
+ _offset = 0;
+
+ int r = curl_easy_perform (_curl);
+ if (r != CURLE_OK) {
+ set_state (FAILED);
+ return;
+ }
+
+ _buffer[_offset] = '\0';
+ stringstream s;
+ s << _buffer;
+ cxml::Document doc ("Update");
+ doc.read_stream (s);
+
+ {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ _stable = doc.string_child ("Stable");
+ _test = doc.string_child ("Test");
+ }
+
+ string current = string (dcpomatic_version);
+ bool current_pre = false;
+ if (boost::algorithm::ends_with (current, "pre")) {
+ current = current.substr (0, current.length() - 3);
+ current_pre = true;
+ }
+
+ float current_float = lexical_cast<float> (current);
+ if (current_pre) {
+ current_float -= 0.005;
+ }
+
+ if (current_float < lexical_cast<float> (_stable)) {
+ set_state (YES);
+ } else {
+ set_state (NO);
+ }
+ } catch (...) {
+ set_state (FAILED);
+ }
+ }
+}
+
+size_t
+UpdateChecker::write_callback (void* data, size_t size, size_t nmemb)
+{
+ size_t const t = min (size * nmemb, size_t (BUFFER_SIZE - _offset - 1));
+ memcpy (_buffer + _offset, data, t);
+ _offset += t;
+ return t;
+}
+
+void
+UpdateChecker::set_state (State s)
+{
+ {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ _state = s;
+ _emits++;
+ }
+
+ ui_signaller->emit (boost::bind (boost::ref (StateChanged)));
+}
+
+UpdateChecker *
+UpdateChecker::instance ()
+{
+ if (!_instance) {
+ _instance = new UpdateChecker ();
+ }
+
+ return _instance;
+}
+
+
diff --git a/src/lib/update.h b/src/lib/update.h
new file mode 100644
index 000000000..e96ccec31
--- /dev/null
+++ b/src/lib/update.h
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/signals2.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition.hpp>
+#include <boost/thread.hpp>
+#include <curl/curl.h>
+
+class UpdateChecker
+{
+public:
+ UpdateChecker ();
+ ~UpdateChecker ();
+
+ void run ();
+
+ enum State {
+ YES,
+ FAILED,
+ NO,
+ NOT_RUN
+ };
+
+ State state () {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ return _state;
+ }
+
+ std::string stable () {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ return _stable;
+ }
+
+ std::string test () {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ return _test;
+ }
+
+ /** @return true if the list signal emission was the first */
+ bool last_emit_was_first () const {
+ boost::mutex::scoped_lock lm (_data_mutex);
+ return _emits == 1;
+ }
+
+ size_t write_callback (void *, size_t, size_t);
+
+ boost::signals2::signal<void (void)> StateChanged;
+
+ static UpdateChecker* instance ();
+
+private:
+ static UpdateChecker* _instance;
+
+ void set_state (State);
+ void thread ();
+
+ char* _buffer;
+ int _offset;
+ CURL* _curl;
+
+ /** mutex to protect _state, _stable, _test and _emits */
+ mutable boost::mutex _data_mutex;
+ State _state;
+ std::string _stable;
+ std::string _test;
+ int _emits;
+
+ boost::thread* _thread;
+ boost::mutex _process_mutex;
+ boost::condition _condition;
+ int _to_do;
+};
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index d03aa9ce4..8d901cbcd 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -129,6 +129,7 @@ protected:
void take_from_video_examiner (boost::shared_ptr<VideoExaminer>);
VideoFrame _video_length;
+ float _video_frame_rate;
private:
friend class ffmpeg_pts_offset_test;
@@ -139,7 +140,6 @@ private:
void setup_default_colour_conversion ();
libdcp::Size _video_size;
- float _video_frame_rate;
VideoFrameType _video_frame_type;
Crop _crop;
Ratio const * _ratio;
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 5fc848195..320528682 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -48,7 +48,7 @@ using std::cout;
using boost::shared_ptr;
using boost::weak_ptr;
-int const Writer::_maximum_frames_in_memory = 8;
+int const Writer::_maximum_frames_in_memory = Config::instance()->num_local_encoding_threads() + 4;
Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
: _film (f)
@@ -94,9 +94,16 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
_picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0);
/* Write the sound asset into the film directory so that we leave the creation
- of the DCP directory until the last minute.
+ of the DCP directory until the last minute. Some versions of windows inexplicably
+ don't like overwriting existing files here, so try to remove it using boost.
*/
- _sound_asset.reset (new libdcp::SoundAsset (_film->dir ("."), _film->audio_mxf_filename ()));
+ boost::system::error_code ec;
+ boost::filesystem::remove (_film->file (_film->audio_mxf_filename ()), ec);
+ if (ec) {
+ _film->log()->log (String::compose ("Could not remove existing audio MXF file (%1)", ec.value ()));
+ }
+
+ _sound_asset.reset (new libdcp::SoundAsset (_film->directory (), _film->audio_mxf_filename ()));
_sound_asset->set_edit_rate (_film->video_frame_rate ());
_sound_asset->set_channels (_film->audio_channels ());
_sound_asset->set_sampling_rate (_film->audio_frame_rate ());
@@ -172,16 +179,16 @@ Writer::write (shared_ptr<const AudioBuffers> audio)
_sound_asset_writer->write (audio->data(), audio->frames());
}
-/** This must be called from Writer::thread() with an appropriate lock held,
- * and with _queue sorted.
- */
+/** This must be called from Writer::thread() with an appropriate lock held */
bool
-Writer::have_sequenced_image_at_queue_head () const
+Writer::have_sequenced_image_at_queue_head ()
{
if (_queue.empty ()) {
return false;
}
+ _queue.sort ();
+
/* The queue should contain only EYES_LEFT/EYES_RIGHT pairs or EYES_BOTH */
if (_queue.front().eyes == EYES_BOTH) {
@@ -212,8 +219,6 @@ try
while (1) {
- _queue.sort ();
-
if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
break;
}
@@ -227,7 +232,7 @@ try
return;
}
- /* Write any frames that we can write; i.e. those that are in sequence */
+ /* Write any frames that we can write; i.e. those that are in sequence. */
while (have_sequenced_image_at_queue_head ()) {
QueueItem qi = _queue.front ();
_queue.pop_front ();
@@ -293,7 +298,8 @@ try
Write some FULL frames to disk.
*/
- /* Find one */
+ /* Find one from the back of the queue */
+ _queue.sort ();
list<QueueItem>::reverse_iterator i = _queue.rbegin ();
while (i != _queue.rend() && (i->type != QueueItem::FULL || !i->encoded)) {
++i;
@@ -373,18 +379,16 @@ Writer::finish ()
_picture_asset->set_file_name (_film->video_mxf_filename ());
/* Move the audio MXF into the DCP */
-
- boost::filesystem::path audio_from;
- audio_from /= _film->dir (".");
- audio_from /= _film->audio_mxf_filename ();
boost::filesystem::path audio_to;
audio_to /= _film->dir (_film->dcp_name ());
audio_to /= _film->audio_mxf_filename ();
- boost::filesystem::rename (audio_from, audio_to, ec);
+ boost::filesystem::rename (_film->file (_film->audio_mxf_filename ()), audio_to, ec);
if (ec) {
- throw FileError (String::compose (_("could not move audio MXF into the DCP (%1)"), ec.value ()), audio_from);
+ throw FileError (
+ String::compose (_("could not move audio MXF into the DCP (%1)"), ec.value ()), _film->file (_film->audio_mxf_filename ())
+ );
}
_sound_asset->set_directory (_film->dir (_film->dcp_name ()));
diff --git a/src/lib/writer.h b/src/lib/writer.h
index 17ce42572..842d6a55d 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -85,7 +85,7 @@ private:
void thread ();
void check_existing_picture_mxf ();
bool check_existing_picture_mxf_frame (FILE *, int, Eyes);
- bool have_sequenced_image_at_queue_head () const;
+ bool have_sequenced_image_at_queue_head ();
/** our Film */
boost::shared_ptr<const Film> _film;
diff --git a/src/lib/wscript b/src/lib/wscript
index 25186a3d3..81a55a160 100644
--- a/src/lib/wscript
+++ b/src/lib/wscript
@@ -57,6 +57,7 @@ sources = """
transcoder.cc
types.cc
ui_signaller.cc
+ update.cc
util.cc
video_content.cc
video_decoder.cc