diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-02-04 09:59:38 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-02-04 09:59:38 +0000 |
| commit | 4ba8772aef261da209bbb882325fd61a8b479fd7 (patch) | |
| tree | 7fe9e3976d52503b474cfa96716c1bd4535b8f8d /src/lib | |
| parent | b299c1873bf23414061d551843275c77a9256a05 (diff) | |
| parent | eec6f90d8e2c2246ce674ae13e4f460b12a4f2a9 (diff) | |
Merge master.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 2 | ||||
| -rw-r--r-- | src/lib/cross.cc | 8 | ||||
| -rw-r--r-- | src/lib/cross.h | 1 | ||||
| -rw-r--r-- | src/lib/encoder.cc | 2 | ||||
| -rw-r--r-- | src/lib/exceptions.h | 1 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 4 | ||||
| -rw-r--r-- | src/lib/player.cc | 13 | ||||
| -rw-r--r-- | src/lib/po/de_DE.po | 30 | ||||
| -rw-r--r-- | src/lib/po/es_ES.po | 32 | ||||
| -rw-r--r-- | src/lib/po/fr_FR.po | 54 | ||||
| -rw-r--r-- | src/lib/po/it_IT.po | 32 | ||||
| -rw-r--r-- | src/lib/po/sv_SE.po | 31 | ||||
| -rw-r--r-- | src/lib/subrip_content.cc | 7 | ||||
| -rw-r--r-- | src/lib/subtitle_content.cc | 51 | ||||
| -rw-r--r-- | src/lib/subtitle_content.h | 29 | ||||
| -rw-r--r-- | src/lib/transcode_job.cc | 1 |
17 files changed, 194 insertions, 106 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 5a9e1619a..30f85850d 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -63,7 +63,7 @@ Config::Config () , _default_still_length (10) , _default_container (Ratio::from_id ("185")) , _default_dcp_content_type (DCPContentType::from_dci_name ("TST")) - , _default_j2k_bandwidth (200000000) + , _default_j2k_bandwidth (100000000) , _default_audio_delay (0) , _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") diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 57b3f93b2..9f7a76124 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -298,3 +298,11 @@ dcpomatic_fseek (FILE* stream, int64_t offset, int whence) return fseek (stream, offset, whence); #endif } + +void +kick () +{ +#ifdef DCPOMATIC_WINDOWS + SetThreadExecutionState (ES_CONTINUOUS); +#endif +} diff --git a/src/lib/cross.h b/src/lib/cross.h index 7e032e5a1..822b36631 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -35,3 +35,4 @@ extern boost::filesystem::path app_contents (); #endif extern FILE * fopen_boost (boost::filesystem::path, std::string); extern int dcpomatic_fseek (FILE *, int64_t, int); +void kick (); diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index d26f77614..f1c3e7e61 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -180,6 +180,8 @@ Encoder::frame_done () void Encoder::process_video (shared_ptr<PlayerImage> image, Eyes eyes, ColourConversion conversion, bool same) { + kick (); + boost::mutex::scoped_lock lock (_mutex); /* XXX: discard 3D here if required */ diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 61163c8d1..213be6186 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -260,6 +260,7 @@ public: boost::mutex::scoped_lock lm (_mutex); if (_exception) { boost::rethrow_exception (_exception); + _exception = boost::exception_ptr (); } } diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 394c16aa5..3bee49146 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -62,7 +62,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> f, shared_ptr<const cxml::N : Content (f, node) , VideoContent (f, node) , AudioContent (f, node) - , SubtitleContent (f, node) + , SubtitleContent (f, node, version) { list<cxml::NodePtr> c = node->node_children ("SubtitleStream"); for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) { diff --git a/src/lib/film.cc b/src/lib/film.cc index 099bacfdc..67f795a6c 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -83,8 +83,10 @@ using libdcp::Signer; /* 5 -> 6 * AudioMapping XML changed. + * 6 -> 7 + * Subtitle offset changed to subtitle y offset, and subtitle x offset added. */ -int const Film::state_version = 6; +int const Film::state_version = 7; /** Construct a Film object in a given directory. * diff --git a/src/lib/player.cc b/src/lib/player.cc index cb6d51984..3e6a1598d 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -547,7 +547,11 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent) _have_valid_pieces = false; Changed (frequent); - } else if (property == SubtitleContentProperty::SUBTITLE_OFFSET || property == SubtitleContentProperty::SUBTITLE_SCALE) { + } else if ( + property == SubtitleContentProperty::SUBTITLE_X_OFFSET || + property == SubtitleContentProperty::SUBTITLE_Y_OFFSET || + property == SubtitleContentProperty::SUBTITLE_SCALE + ) { update_subtitle_from_image (); update_subtitle_from_text (); @@ -651,7 +655,8 @@ Player::update_subtitle_from_image () dcpomatic::Rect<double> in_rect = _image_subtitle.subtitle->rect; libdcp::Size scaled_size; - in_rect.y += sc->subtitle_offset (); + in_rect.x += sc->subtitle_x_offset (); + in_rect.y += sc->subtitle_y_offset (); /* We will scale the subtitle up to fit _video_container_size, and also by the additional subtitle_scale */ scaled_size.width = in_rect.width * _video_container_size.width * sc->subtitle_scale (); @@ -679,8 +684,8 @@ Player::update_subtitle_from_image () true ); - _out_subtitle.from = _image_subtitle.subtitle->dcp_time; - _out_subtitle.to = _image_subtitle.subtitle->dcp_time_to; + _out_subtitle.from = _image_subtitle.subtitle->dcp_time + piece->content->position (); + _out_subtitle.to = _image_subtitle.subtitle->dcp_time_to + piece->content->position (); } /** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles. diff --git a/src/lib/po/de_DE.po b/src/lib/po/de_DE.po index f612dc028..e0d48dab0 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-23 00:18+0000\n" +"POT-Creation-Date: 2014-01-30 21:51+0000\n" "PO-Revision-Date: 2014-01-14 19:45+0100\n" "Last-Translator: \n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -146,11 +146,17 @@ msgstr "Zusammengesetzter Inhalt muss die gleiche Bildgröße haben." msgid "Content to be joined must have the same ratio." msgstr "Zusammengesetzter Inhalt muss das geliche Verhältnis haben" -#: src/lib/subtitle_content.cc:65 -msgid "Content to be joined must have the same subtitle offset." +#: src/lib/subtitle_content.cc:74 +#, fuzzy +msgid "Content to be joined must have the same subtitle X offset." msgstr "Zusammengesetzter Inhalt muss den gleichen Untertitelversatz haben." -#: src/lib/subtitle_content.cc:69 +#: src/lib/subtitle_content.cc:78 +#, fuzzy +msgid "Content to be joined must have the same subtitle Y offset." +msgstr "Zusammengesetzter Inhalt muss den gleichen Untertitelversatz haben." + +#: src/lib/subtitle_content.cc:82 msgid "Content to be joined must have the same subtitle scale." msgstr "Zusammengesetzter Inhalt muss die gleiche Untertitelgröße haben." @@ -190,7 +196,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:960 +#: src/lib/film.cc:962 msgid "Could not read DCP to make KDM for" msgstr "DCP konnte nicht zur Schlüsselerstellung geöffnet werden" @@ -483,7 +489,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:383 +#: src/lib/film.cc:385 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 +547,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Noch ein anderer De-Interlacer" -#: src/lib/film.cc:287 +#: src/lib/film.cc:289 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." @@ -553,7 +559,7 @@ msgstr "[Bewegte Bilder]" msgid "[still]" msgstr "[Standbild]" -#: src/lib/film.cc:240 +#: src/lib/film.cc:242 msgid "cannot contain slashes" msgstr "Darf keine Schrägstriche enthalten" @@ -565,11 +571,11 @@ msgstr "Zeit zur Verbindung abgelaufen" msgid "connecting" msgstr "verbinde..." -#: src/lib/film.cc:283 +#: src/lib/film.cc:285 msgid "container" msgstr "Container" -#: src/lib/film.cc:291 +#: src/lib/film.cc:293 msgid "content type" msgstr "Inhalt Typ" @@ -657,7 +663,7 @@ msgstr "error during async_read (%1)" msgid "error during async_write (%1)" msgstr "error during async_write (%1)" -#: src/lib/transcode_job.cc:93 +#: src/lib/transcode_job.cc:94 msgid "frames per second" msgstr "Bilder pro Sekunde" @@ -693,7 +699,7 @@ msgstr "wird verschoben" msgid "multi-part subtitles not yet supported" msgstr "Multi-Part Untertitel noch nicht unterstützt" -#: src/lib/film.cc:240 src/lib/film.cc:295 +#: src/lib/film.cc:242 src/lib/film.cc:297 msgid "name" msgstr "Name" diff --git a/src/lib/po/es_ES.po b/src/lib/po/es_ES.po index e92f81bb6..bbc67542a 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-23 00:18+0000\n" +"POT-Creation-Date: 2014-01-30 21:51+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" @@ -148,11 +148,17 @@ msgstr "" msgid "Content to be joined must have the same ratio." msgstr "" -#: src/lib/subtitle_content.cc:65 -msgid "Content to be joined must have the same subtitle offset." -msgstr "" +#: src/lib/subtitle_content.cc:74 +#, fuzzy +msgid "Content to be joined must have the same subtitle X offset." +msgstr "La fuente y el DCP tienen la misma velocidad." + +#: src/lib/subtitle_content.cc:78 +#, fuzzy +msgid "Content to be joined must have the same subtitle Y offset." +msgstr "La fuente y el DCP tienen la misma velocidad." -#: src/lib/subtitle_content.cc:69 +#: src/lib/subtitle_content.cc:82 msgid "Content to be joined must have the same subtitle scale." msgstr "" @@ -193,7 +199,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:960 +#: src/lib/film.cc:962 msgid "Could not read DCP to make KDM for" msgstr "No se pudo leer el DCP para hacer el KDM" @@ -484,7 +490,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:383 +#: src/lib/film.cc:385 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 " @@ -542,7 +548,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Yet Another Deinterlacing Filter" -#: src/lib/film.cc:287 +#: src/lib/film.cc:289 msgid "You must add some content to the DCP before creating it" msgstr "Tienes que añadir contenido al DCP antes de crearlo." @@ -555,7 +561,7 @@ msgstr "" msgid "[still]" msgstr "imagen fija" -#: src/lib/film.cc:240 +#: src/lib/film.cc:242 msgid "cannot contain slashes" msgstr "no puede contener barras" @@ -567,12 +573,12 @@ msgstr "tiempo de conexión agotado" msgid "connecting" msgstr "conectando" -#: src/lib/film.cc:283 +#: src/lib/film.cc:285 #, fuzzy msgid "container" msgstr "contenido" -#: src/lib/film.cc:291 +#: src/lib/film.cc:293 msgid "content type" msgstr "tipo de contenido" @@ -667,7 +673,7 @@ msgstr "" msgid "error during async_write (%1)" msgstr "" -#: src/lib/transcode_job.cc:93 +#: src/lib/transcode_job.cc:94 msgid "frames per second" msgstr "fotogramas por segundo" @@ -703,7 +709,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:240 src/lib/film.cc:295 +#: src/lib/film.cc:242 src/lib/film.cc:297 msgid "name" msgstr "nombre" diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index 1ad31b053..2b3bf7d5e 100644 --- a/src/lib/po/fr_FR.po +++ b/src/lib/po/fr_FR.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-23 00:18+0000\n" -"PO-Revision-Date: 2013-11-25 19:37+0100\n" +"POT-Creation-Date: 2014-01-30 21:51+0000\n" +"PO-Revision-Date: 2014-01-25 16:13+0100\n" "Last-Translator: \n" "Language-Team: \n" -"Language: \n" +"Language: fr_FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.6.3\n" #: src/lib/sndfile_content.cc:60 msgid "%1 [audio]" @@ -104,19 +104,19 @@ msgstr "Centre" #: src/lib/writer.cc:74 msgid "Checking existing image data" -msgstr "" +msgstr "Recherche de données images existantes" #: src/lib/writer.cc:448 msgid "Computing audio digest" -msgstr "" +msgstr "Fabrication rendu audio" #: src/lib/image_content.cc:100 msgid "Computing digest" -msgstr "" +msgstr "fabrication rendu" #: src/lib/writer.cc:445 msgid "Computing image digest" -msgstr "" +msgstr "Fabrication rendu image" #: src/lib/util.cc:798 #, fuzzy @@ -147,11 +147,17 @@ msgstr "" msgid "Content to be joined must have the same ratio." msgstr "" -#: src/lib/subtitle_content.cc:65 -msgid "Content to be joined must have the same subtitle offset." -msgstr "" +#: src/lib/subtitle_content.cc:74 +#, fuzzy +msgid "Content to be joined must have the same subtitle X offset." +msgstr "Le DCP et la source ont les mêmes cadences." -#: src/lib/subtitle_content.cc:69 +#: src/lib/subtitle_content.cc:78 +#, fuzzy +msgid "Content to be joined must have the same subtitle Y offset." +msgstr "Le DCP et la source ont les mêmes cadences." + +#: src/lib/subtitle_content.cc:82 msgid "Content to be joined must have the same subtitle scale." msgstr "" @@ -191,7 +197,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:960 +#: src/lib/film.cc:962 msgid "Could not read DCP to make KDM for" msgstr "DCP illisible pour fabrication de KDM" @@ -271,7 +277,7 @@ msgstr "" #: src/lib/writer.cc:115 msgid "Encoding image data" -msgstr "" +msgstr "encodage des données image" #: src/lib/job.cc:314 msgid "Error (%1)" @@ -401,11 +407,11 @@ msgstr "OK (processus %1)" #: src/lib/content.cc:100 msgid "Only the first piece of content to be joined can have a start trim." -msgstr "" +msgstr "Seul le premier contenu à joindre peut avoir un coupure de début." #: src/lib/content.cc:104 msgid "Only the last piece of content to be joined can have an end trim." -msgstr "" +msgstr "Seul le dernier contenu à joindre peut avoir une coupure en fin." #: src/lib/filter.cc:91 msgid "Overcomplete wavelet denoiser" @@ -479,7 +485,7 @@ msgstr "" "Le disque contenant le film est plein. Libérez de l'espace et essayez à " "nouveau." -#: src/lib/film.cc:383 +#: src/lib/film.cc:385 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 " @@ -537,7 +543,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Un autre filtre de désentrelacement" -#: src/lib/film.cc:287 +#: src/lib/film.cc:289 msgid "You must add some content to the DCP before creating it" msgstr "Ajoutez un contenu pour créer le DCP" @@ -551,7 +557,7 @@ msgstr "%1 [diaporama]" msgid "[still]" msgstr "%1 [fixe]" -#: src/lib/film.cc:240 +#: src/lib/film.cc:242 msgid "cannot contain slashes" msgstr "slash interdit" @@ -563,11 +569,11 @@ msgstr "temps de connexion expiré" msgid "connecting" msgstr "connexion" -#: src/lib/film.cc:283 +#: src/lib/film.cc:285 msgid "container" msgstr "conteneur" -#: src/lib/film.cc:291 +#: src/lib/film.cc:293 msgid "content type" msgstr "type de contenu" @@ -597,7 +603,7 @@ msgstr "décodeur vidéo introuvable" #: src/lib/writer.cc:414 msgid "could not move audio MXF into the DCP (%1)" -msgstr "" +msgstr "ne peut déplacer un MXF son dans le DCP (%1)" #: src/lib/sndfile_decoder.cc:45 msgid "could not open audio file for reading" @@ -656,7 +662,7 @@ msgstr "" msgid "error during async_write (%1)" msgstr "" -#: src/lib/transcode_job.cc:93 +#: src/lib/transcode_job.cc:94 msgid "frames per second" msgstr "images par seconde" @@ -692,7 +698,7 @@ msgstr "" msgid "multi-part subtitles not yet supported" msgstr "sous-titres en plusieurs parties non supportés" -#: src/lib/film.cc:240 src/lib/film.cc:295 +#: src/lib/film.cc:242 src/lib/film.cc:297 msgid "name" msgstr "nom" diff --git a/src/lib/po/it_IT.po b/src/lib/po/it_IT.po index 4ca75a942..a9a4a6000 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-23 00:18+0000\n" +"POT-Creation-Date: 2014-01-30 21:51+0000\n" "PO-Revision-Date: 2013-04-28 10:26+0100\n" "Last-Translator: Maci <macibro@gmail.com>\n" "Language-Team: \n" @@ -148,11 +148,17 @@ msgstr "" msgid "Content to be joined must have the same ratio." msgstr "" -#: src/lib/subtitle_content.cc:65 -msgid "Content to be joined must have the same subtitle offset." -msgstr "" +#: src/lib/subtitle_content.cc:74 +#, fuzzy +msgid "Content to be joined must have the same subtitle X offset." +msgstr "Il DCP e il sorgente hanno la stessa frequenza." + +#: src/lib/subtitle_content.cc:78 +#, fuzzy +msgid "Content to be joined must have the same subtitle Y offset." +msgstr "Il DCP e il sorgente hanno la stessa frequenza." -#: src/lib/subtitle_content.cc:69 +#: src/lib/subtitle_content.cc:82 msgid "Content to be joined must have the same subtitle scale." msgstr "" @@ -193,7 +199,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:960 +#: src/lib/film.cc:962 msgid "Could not read DCP to make KDM for" msgstr "" @@ -482,7 +488,7 @@ msgstr "" "Sul disco dove è memorizzato il film non c'è abbastanza spazio. Liberare " "altro spazio e riprovare." -#: src/lib/film.cc:383 +#: src/lib/film.cc:385 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 " @@ -537,7 +543,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Altro filtro di deinterlacciamento" -#: src/lib/film.cc:287 +#: src/lib/film.cc:289 msgid "You must add some content to the DCP before creating it" msgstr "" @@ -550,7 +556,7 @@ msgstr "" msgid "[still]" msgstr "ancora" -#: src/lib/film.cc:240 +#: src/lib/film.cc:242 msgid "cannot contain slashes" msgstr "non può contenere barre" @@ -562,12 +568,12 @@ msgstr "connessione scaduta" msgid "connecting" msgstr "mi sto connettendo" -#: src/lib/film.cc:283 +#: src/lib/film.cc:285 #, fuzzy msgid "container" msgstr "contenuto" -#: src/lib/film.cc:291 +#: src/lib/film.cc:293 msgid "content type" msgstr "tipo di contenuto" @@ -658,7 +664,7 @@ msgstr "" msgid "error during async_write (%1)" msgstr "" -#: src/lib/transcode_job.cc:93 +#: src/lib/transcode_job.cc:94 msgid "frames per second" msgstr "fotogrammi al secondo" @@ -694,7 +700,7 @@ msgstr "" msgid "multi-part subtitles not yet supported" msgstr "sottotitoli multi-part non ancora supportati" -#: src/lib/film.cc:240 src/lib/film.cc:295 +#: src/lib/film.cc:242 src/lib/film.cc:297 msgid "name" msgstr "nome" diff --git a/src/lib/po/sv_SE.po b/src/lib/po/sv_SE.po index fbdb484ab..cd87e3258 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-23 00:18+0000\n" +"POT-Creation-Date: 2014-01-30 21:51+0000\n" "PO-Revision-Date: 2014-01-19 08:59+0100\n" "Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n" "Language-Team: \n" @@ -145,12 +145,19 @@ msgstr "Innehåll som ska sammanfogas måste använda samma bildstorlek." msgid "Content to be joined must have the same ratio." msgstr "Innehåll som ska sammanfogas måste använda samma bildförhållande." -#: src/lib/subtitle_content.cc:65 -msgid "Content to be joined must have the same subtitle offset." +#: src/lib/subtitle_content.cc:74 +#, fuzzy +msgid "Content to be joined must have the same subtitle X offset." +msgstr "" +"Innehåll som ska sammanfogas måste använda samma förskjutning på undertexten." + +#: src/lib/subtitle_content.cc:78 +#, fuzzy +msgid "Content to be joined must have the same subtitle Y offset." msgstr "" "Innehåll som ska sammanfogas måste använda samma förskjutning på undertexten." -#: src/lib/subtitle_content.cc:69 +#: src/lib/subtitle_content.cc:82 msgid "Content to be joined must have the same subtitle scale." msgstr "Innehåll som ska sammanfogas måste använda samma skala på undertexten." @@ -190,7 +197,7 @@ msgstr "Kunde inte öppna %1" msgid "Could not open %1 to send" msgstr "Kunde inte öppna %1 för att skicka" -#: src/lib/film.cc:960 +#: src/lib/film.cc:962 msgid "Could not read DCP to make KDM for" msgstr "Kunde inte läsa DCP för att skapa KDM" @@ -484,7 +491,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:383 +#: src/lib/film.cc:385 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 +551,7 @@ msgstr "X" msgid "Yet Another Deinterlacing Filter" msgstr "Yet Another Deinterlacing Filter" -#: src/lib/film.cc:287 +#: src/lib/film.cc:289 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" @@ -556,7 +563,7 @@ msgstr "[rörliga bilder]" msgid "[still]" msgstr "[stillbild]" -#: src/lib/film.cc:240 +#: src/lib/film.cc:242 msgid "cannot contain slashes" msgstr "får inte innehålla snedstreck" @@ -569,11 +576,11 @@ msgstr "uppkopplingen tajmade ur" msgid "connecting" msgstr "kopplar upp" -#: src/lib/film.cc:283 +#: src/lib/film.cc:285 msgid "container" msgstr "behållare" -#: src/lib/film.cc:291 +#: src/lib/film.cc:293 msgid "content type" msgstr "innehållstyp" @@ -662,7 +669,7 @@ msgstr "fel vid async_read (%1)" msgid "error during async_write (%1)" msgstr "fel vid async_write (%1)" -#: src/lib/transcode_job.cc:93 +#: src/lib/transcode_job.cc:94 msgid "frames per second" msgstr "bilder per sekund" @@ -699,7 +706,7 @@ msgstr "rörlig" msgid "multi-part subtitles not yet supported" msgstr "undertexter i flera delar stöds inte ännu" -#: src/lib/film.cc:240 src/lib/film.cc:295 +#: src/lib/film.cc:242 src/lib/film.cc:297 msgid "name" msgstr "namn" diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc index 48d3528e1..73499a5f6 100644 --- a/src/lib/subrip_content.cc +++ b/src/lib/subrip_content.cc @@ -34,9 +34,9 @@ SubRipContent::SubRipContent (shared_ptr<const Film> film, boost::filesystem::pa } -SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int) +SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version) : Content (film, node) - , SubtitleContent (film, node) + , SubtitleContent (film, node, version) { } @@ -93,7 +93,8 @@ SubRipContent::identifier () const stringstream s; s << Content::identifier() << "_" << subtitle_scale() - << "_" << subtitle_offset(); + << "_" << subtitle_x_offset() + << "_" << subtitle_y_offset(); return s.str (); } diff --git a/src/lib/subtitle_content.cc b/src/lib/subtitle_content.cc index 6c0d3af86..8f88574e5 100644 --- a/src/lib/subtitle_content.cc +++ b/src/lib/subtitle_content.cc @@ -30,25 +30,34 @@ using boost::shared_ptr; using boost::lexical_cast; using boost::dynamic_pointer_cast; -int const SubtitleContentProperty::SUBTITLE_OFFSET = 500; -int const SubtitleContentProperty::SUBTITLE_SCALE = 501; +int const SubtitleContentProperty::SUBTITLE_X_OFFSET = 500; +int const SubtitleContentProperty::SUBTITLE_Y_OFFSET = 501; +int const SubtitleContentProperty::SUBTITLE_SCALE = 502; SubtitleContent::SubtitleContent (shared_ptr<const Film> f, boost::filesystem::path p) : Content (f, p) - , _subtitle_offset (0) + , _subtitle_x_offset (0) + , _subtitle_y_offset (0) , _subtitle_scale (1) { } -SubtitleContent::SubtitleContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node) +SubtitleContent::SubtitleContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int version) : Content (f, node) - , _subtitle_offset (0) + , _subtitle_x_offset (0) + , _subtitle_y_offset (0) , _subtitle_scale (1) { LocaleGuard lg; + + if (version >= 7) { + _subtitle_x_offset = node->number_child<float> ("SubtitleXOffset"); + _subtitle_y_offset = node->number_child<float> ("SubtitleYOffset"); + } else { + _subtitle_y_offset = node->number_child<float> ("SubtitleOffset"); + } - _subtitle_offset = node->number_child<float> ("SubtitleOffset"); _subtitle_scale = node->number_child<float> ("SubtitleScale"); } @@ -61,8 +70,12 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> f, vector<shared_ptr<Co for (size_t i = 0; i < c.size(); ++i) { shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (c[i]); - if (sc->subtitle_offset() != ref->subtitle_offset()) { - throw JoinError (_("Content to be joined must have the same subtitle offset.")); + if (sc->subtitle_x_offset() != ref->subtitle_x_offset()) { + throw JoinError (_("Content to be joined must have the same subtitle X offset.")); + } + + if (sc->subtitle_y_offset() != ref->subtitle_y_offset()) { + throw JoinError (_("Content to be joined must have the same subtitle Y offset.")); } if (sc->subtitle_scale() != ref->subtitle_scale()) { @@ -70,7 +83,8 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> f, vector<shared_ptr<Co } } - _subtitle_offset = ref->subtitle_offset (); + _subtitle_x_offset = ref->subtitle_x_offset (); + _subtitle_y_offset = ref->subtitle_y_offset (); _subtitle_scale = ref->subtitle_scale (); } @@ -79,18 +93,29 @@ SubtitleContent::as_xml (xmlpp::Node* root) const { LocaleGuard lg; - root->add_child("SubtitleOffset")->add_child_text (lexical_cast<string> (_subtitle_offset)); + root->add_child("SubtitleXOffset")->add_child_text (lexical_cast<string> (_subtitle_x_offset)); + root->add_child("SubtitleYOffset")->add_child_text (lexical_cast<string> (_subtitle_y_offset)); root->add_child("SubtitleScale")->add_child_text (lexical_cast<string> (_subtitle_scale)); } void -SubtitleContent::set_subtitle_offset (double o) +SubtitleContent::set_subtitle_x_offset (double o) +{ + { + boost::mutex::scoped_lock lm (_mutex); + _subtitle_x_offset = o; + } + signal_changed (SubtitleContentProperty::SUBTITLE_X_OFFSET); +} + +void +SubtitleContent::set_subtitle_y_offset (double o) { { boost::mutex::scoped_lock lm (_mutex); - _subtitle_offset = o; + _subtitle_y_offset = o; } - signal_changed (SubtitleContentProperty::SUBTITLE_OFFSET); + signal_changed (SubtitleContentProperty::SUBTITLE_Y_OFFSET); } void diff --git a/src/lib/subtitle_content.h b/src/lib/subtitle_content.h index 854647d18..388637688 100644 --- a/src/lib/subtitle_content.h +++ b/src/lib/subtitle_content.h @@ -25,7 +25,8 @@ class SubtitleContentProperty { public: - static int const SUBTITLE_OFFSET; + static int const SUBTITLE_X_OFFSET; + static int const SUBTITLE_Y_OFFSET; static int const SUBTITLE_SCALE; }; @@ -33,17 +34,23 @@ class SubtitleContent : public virtual Content { public: SubtitleContent (boost::shared_ptr<const Film>, boost::filesystem::path); - SubtitleContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>); + SubtitleContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>, int version); SubtitleContent (boost::shared_ptr<const Film>, std::vector<boost::shared_ptr<Content> >); void as_xml (xmlpp::Node *) const; - void set_subtitle_offset (double); + void set_subtitle_x_offset (double); + void set_subtitle_y_offset (double); void set_subtitle_scale (double); - double subtitle_offset () const { + double subtitle_x_offset () const { boost::mutex::scoped_lock lm (_mutex); - return _subtitle_offset; + return _subtitle_x_offset; + } + + double subtitle_y_offset () const { + boost::mutex::scoped_lock lm (_mutex); + return _subtitle_y_offset; } double subtitle_scale () const { @@ -53,11 +60,15 @@ public: private: friend class ffmpeg_pts_offset_test; - + + /** x offset for placing subtitles, as a proportion of the container width; + * +ve is further right, -ve is further left. + */ + double _subtitle_x_offset; /** y offset for placing subtitles, as a proportion of the container height; - +ve is further down the frame, -ve is further up. - */ - double _subtitle_offset; + * +ve is further down the frame, -ve is further up. + */ + double _subtitle_y_offset; /** scale factor to apply to subtitles */ double _subtitle_scale; }; diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index 882072689..289259369 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -63,6 +63,7 @@ TranscodeJob::run () set_state (FINISHED_OK); _film->log()->log (N_("Transcode job completed successfully")); + _transcoder.reset (); } catch (...) { set_progress (1); |
