diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-26 23:36:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-26 23:36:24 +0100 |
| commit | 4616b19fb5241a54c9d57f7a91bb975f41aed14b (patch) | |
| tree | d067450cb12dd3629fe88ef9a578c6b1cabe7884 /src/lib | |
| parent | f1d30fb114b3b2c6ccd8fdf5823e7cd6b26c1eef (diff) | |
| parent | 20fa26ea6ecfdbecea8bb1230c8388cce3fd521f (diff) | |
Merge master.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/encoder.cc | 23 | ||||
| -rw-r--r-- | src/lib/encoder.h | 5 | ||||
| -rw-r--r-- | src/lib/film.cc | 55 | ||||
| -rw-r--r-- | src/lib/film.h | 8 | ||||
| -rw-r--r-- | src/lib/image.cc | 1 | ||||
| -rw-r--r-- | src/lib/kdm.cc | 22 | ||||
| -rw-r--r-- | src/lib/kdm.h | 5 | ||||
| -rw-r--r-- | src/lib/playlist.cc | 4 | ||||
| -rw-r--r-- | src/lib/playlist.h | 6 | ||||
| -rw-r--r-- | src/lib/po/de_DE.po | 22 | ||||
| -rw-r--r-- | src/lib/po/es_ES.po | 22 | ||||
| -rw-r--r-- | src/lib/po/fr_FR.po | 22 | ||||
| -rw-r--r-- | src/lib/po/it_IT.po | 22 | ||||
| -rw-r--r-- | src/lib/po/nl_NL.po | 22 | ||||
| -rw-r--r-- | src/lib/po/sv_SE.po | 22 | ||||
| -rw-r--r-- | src/lib/send_kdm_email_job.cc | 6 | ||||
| -rw-r--r-- | src/lib/send_kdm_email_job.h | 5 | ||||
| -rw-r--r-- | src/lib/server.cc | 10 | ||||
| -rw-r--r-- | src/lib/server.h | 4 | ||||
| -rw-r--r-- | src/lib/util.h | 2 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 15 | ||||
| -rw-r--r-- | src/lib/video_content.h | 1 | ||||
| -rw-r--r-- | src/lib/writer.cc | 9 |
23 files changed, 194 insertions, 119 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 5dc9e47c7..0756586a9 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -106,8 +106,8 @@ Encoder::process_end () /* Keep waking workers until the queue is empty */ while (!_queue.empty ()) { - _condition.notify_all (); - _condition.wait (lock); + _empty_condition.notify_all (); + _full_condition.wait (lock); } lock.unlock (); @@ -192,7 +192,7 @@ Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf) /* Wait until the queue has gone down a bit */ while (_queue.size() >= _threads.size() * 2 && !_terminate) { LOG_TIMING ("decoder sleeps with queue of %1", _queue.size()); - _condition.wait (lock); + _full_condition.wait (lock); LOG_TIMING ("decoder wakes with queue of %1", _queue.size()); } @@ -223,8 +223,11 @@ Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf) _film->log() ) )); - - _condition.notify_all (); + + /* The queue might not be empty any more, so notify anything which is + waiting on that. + */ + _empty_condition.notify_all (); } if (pvf->eyes() != EYES_LEFT) { @@ -244,7 +247,8 @@ Encoder::terminate_threads () { boost::mutex::scoped_lock lock (_mutex); _terminate = true; - _condition.notify_all (); + _full_condition.notify_all (); + _empty_condition.notify_all (); } for (list<boost::thread *>::iterator i = _threads.begin(); i != _threads.end(); ++i) { @@ -267,12 +271,12 @@ try */ int remote_backoff = 0; - while (1) { + while (true) { LOG_TIMING ("[%1] encoder thread sleeps", boost::this_thread::get_id()); boost::mutex::scoped_lock lock (_mutex); while (_queue.empty () && !_terminate) { - _condition.wait (lock); + _empty_condition.wait (lock); } if (_terminate) { @@ -334,8 +338,9 @@ try dcpomatic_sleep (remote_backoff); } + /* The queue might not be full any more, so notify anything that is waiting on that */ lock.lock (); - _condition.notify_all (); + _full_condition.notify_all (); } } catch (...) diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 678cdf04e..6bb97012a 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -110,7 +110,10 @@ private: std::list<boost::shared_ptr<DCPVideoFrame> > _queue; std::list<boost::thread *> _threads; mutable boost::mutex _mutex; - boost::condition _condition; + /** condition to manage thread wakeups when we have nothing to do */ + boost::condition _empty_condition; + /** condition to manage thread wakeups when we have too much to do */ + boost::condition _full_condition; boost::shared_ptr<Writer> _writer; Waker _waker; diff --git a/src/lib/film.cc b/src/lib/film.cc index b01a70b72..1456314be 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -77,9 +77,11 @@ using boost::to_upper_copy; using boost::ends_with; using boost::starts_with; using boost::optional; +using boost::is_any_of; using dcp::Size; using dcp::Signer; using dcp::raw_convert; +using dcp::raw_convert; #define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); #define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::TYPE_GENERAL); @@ -491,16 +493,39 @@ Film::isdcf_name (bool if_created_now) const stringstream d; string raw_name = name (); + + /* Split the raw name up into words */ + vector<string> words; + split (words, raw_name, is_any_of (" ")); + string fixed_name; - bool cap_next = true; - for (size_t i = 0; i < raw_name.length(); ++i) { - if (raw_name[i] == ' ') { - cap_next = true; - } else if (cap_next) { - fixed_name += toupper (raw_name[i]); - cap_next = false; - } else { - fixed_name += tolower (raw_name[i]); + + /* Add each word to fixed_name */ + for (vector<string>::const_iterator i = words.begin(); i != words.end(); ++i) { + string w = *i; + + /* First letter is always capitalised */ + w[0] = toupper (w[0]); + + /* Count caps in w */ + size_t caps = 0; + for (size_t i = 0; i < w.size(); ++i) { + if (isupper (w[i])) { + ++caps; + } + } + + /* If w is all caps make the rest of it lower case, otherwise + leave it alone. + */ + if (caps == w.size ()) { + for (size_t i = 1; i < w.size(); ++i) { + w[i] = tolower (w[i]); + } + } + + for (size_t i = 0; i < w.size(); ++i) { + fixed_name += w[i]; } } @@ -829,7 +854,7 @@ Film::j2c_path (int f, Eyes e, bool t) const return file (p); } -/** Find all the DCPs in our directory that can be libdcp::DCP::read() and return details of their CPLs */ +/** Find all the DCPs in our directory that can be dcp::DCP::read() and return details of their CPLs */ vector<CPLSummary> Film::cpls () const { @@ -1027,13 +1052,14 @@ Film::make_kdm ( shared_ptr<dcp::Certificate> target, boost::filesystem::path cpl_file, dcp::LocalTime from, - dcp::LocalTime until + dcp::LocalTime until, + dcp::Formulation formulation ) const { shared_ptr<const dcp::CPL> cpl (new dcp::CPL (cpl_file)); return dcp::DecryptedKDM ( cpl, from, until, "DCP-o-matic", cpl->content_title_text(), dcp::LocalTime().as_string() - ).encrypt (make_signer(), target); + ).encrypt (make_signer(), target, formulation); } list<dcp::EncryptedKDM> @@ -1041,13 +1067,14 @@ Film::make_kdms ( list<shared_ptr<Screen> > screens, boost::filesystem::path dcp, dcp::LocalTime from, - dcp::LocalTime until + dcp::LocalTime until, + dcp::Formulation formulation ) const { list<dcp::EncryptedKDM> kdms; for (list<shared_ptr<Screen> >::iterator i = screens.begin(); i != screens.end(); ++i) { - kdms.push_back (make_kdm ((*i)->certificate, dcp, from, until)); + kdms.push_back (make_kdm ((*i)->certificate, dcp, from, until, formulation)); } return kdms; diff --git a/src/lib/film.h b/src/lib/film.h index a44c606d6..178fd9002 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -123,14 +123,16 @@ public: boost::shared_ptr<dcp::Certificate> target, boost::filesystem::path cpl_file, dcp::LocalTime from, - dcp::LocalTime until + dcp::LocalTime until, + dcp::Formulation formulation ) const; std::list<dcp::EncryptedKDM> make_kdms ( std::list<boost::shared_ptr<Screen> >, boost::filesystem::path cpl_file, dcp::LocalTime from, - dcp::LocalTime until + dcp::LocalTime until, + dcp::Formulation formulation ) const; dcp::Key key () const { @@ -148,7 +150,7 @@ public: NONE, NAME, USE_ISDCF_NAME, - /** The playlist's content list has changed (i.e. content has been added, moved around or removed) */ + /** The playlist's content list has changed (i.e. content has been added or removed) */ CONTENT, DCP_CONTENT_TYPE, CONTAINER, diff --git a/src/lib/image.cc b/src/lib/image.cc index 2ce3738b9..680c063f1 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -322,6 +322,7 @@ Image::make_black () case PIX_FMT_RGBA: case PIX_FMT_ABGR: case PIX_FMT_BGRA: + case PIX_FMT_RGB555LE: memset (data()[0], 0, lines(0) * stride()[0]); break; diff --git a/src/lib/kdm.cc b/src/lib/kdm.cc index 5754fd469..dd2b756c1 100644 --- a/src/lib/kdm.cc +++ b/src/lib/kdm.cc @@ -22,6 +22,7 @@ #include <quickmail.h> #include <zip.h> #include <dcp/encrypted_kdm.h> +#include <dcp/types.h> #include "kdm.h" #include "cinema.h" #include "exceptions.h" @@ -105,10 +106,11 @@ make_screen_kdms ( list<shared_ptr<Screen> > screens, boost::filesystem::path cpl, dcp::LocalTime from, - dcp::LocalTime to + dcp::LocalTime to, + dcp::Formulation formulation ) { - list<dcp::EncryptedKDM> kdms = film->make_kdms (screens, cpl, from, to); + list<dcp::EncryptedKDM> kdms = film->make_kdms (screens, cpl, from, to, formulation); list<ScreenKDM> screen_kdms; @@ -129,10 +131,11 @@ make_cinema_kdms ( list<shared_ptr<Screen> > screens, boost::filesystem::path cpl, dcp::LocalTime from, - dcp::LocalTime to + dcp::LocalTime to, + dcp::Formulation formulation ) { - list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens, cpl, from, to); + list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens, cpl, from, to, formulation); list<CinemaKDMs> cinema_kdms; while (!screen_kdms.empty ()) { @@ -175,10 +178,11 @@ write_kdm_files ( boost::filesystem::path cpl, dcp::LocalTime from, dcp::LocalTime to, + dcp::Formulation formulation, boost::filesystem::path directory ) { - list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens, cpl, from, to); + list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens, cpl, from, to, formulation); /* Write KDMs to the specified directory */ for (list<ScreenKDM>::iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) { @@ -195,10 +199,11 @@ write_kdm_zip_files ( boost::filesystem::path cpl, dcp::LocalTime from, dcp::LocalTime to, + dcp::Formulation formulation, boost::filesystem::path directory ) { - list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); + list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation); for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) { boost::filesystem::path path = directory; @@ -213,10 +218,11 @@ email_kdms ( list<shared_ptr<Screen> > screens, boost::filesystem::path cpl, dcp::LocalTime from, - dcp::LocalTime to + dcp::LocalTime to, + dcp::Formulation formulation ) { - list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); + list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation); for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) { diff --git a/src/lib/kdm.h b/src/lib/kdm.h index 023107a82..b80ef454f 100644 --- a/src/lib/kdm.h +++ b/src/lib/kdm.h @@ -29,6 +29,7 @@ extern void write_kdm_files ( boost::filesystem::path cpl, dcp::LocalTime from, dcp::LocalTime to, + dcp::Formulation formulation, boost::filesystem::path directory ); @@ -38,6 +39,7 @@ extern void write_kdm_zip_files ( boost::filesystem::path cpl, dcp::LocalTime from, dcp::LocalTime to, + dcp::Formulation formulation, boost::filesystem::path directory ); @@ -46,6 +48,7 @@ extern void email_kdms ( std::list<boost::shared_ptr<Screen> > screens, boost::filesystem::path cpl, dcp::LocalTime from, - dcp::LocalTime to + dcp::LocalTime to, + dcp::Formulation formulation ); diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 1c268ca11..710b9cc09 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -371,8 +371,6 @@ Playlist::move_earlier (shared_ptr<Content> c) (*previous)->set_position (p + c->length_after_trim ()); c->set_position (p); sort (_content.begin(), _content.end(), ContentSorter ()); - - Changed (); } void @@ -398,6 +396,4 @@ Playlist::move_later (shared_ptr<Content> c) (*next)->set_position (c->position ()); c->set_position (p + c->length_after_trim ()); sort (_content.begin(), _content.end(), ContentSorter ()); - - Changed (); } diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 3e5093aca..9e3dbb6df 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -78,8 +78,12 @@ public: void repeat (ContentList, int); + /** Emitted when content has been added to or removed from the playlist */ mutable boost::signals2::signal<void ()> Changed; - /** Third parameter is true if signals are currently being emitted frequently */ + /** Emitted when something about a piece of our content has changed; + * these emissions include when the position of the content changes. + * Third parameter is true if signals are currently being emitted frequently. + */ mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> ContentChanged; private: diff --git a/src/lib/po/de_DE.po b/src/lib/po/de_DE.po index 9f6380c36..6b73bea17 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-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-06-21 03:55+0100\n" "Last-Translator: Carsten Kurz\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -106,7 +106,7 @@ msgstr "Center" msgid "Checking existing image data" msgstr "Überprüfe bestehende Bilddateien" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "Tonübersicht berechnen" @@ -114,7 +114,7 @@ msgstr "Tonübersicht berechnen" msgid "Computing digest" msgstr "Zusammenfassung berechnen" -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "Bildübersicht berechnen" @@ -493,7 +493,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "Zu wenig Speicher für diese Operation." -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " "loaded into this version. Sorry!" @@ -502,7 +502,7 @@ msgstr "" "kann leider nicht mit dieser älteren Version geladen werden. Sie müssen den " "Film neu erstellen. Sorry!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -564,7 +564,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Und ein weiterer De-Interlacer..." -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "Sie müssen erst Inhalte hinzufügen bevor Sie ein DCP erstellen können!" @@ -576,7 +576,7 @@ msgstr "[Bewegte Bilder]" msgid "[still]" msgstr "[Standbild]" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "Darf keine Schrägstriche enthalten" @@ -588,11 +588,11 @@ msgstr "Zeit zur Verbindung abgelaufen" msgid "connecting" msgstr "verbinde..." -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "Containerformat" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "Inhaltsbeschreibung" @@ -616,7 +616,7 @@ msgstr "Keine Spur-Information gefunden" msgid "could not find video decoder" msgstr "Bild-Dekoder nicht gefunden" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "Ton MXF kann nicht in das DCP verschoben werden (%1)" @@ -712,7 +712,7 @@ msgstr "wird verschoben" msgid "multi-part subtitles not yet supported" msgstr "Mehr-Segment Untertitel werden noch nicht unterstützt" -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "Name" diff --git a/src/lib/po/es_ES.po b/src/lib/po/es_ES.po index d243f0b9a..813600fe5 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-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-04-20 10:12-0500\n" "Last-Translator: Manuel AC <manuel.acevedo@civantos.>\n" "Language-Team: Manuel AC <manuel.acevedo@civantos.com>\n" @@ -105,7 +105,7 @@ msgstr "Centro" msgid "Checking existing image data" msgstr "Comprobando las imágenes existentes" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "Calculando la firma resumen del audio" @@ -113,7 +113,7 @@ msgstr "Calculando la firma resumen del audio" msgid "Computing digest" msgstr "Calculando la firma resumen" -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "Calculando la firma resumen de imagen" @@ -487,7 +487,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "No hubo suficiente memoria para hacer esto." -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " "loaded into this version. Sorry!" @@ -496,7 +496,7 @@ msgstr "" "desgraciadamente no s puede cargar. Necesitas crear una nueva película, " "volver a añadir y configurar ton contenido. ¡Lo siento!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -558,7 +558,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Yet Another Deinterlacing Filter" -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "Tienes que añadir contenido al DCP antes de crearlo." @@ -570,7 +570,7 @@ msgstr "[imágenes en movimiento]" msgid "[still]" msgstr "[imagen fija]" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "no puede contener barras" @@ -582,11 +582,11 @@ msgstr "tiempo de conexión agotado" msgid "connecting" msgstr "conectando" -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "continente" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "tipo de contenido" @@ -610,7 +610,7 @@ msgstr "no se pudo encontrar información del flujo" msgid "could not find video decoder" msgstr "no se pudo encontrar decodificador de vídeo" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "no s puedo mover el audio MXF en el DCP (%1)" @@ -706,7 +706,7 @@ msgstr "moviendo" msgid "multi-part subtitles not yet supported" msgstr "todavía no se soportan subtítulos en múltiples partes" -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "nombre" diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index 117565dce..6cef1b3dc 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-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-06-20 15:53+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -105,7 +105,7 @@ msgstr "Centre" msgid "Checking existing image data" msgstr "Recherche de données images existantes" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "Fabrication rendu audio" @@ -113,7 +113,7 @@ msgstr "Fabrication rendu audio" msgid "Computing digest" msgstr "fabrication rendu" -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "Fabrication rendu image" @@ -479,7 +479,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "Il n'y avait pas assez de mémoire pour faire cela." -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " "loaded into this version. Sorry!" @@ -487,7 +487,7 @@ msgstr "" "Ce film a été créé avec une nouvelle version de DCP-o-matic et il ne peut " "être ouvert dans cette version du programme. Désolé!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -549,7 +549,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Un autre filtre de désentrelacement" -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "Ajoutez un contenu pour créer le DCP" @@ -561,7 +561,7 @@ msgstr "[Déplacement d'images]" msgid "[still]" msgstr "[restant]" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "slash interdit" @@ -573,11 +573,11 @@ msgstr "temps de connexion expiré" msgid "connecting" msgstr "connexion" -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "conteneur" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "type de contenu" @@ -601,7 +601,7 @@ msgstr "information du flux introuvable" msgid "could not find video decoder" msgstr "décodeur vidéo introuvable" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "ne peut déplacer un MXF son dans le DCP (%1)" @@ -699,7 +699,7 @@ msgstr "déplacement" msgid "multi-part subtitles not yet supported" msgstr "sous-titres en plusieurs parties non supportés" -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "nom" diff --git a/src/lib/po/it_IT.po b/src/lib/po/it_IT.po index fb73fa1d0..e2bce6f87 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-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-02-03 10:48+0100\n" "Last-Translator: William Fanelli <william.f@impronte.com>\n" "Language-Team: \n" @@ -106,7 +106,7 @@ msgstr "Centro" msgid "Checking existing image data" msgstr "" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "" @@ -114,7 +114,7 @@ msgstr "" msgid "Computing digest" msgstr "" -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "" @@ -498,7 +498,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "" -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 #, fuzzy msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " @@ -509,7 +509,7 @@ msgstr "" "un nuovo film, ri-aggiungere i tuoi contenuti e configurarlo di nuovo. Ci " "dispiace!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -572,7 +572,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Altro filtro di deinterlacciamento" -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "Devi aggiungere dei contenuti al DCP prima di crearlo" @@ -585,7 +585,7 @@ msgstr "" msgid "[still]" msgstr "ancora" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "non può contenere barre" @@ -597,11 +597,11 @@ msgstr "connessione scaduta" msgid "connecting" msgstr "mi sto connettendo" -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "contenitore" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "tipo di contenuto" @@ -625,7 +625,7 @@ msgstr "non riesco a trovare informazioni sullo streaming" msgid "could not find video decoder" msgstr "non riesco a trovare il decoder video" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "" @@ -723,7 +723,7 @@ msgstr "" msgid "multi-part subtitles not yet supported" msgstr "sottotitoli multi-part non ancora supportati" -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "nome" diff --git a/src/lib/po/nl_NL.po b/src/lib/po/nl_NL.po index 98f5c918c..f471ce8af 100644 --- a/src/lib/po/nl_NL.po +++ b/src/lib/po/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-03-30 19:39+0100\n" "Last-Translator: Theo Kooijmans <tkooijmans@universaldv.nl>\n" "Language-Team: UniversalDV <Tkooijmans@universaldv.nl>\n" @@ -106,7 +106,7 @@ msgstr "Midden" msgid "Checking existing image data" msgstr "Controleer bestaande videodata" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "Verwerk audio data" @@ -114,7 +114,7 @@ msgstr "Verwerk audio data" msgid "Computing digest" msgstr "Verwerken..." -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "Verwerk video data" @@ -491,7 +491,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "Er was niet genoeg geheugen om dit uit te voeren." -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " "loaded into this version. Sorry!" @@ -499,7 +499,7 @@ msgstr "" "Deze film is gemaakt met een nieuwere versie van DCP-o-matic en kan niet " "geopend worden. Sorry!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -561,7 +561,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Yet Another Deinterlacing Filter" -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "U moet wat content toevoegen voor het maken van de DCP" @@ -573,7 +573,7 @@ msgstr "[bewegend beeld]" msgid "[still]" msgstr "[still]" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "er mag geen '\" gebruikt worden" @@ -585,11 +585,11 @@ msgstr "verbinding timeout" msgid "connecting" msgstr "verbinden" -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "container" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "content type" @@ -613,7 +613,7 @@ msgstr "kan geen stream informatie vinden" msgid "could not find video decoder" msgstr "kan geen videodecoder vinden" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "kan MXF audio niet plaatsen in DCP (%1)" @@ -709,7 +709,7 @@ msgstr "bewegend" msgid "multi-part subtitles not yet supported" msgstr "ondertitels met meerdere delen worden nog niet ondersteund." -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "naam" diff --git a/src/lib/po/sv_SE.po b/src/lib/po/sv_SE.po index f3c0ba9d2..98d76e3bd 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-06-23 00:25+0100\n" +"POT-Creation-Date: 2014-06-24 14:53+0100\n" "PO-Revision-Date: 2014-01-19 08:59+0100\n" "Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n" "Language-Team: \n" @@ -105,7 +105,7 @@ msgstr "Center" msgid "Checking existing image data" msgstr "Kontrollerar befintligt bilddata" -#: src/lib/writer.cc:464 +#: src/lib/writer.cc:471 msgid "Computing audio digest" msgstr "Beräknar audiosammanfattning" @@ -113,7 +113,7 @@ msgstr "Beräknar audiosammanfattning" msgid "Computing digest" msgstr "Beräknar sammanfattning" -#: src/lib/writer.cc:460 +#: src/lib/writer.cc:467 msgid "Computing image digest" msgstr "Beräknar bildsammanfattning" @@ -494,7 +494,7 @@ msgstr "" msgid "There was not enough memory to do this." msgstr "" -#: src/lib/film.cc:412 +#: src/lib/film.cc:413 #, fuzzy msgid "" "This film was created with a newer version of DCP-o-matic, and it cannot be " @@ -504,7 +504,7 @@ msgstr "" "inte öppnas i denna version. Du måste skapa en ny Film, lägga till ditt " "innehåll och konfigurera allt igen. Ursäkta!" -#: src/lib/film.cc:404 +#: src/lib/film.cc:405 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 " @@ -568,7 +568,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Yet Another Deinterlacing Filter" -#: src/lib/film.cc:309 +#: src/lib/film.cc:310 msgid "You must add some content to the DCP before creating it" msgstr "Du måste lägga till något innehåll till DCP:n innan du skapar den" @@ -580,7 +580,7 @@ msgstr "[rörliga bilder]" msgid "[still]" msgstr "[stillbild]" -#: src/lib/film.cc:257 +#: src/lib/film.cc:258 msgid "cannot contain slashes" msgstr "får inte innehålla snedstreck" @@ -593,11 +593,11 @@ msgstr "uppkopplingen tajmade ur" msgid "connecting" msgstr "kopplar upp" -#: src/lib/film.cc:305 +#: src/lib/film.cc:306 msgid "container" msgstr "behållare" -#: src/lib/film.cc:313 +#: src/lib/film.cc:314 msgid "content type" msgstr "innehållstyp" @@ -621,7 +621,7 @@ msgstr "kunde inte hitta information om strömmen" msgid "could not find video decoder" msgstr "kunde inte hitta video-avkodare" -#: src/lib/writer.cc:428 +#: src/lib/writer.cc:435 msgid "could not move audio MXF into the DCP (%1)" msgstr "kunde inte flytta audio-MXF in i DCP:n (%1)" @@ -719,7 +719,7 @@ msgstr "rörlig" msgid "multi-part subtitles not yet supported" msgstr "undertexter i flera delar stöds inte ännu" -#: src/lib/film.cc:257 src/lib/film.cc:317 +#: src/lib/film.cc:258 src/lib/film.cc:318 msgid "name" msgstr "namn" diff --git a/src/lib/send_kdm_email_job.cc b/src/lib/send_kdm_email_job.cc index 8af0b556a..de0322272 100644 --- a/src/lib/send_kdm_email_job.cc +++ b/src/lib/send_kdm_email_job.cc @@ -33,13 +33,15 @@ SendKDMEmailJob::SendKDMEmailJob ( list<shared_ptr<Screen> > screens, boost::filesystem::path dcp, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + dcp::Formulation formulation ) : Job (f) , _screens (screens) , _dcp (dcp) , _from (from) , _to (to) + , _formulation (formulation) { } @@ -62,7 +64,7 @@ SendKDMEmailJob::run () try { set_progress_unknown (); - email_kdms (_film, _screens, _dcp, _from, _to); + email_kdms (_film, _screens, _dcp, _from, _to, _formulation); set_progress (1); set_state (FINISHED_OK); diff --git a/src/lib/send_kdm_email_job.h b/src/lib/send_kdm_email_job.h index f4d154a91..084836715 100644 --- a/src/lib/send_kdm_email_job.h +++ b/src/lib/send_kdm_email_job.h @@ -18,6 +18,7 @@ */ #include <boost/filesystem.hpp> +#include <dcp/types.h> #include "job.h" class Screen; @@ -30,7 +31,8 @@ public: std::list<boost::shared_ptr<Screen> >, boost::filesystem::path, boost::posix_time::ptime, - boost::posix_time::ptime + boost::posix_time::ptime, + dcp::Formulation ); std::string name () const; @@ -42,4 +44,5 @@ private: boost::filesystem::path _dcp; boost::posix_time::ptime _from; boost::posix_time::ptime _to; + dcp::Formulation _formulation; }; diff --git a/src/lib/server.cc b/src/lib/server.cc index 66ee2b0e3..fe792e307 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -79,7 +79,7 @@ Server::~Server () { boost::mutex::scoped_lock lm (_worker_mutex); _terminate = true; - _worker_condition.notify_all (); + _empty_condition.notify_all (); } for (vector<boost::thread*>::iterator i = _worker_threads.begin(); i != _worker_threads.end(); ++i) { @@ -139,7 +139,7 @@ Server::worker_thread () while (1) { boost::mutex::scoped_lock lock (_worker_mutex); while (_queue.empty () && !_terminate) { - _worker_condition.wait (lock); + _empty_condition.wait (lock); } if (_terminate) { @@ -194,7 +194,7 @@ Server::worker_thread () LOG_GENERAL_NC (message.str ()); } - _worker_condition.notify_all (); + _full_condition.notify_all (); } } @@ -291,11 +291,11 @@ Server::handle_accept (shared_ptr<Socket> socket, boost::system::error_code cons /* Wait until the queue has gone down a bit */ while (_queue.size() >= _worker_threads.size() * 2 && !_terminate) { - _worker_condition.wait (lock); + _full_condition.wait (lock); } _queue.push_back (socket); - _worker_condition.notify_all (); + _empty_condition.notify_all (); start_accept (); } diff --git a/src/lib/server.h b/src/lib/server.h index 9f3e99f9c..b340bba07 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -107,8 +107,8 @@ private: std::vector<boost::thread *> _worker_threads; std::list<boost::shared_ptr<Socket> > _queue; boost::mutex _worker_mutex; - boost::condition _worker_condition; - + boost::condition _full_condition; + boost::condition _empty_condition; boost::shared_ptr<Log> _log; bool _verbose; diff --git a/src/lib/util.h b/src/lib/util.h index 7d3afb022..094d57f40 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -48,7 +48,7 @@ extern "C" { #define DCPOMATIC_HELLO "Boys, you gotta learn not to talk to nuns that way" -namespace libdcp { +namespace dcp { class Signer; } diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 05f5c538e..f52a75e70 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -408,6 +408,21 @@ VideoContent::scale_and_crop_to_fit_height () set_right_crop (crop / 2); } +void +VideoContent::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); +} + VideoContentScale::VideoContentScale (Ratio const * r) : _ratio (r) , _scale (true) diff --git a/src/lib/video_content.h b/src/lib/video_content.h index 4206efc2c..7d9cb4f8f 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -116,6 +116,7 @@ public: } void set_video_frame_type (VideoFrameType); + void set_video_frame_rate (float); void set_left_crop (int); void set_right_crop (int); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 580dfe4f2..33817ca6e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -139,6 +139,7 @@ Writer::write (shared_ptr<const EncodedData> encoded, int frame, Eyes eyes) boost::mutex::scoped_lock lock (_mutex); while (_queued_full_in_memory > _maximum_frames_in_memory) { + /* The queue is too big; wait until that is sorted out */ _full_condition.wait (lock); } @@ -160,7 +161,8 @@ Writer::write (shared_ptr<const EncodedData> encoded, int frame, Eyes eyes) _queue.push_back (qi); ++_queued_full_in_memory; } - + + /* Now there's something to do: wake anything wait()ing on _empty_condition */ _empty_condition.notify_all (); } @@ -170,6 +172,7 @@ Writer::fake_write (int frame, Eyes eyes) boost::mutex::scoped_lock lock (_mutex); while (_queued_full_in_memory > _maximum_frames_in_memory) { + /* The queue is too big; wait until that is sorted out */ _full_condition.wait (lock); } @@ -191,6 +194,7 @@ Writer::fake_write (int frame, Eyes eyes) _queue.push_back (qi); } + /* Now there's something to do: wake anything wait()ing on _empty_condition */ _empty_condition.notify_all (); } @@ -244,9 +248,11 @@ try while (1) { if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) { + /* We've got something to do: go and do it */ break; } + /* Nothing to do: wait until something happens which may indicate that we do */ LOG_TIMING (N_("writer sleeps with a queue of %1"), _queue.size()); _empty_condition.wait (lock); LOG_TIMING (N_("writer wakes with a queue of %1"), _queue.size()); @@ -336,6 +342,7 @@ try --_queued_full_in_memory; } + /* The queue has probably just gone down a bit; notify anything wait()ing on _full_condition */ _full_condition.notify_all (); } } |
