summaryrefslogtreecommitdiff
path: root/src/lib/writer.h
AgeCommit message (Collapse)Author
2025-08-25Move write_cover_sheet() out to its own file.Carl Hetherington
2025-08-22White space: writer.{cc,h}Carl Hetherington
2024-12-26Give ownership of info files to ReelWriters (#2912).v2.18.2Carl Hetherington
The motivation here is to stop a pattern where we create a file, close it, and then re-open it (many times) as I think there are problems on Windows when a virus scanner sees the new file, opens it for checking, and then we can't re-open it. This also makes things a fair bit simpler, as a lock is removed and we don't try to differentiate read/write cases by opening the file in different ways; it's now always writeable.
2024-05-11Stop using video directory and hard-linking (#2756).Carl Hetherington
Instead store details of a previously-created asset in the film's metadata and then look there for potential video files to re-use.
2024-05-08Merge remote-tracking branch 'origin/main' into v2.17.xCarl Hetherington
2024-05-08Work around deadlock when destroying J2KEncoder with a full writer queue ↵v2.16.83Carl Hetherington
(#2784). This feels like a hack, but I can't think of a nicer way to do it. The interruption disable makes sense because when we destroy encoder threads during a DCP encode (because a remote server goes away, for example) we don't want any frames to be lost due to the encode thread being interrupted between taking the frame off the queue and sending it to the writer. When we're destroying the encoder we don't care about this, but I can't see how you'd differentiate. Maybe the encoder queue could have two lists: to-do and in-progress; the encoder thread atomically moves a frame from to-do to in-progress, but then how do you know when the in-progress ones are orphaned and need to be re-added to the main queue. You could make the writer return saying "no" if the queue is full (rather than blocking and waiting for the queue to empty) but that seems wasteful as then the frame would be re-encoded.
2024-05-08Add some missing includes.Carl Hetherington
2024-04-22Support encoding of MPEG2 DCPs.Carl Hetherington
2024-01-28Only build grok for Ubuntu 22.04.Carl Hetherington
2023-11-20Improve progress reporting of digest calculations (might help with #2643).Carl Hetherington
2022-12-13More header trimming.Carl Hetherington
2022-10-17Remove some unnecessary use of shared_ptr.Carl Hetherington
2022-06-07Rearrange subtitle font management.Carl Hetherington
With this change each subtitle coming out of the player has a reference to a dcpomatic::Font that belongs to the TextContent. This hopefully solves a few problems which all basically stemmed from the fact that previously the decoders/player were deciding what the font ID in the output DCP would be - they can't do that properly.
2022-06-07Rearrange some includes of dcpomatic_time.hCarl Hetherington
2022-06-07Tidying.Carl Hetherington
2021-05-01C++11 tidying.Carl Hetherington
2021-04-21Move digest calculation to a separate method.Carl Hetherington
2021-03-16Split subtitles at reel boundaries (#1918).Carl Hetherington
2021-02-17Assorted C++11 tidying.Carl Hetherington
2021-01-31More enum class additions.Carl Hetherington
2021-01-07std::shared_ptrCarl Hetherington
2020-12-22Pass fonts from content around as FontData.Carl Hetherington
i.e. as a block of memory rather than a file. Also, get the fonts from the decoder rather than the content. Together, these changes allow us to use fonts from SMPTE DCPs added as content. Before, fonts would be messed up in those cases (#1885).
2020-12-08In a DCP with any subs/ccaps, make sure every reel has them (#1340).Carl Hetherington
2020-12-08Write subtitles and closed captions to a test DCP in the hints thread,Carl Hetherington
then check the result for Bv2.1 violations (part of #1800).
2020-12-08Make Writer take an output DCP path rather than getting it from theCarl Hetherington
film itself.
2020-12-08Use a weak_ptr<Film> in Writer.Carl Hetherington
2020-11-26Calculate hashes for any referenced assets that do not already have one.Carl Hetherington
This is necessary so that we always include <Hash> in CPLs even when referencing DCPs that do not have it.
2020-11-02Pass around JPEG2000 data as a shared_ptr and hence avoid a copyCarl Hetherington
of 4MB of data for every JPEG2000 frame we decode.
2020-06-19Make Atmos content work more like other content. Now its MXFsv2.15.82Carl Hetherington
are re-written, meaning that they can be encrypted. This (along with the libdcp update) also fixes assorted Atmos bugs.
2020-04-19Add _last_written to Writer, containing the last written frame and eyesCarl Hetherington
to each reel. This is updated when things are popped off the queue, with _state_mutex_held, and used in preference to the ones in ReelWriter which were previously being updated during the time the _state_mutex lock is unlocked in the body of Writer::thread(). This was not thread safe (thanks, valgrind!)
2020-01-30Various thread cleanups.Carl Hetherington
2019-05-10Put Font and Screen into dcpomatic namespace.Carl Hetherington
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2018-08-29Basics of splitting CCAP streams into different assets.Carl Hetherington
2018-08-23More caption -> text.Carl Hetherington
2018-07-23Tidy up after mass rename.Carl Hetherington
2018-07-23More automated renaming.Carl Hetherington
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
2018-07-19Clean up after previous commit.Carl Hetherington
2018-07-19Reword again: Text -> Caption and Plain -> Text.Carl Hetherington
sed -i "s/ActiveText/ActiveCaptions/g" src/lib/*.{cc,h} sed -i "s/active_text.h/active_captions.h/g" src/lib/*.{cc,h} sed -i "s/active_text.cc/active_captions.cc/g" src/lib/wscript mv src/lib/active_text.cc src/lib/active_captions.cc mv src/lib/active_text.h src/lib/active_captions.h sed -i "s/PlainTextFileContent/TextCaptionFileContent/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/PlainTextFile/TextCaptionFile/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/plain_text_file_content/text_caption_file_content/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} test/*.cc mv src/lib/plain_text_file_content.cc src/lib/text_caption_file_content.cc mv src/lib/plain_text_file_content.h src/lib/text_caption_file_content.h sed -i "s/PlainTextFileDecoder/TextCaptionFileDecoder/g" src/lib/*.{cc,h} sed -i "s/plain_text_file_decoder/text_caption_file_decoder/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} mv src/lib/plain_text_file_decoder.cc src/lib/text_caption_file_decoder.cc mv src/lib/plain_text_file_decoder.h src/lib/text_caption_file_decoder.h sed -i "s/PlayerText/PlayerCaption/g" src/lib/*.{cc,h} sed -i "s/player_text.cc/player_caption.cc/g" src/lib/wscript sed -i "s/player_text.h/player_caption.h/g" src/lib/*.{cc,h} mv src/lib/player_text.cc src/lib/player_caption.cc mv src/lib/player_text.h src/lib/player_caption.h sed -i "s/ContentPlainText/ContentTextCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/ContentBitmapText/ContentBitmapCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/PlainText/TextCaption/g" src/lib/*.{cc,h} test/*.cc sed -i "s/plain_text.h/text_caption.h/g" src/lib/*.{cc,h} mv src/lib/plain_text.h src/lib/text_caption.h
2018-07-19Get types into ReelWriter.Carl Hetherington
2018-07-19Partial conversion of PlayerSubtitles -> PlayerText and SubtitleString -> ↵Carl Hetherington
PlainText.
2018-06-05Don't allow the queue to get too big with REPEAT frames otherwisev2.13.26Carl Hetherington
there's a long delay at the end of the job while they are written. We must still write FULL frames even if the queue is long (we only stop doing that if the queue has too many FULL frames i.e. too much memory consumption). With this commit we stop writing REPEAT/FAKE frames when the queue gets long and assume there will always be a sequence image for writing and hence the main writer thread will reduce the queue given time.
2017-12-29Previously the code did not account for referenced audio, so farCarl Hetherington
as I can see. It decided which reel to write new audio to based on how many frames had been written to the current reel; this makes no sense for referred reels for which the player will emit no audio. This code looks at the audio timestamp instead.
2017-05-09Simple cover sheet support (#1039).Carl Hetherington
2017-04-30Fix some cppcheck warnings.Carl Hetherington
2017-04-19Various Doxygen fixes.Carl Hetherington
2017-04-19Attempt to tidy up internal APIs slightly.Carl Hetherington
2016-07-27Do parallel digest calculation when there are multiple reels (#855).Carl Hetherington
2016-05-25No-op; fix GPL address and use the explicit-program-name version.Carl Hetherington
2015-12-04Use libdcp's compress_j2k; move Data into libdcp.Carl Hetherington