summaryrefslogtreecommitdiff
path: root/src/lib/dcp_decoder.cc
AgeCommit message (Collapse)Author
2024-06-28wip2801-capCarl Hetherington
2024-05-29Merge remote-tracking branch 'origin/main' into v2.17.xCarl Hetherington
2024-05-24Read 16-bit audio DCPs correctly.Carl Hetherington
As far as I can tell they are totally non-standard, but apparently the IMS3000 plays them so I guess we should too.
2024-05-19Add and use Content::has_mapped_audio().Carl Hetherington
2024-05-19Merge remote-tracking branch 'origin/main' into v2.17.xCarl Hetherington
2024-05-17Emit no audio from DCPs if none is mappedv2.16.85Carl Hetherington
This makes DCP content behave the same as FFmpeg.
2024-04-22Support playback of MPEG2 DCPs.Carl Hetherington
2024-04-21Rename Encoder -> FilmEncoder, and subclasses.Carl Hetherington
2024-04-21Rename classes to follow preparatory renames in libdcp.Carl Hetherington
2024-02-19Merge tag 'v2.16.76' into v2.17.xCarl Hetherington
2024-02-14Cleanup: white space.Carl Hetherington
2024-01-28Change how video timing is done.Carl Hetherington
This commit changes the approach with video timing. Previously, we would (more-or-less) try to use every video frame from the content in the output, hoping that they come at a constant frame rate. This is not always the case, however. Here we preserve the PTS of video frames, and then when one arrives we output whatever DCP video frames we can (at the regular DCP frame rate). Hopefully this will solve a range of sync problems, but it could also introduce new ones.
2024-01-15Fix handling of empty font IDs and default DCP fonts (#2721) (part of #2722).Carl Hetherington
Previously we used an empty font ID as the default for when a subtitle has no Font, but in #2721 we saw a DCP with an empty font ID which raised an assertion (because we'd already added our default font with the empty ID). Here we try to fix this (and also make the default font correctly be that from the first <LoadFont>).
2023-10-28Fix possible deference of invalid iterator (if _reel == _reels.end()).Carl Hetherington
2023-10-28Tolerate DCPs with no video and/or audio.Carl Hetherington
2023-10-15Fix DCP content font ID allocation to cope with DCPs that have multiple fontsCarl Hetherington
with the same name in the same reel (#2600). Previously we had this id_for_font_in_reel() which would give an ID of N_font-ID. This means we got duplicate font IDs. Here we replace that method with FontAllocator, which gives an ID of N_font-ID for the first font and M_font-ID, where M is a number higher than the highest reel index. The idea is to support the required new IDs without breaking exisiting projects. There is some documentation of how it works in doc/design/fonts
2023-05-10Add some assertions.Carl Hetherington
2023-02-27Support the 2014 version of SMPTE 428-7 in render_text.cc and use itCarl Hetherington
when placing subtitles (e.g. SRT). Also default to outputting 2014-era alignment.
2023-02-16Don't read video/audio from DCPs if it is being ignored (#2456).Carl Hetherington
This greatly speeds up the process of getting subtitles from a DCP.
2022-07-20Handle vertical alignment of subs correctly wrt the difference between ↵Carl Hetherington
Interop and SMPTE.
2022-07-11Fix font handling for DCP subtitles.Carl Hetherington
2022-06-12Set up TextDecoder position based on the time that the next thing willv2.16.14Carl Hetherington
be emitted, instead of the time that the last thing was (#2268). This is to avoid problems with the example shown in the test, where just because a subtitle in source A comes before a subtitle in source B, source A is pass()ed next and may then emit a subtitle which should be after the next one in B.
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-07Switch some list -> vector for consistency.Carl Hetherington
2022-04-20Remove DCP class and replace its functionality with a plain method in libdcp.Carl Hetherington
2022-04-03C++11 and whitespace cleanups.Carl Hetherington
2021-07-15C++11 tidying.Carl Hetherington
2021-06-04Ignore HMAC discrepencies when reading DCPs.Carl Hetherington
2021-04-29C++11 tidying.Carl Hetherington
2021-02-04C++11 tidying.Carl Hetherington
2021-01-31More enum class additions.Carl Hetherington
2021-01-21Adapt for libdcp use of enum class.Carl Hetherington
2021-01-20Bump libdcp for better verification, and make API adjustments.Carl Hetherington
2021-01-07BOOST_FOREACH.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-07-12Fix ATMOS frame numbering when decoding DCPs.v2.15.89Carl Hetherington
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-05-20Fix DCP playback when an incorrect KDM is added, followed byCarl Hetherington
a correct one.
2020-02-19Nicer fix for 2D-labelled-3D checking from master.Carl Hetherington
2020-01-10Give DCPDecoder its own ::position which just returns its internalCarl Hetherington
_next time. This is important because Decoder::position does the wrong thing with DCPs in the following case. 1. DCPDecoder emits a subtitle event (start/stop) at time t. 2. There follows a long time T with no subtitle events. During this time the DCPDecoder's position is reported as t (since TextDecoder notes its position as the time of the last thing it emitted --- which is all it reasonably can do, I think). 3. During this T the DCPDecoder may be incorrectly pass()ed because its position is reported as earlier than it really is; this results in video/audio being emitted by the DCPDecoder but other contemporary sources may not be pass()ed. The upshot of this can be that no audio is emitted, as a contemporary audio source is not pass()ed and hence the merger is waiting for audio that will take a long time to come. When the butler is running this can result in audio underruns as the video buffers overflow with no sign of any audio. It is also simpler this way; DCPDecoder was already maintaining the required information.
2019-12-17Flush audio decoder when a DCPDecoder finishes so thatCarl Hetherington
resamplers are emptied and hence we don't lose any samples. Fixes #1691. Back-ported from 1444299fa4582fc65c5237edd6c115921f20f872 in master.
2019-10-30Fix dying butler on changing CPL from one without to one withv2.15.28Carl Hetherington
subtitles (#1641). Forward-port from da39ed1516f2463f8a9bf4795a94f23d420c9ca3 in master.
2019-10-13Fix failure to load OV after adding a VF to a project.Carl Hetherington
This has the same cause as 19f51503621a57794bd79bac053c9e6549a69f46 i.e. the DCPDecoder re-use optimisation. This commit tries to re-fix 19f515 in a more general way which also takes into account the OV/VF bug. It also adds a unit test.
2019-09-27Fix failure to playback encrypted DCPs, introduced when adding DCPDecoder ↵Carl Hetherington
re-use optimisation.
2019-08-30Make player more tolerant of some DCP errors.Carl Hetherington
2019-07-25Optimise decoder_factory for DCPDecoder by offering the old decoderCarl Hetherington
(if available) to recover the list of reels from, rather than having to scan the filesystem again.
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2019-05-10Update for libdcp API changes.Carl Hetherington
2019-04-20Don't set up decoder parts for DCPs unless they can be playedv2.13.149Carl Hetherington
(i.e. are not encrypted and not missing assets). Fixes full audio buffers on locates with large encrypted DCPs and no KDMs; in these cases silent audio is created by the fill_audio() at the bottom of Player::pass() but no video is created by anybody.