summaryrefslogtreecommitdiff
path: root/src/smpte_subtitle_asset.cc
AgeCommit message (Collapse)Author
2024-03-22Bump asdcplib to dcpomatic-2.13.0 branch.v1.9.4Carl Hetherington
2024-03-20Replace xmlpp::Node::add_child with cxml::add_child.Carl Hetherington
2023-11-20Re-read MXF descriptor after adding a key to a SMPTE subtitle asset (DoM #2660).v1.8.88Carl Hetherington
2023-11-20Fix checking for existing key_id; _key_id would always be set because ↵Carl Hetherington
MXF::set_key() sets it.
2023-10-09Add wrappers around boost::filesystem methods that handle theCarl Hetherington
required mangling of long filenames on Windows. Also wrap lots of missing places (e.g. calls to asdcplib, libxml++, libcxml etc.) in dcp::filesystem::fix_long_path(). The idea is to keep paths un-mangled until they we call some filesystem-related API and mangle them at that point. Otherwise we end up serialising mangled names, which seems like it will not end well. Should fix DoM #2623.
2023-09-06Report failures to read resources from MXF files.v1.8.81Carl Hetherington
2023-09-06Bump the PNG subtitle / font buffer a little.Carl Hetherington
2023-07-25Cleanup: move EqualityOptions into its own file.Carl Hetherington
2023-07-25Cleanup: pass EqualityOptions as const&Carl Hetherington
This exposes a useless assignment of export_differing_subtitles, which I've removed (and altered the comment accordingly).
2023-04-19Remove xmlns:xs namespace from subtitle XML (DoM #2498).Carl Hetherington
2023-04-16Use a shared_ptr<vector> for ArrayData rather than a shared_array.Carl Hetherington
This is simpler and allows us to remove the hack of allocating some "maximum" buffer for incoming JPEG2000 data. It does mean that the buffer is zero-initialized before being written to, but hopefully that doesn't matter too much.
2023-02-18Be explicit about the version of SMPTE 428-7 that is used for subtitles,v1.8.602389-vposCarl Hetherington
and default to writing the 2014 namespace.
2023-02-02In Deluxe's "Specifications for Digital Cinema Source and DCP Content Delivery"v1.8.55Carl Hetherington
they say that subtitle <IssueDate> must be of the form yyyy-mm-ddThh:mm:ss They don't explain it, and the standards don't say this (as far as I can see) but as usual their QC fails <IssueDates> that don't meet this "spec" so here we are. See also: https://dcpomatic.com/forum/viewtopic.php?t=2069
2022-12-04Fix some ambiguous shared_ptrs, seen on Arch Linux.Carl Hetherington
2022-03-20Nearly pretty-print subtitle XML (though not in <Text> nodes).v1.8.12Carl Hetherington
This is an attempt to fix DoM bug #2205.
2021-10-03Make the former dcst namespace default for SMPTE subtitles.Carl Hetherington
In DoM bug #2061 it is reported that Easy DCP gives the error "XML Document has default root namespace prefix: dcst. Default namespace should not use prefix for root or root namespace child nodes." with SMPTE subtitle files written by DCP-o-matic, and that the correct fix is to make the former dcst: namespace the default and then remove the dcst: qualifiers from everything. I'm not sure I agree with the error; AFAICS the subtitle files written by previous versions did not have a default root namespace prefix, since it was specified by xmlns:dcst and not just xmlns alone, so I think they were valid. However, using a default NS also seems fine, slightly simplifies the code and produces more compact subtitle files, so we change that here. It should also stop Easy DCP complaining, which is always marginally preferable to sticking to our guns and getting the blame for it.
2021-05-27Make similar changes to the previous commit for _xml_id.Carl Hetherington
This is also unavailable if the asset is encrypted.
2021-05-27Tidy handling of _raw_xml.Carl Hetherington
Before this if we tried to get the XML of an encrypted asset we would just get an empty string. Now we get a boost::none which means the verifier can avoid trying to check details of the XML (and instead raise a warning that you are trying to verify data that it cannot decrypt).
2021-05-27Read the bits we can from the MXF header even when it is encrypted.Carl Hetherington
2021-04-14Fix/hide some warnings.Carl Hetherington
2021-04-08Don't set the MXF _id from the XML <Id> tag.Carl Hetherington
They should not be the same, so it's unhelpful to make them so. parse_xml() sets up _xml_id anyway.
2021-04-08Expose the MXF ResourceID from SMPTESubtitleAsset.Carl Hetherington
2021-03-15Fix various bugs in subtitle/ccap verification.Carl Hetherington
Check that subtitles don't overlap reel boundaries, and fix a few tests that trip this check. Fix confusion when calculating subtitle timings during verification where the picture asset frame rate was being used rather than the subtitle asset's edit rate. Do the subtitle timing verification for Interop as well as SMPTE subtitles. Take <StartTime> tags into account when checking subtitles, even though Bv2.1 says they should be set to 0. Rename Time::as_editable_units to Time::as_editable_units_ceil and add a _floor variant, then use that to round down when checking reel boundary overlaps.
2021-01-24Tidying.Carl Hetherington
2021-01-22Assorted c++11 cleanups.Carl Hetherington
2021-01-21Use enum class for the things in types.hCarl Hetherington
2021-01-17Replace std::list with std::vector in the API.Carl Hetherington
2021-01-17Fix to allow re-writing of SMPTE subtitles.Carl Hetherington
2021-01-08std::shared_ptrCarl Hetherington
2020-12-20Accept fonts as data blocks rather than files.Carl Hetherington
2020-11-21More detailed error with inequality.Carl Hetherington
2020-11-02Add Data class and change API to a raw pointer.Carl Hetherington
2020-11-02Rename Data -> ArrayData.Carl Hetherington
2020-09-21Hide an expected error from asdcplib.Carl Hetherington
2020-05-09Comment typo.Carl Hetherington
2020-05-08Store and allow access to the raw XML that is read in fromCarl Hetherington
subtitle assets so that it cab be verified without any interference from being passed through libdcp.
2020-04-14s/DCPReadError/ReadError/gCarl Hetherington
2019-05-21Increase header size when writing SMPTE subtitle MXFs; fixes problems when ↵Carl Hetherington
writing lots of subs (DCP-o-matic bug #1561).
2019-03-15Merge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcpCarl Hetherington
2019-03-15Check that all image data is present after loading a SMPTE subtitle asset.Carl Hetherington
If we load SMPTE subtitles from a XML file try to load PNG data from the same directory; this feels like a hack.
2019-03-15Tweak comment.Carl Hetherington
2019-01-08Fix incorrect XML namespace in MXF header; I was using the prefixCarl Hetherington
instead of the namespace URI for what asdcplib calls TimedTextDescriptor::NamespaceName. Thanks to clairmeta; see https://github.com/Ymagis/ClairMeta/issues/72
2019-01-06ClairMeta points out that SMPTE subtitle MXF's ResourceID shouldCarl Hetherington
be the same as the internal XML ID. This in turn must be different from the MXF's UUID. I *think* that we have: AssetUUID: MXF's UUID, which must be different; written from the WriterInfo (set up by fill_writer_info, which is passed _id) AssetID: MXF's ResourceID, which must be the _xml_id; written from the TimedTextDescriptor. I believe that this patch fixes the ResourceID to be the XML ID (as required) without undoing the Doremi fix whereby the MXF UUID must be different to the XML ID. This patch quells ClairMeta's error.
2018-09-07Silence warnings from asdcplib when testing a MXF file for validity.Carl Hetherington
2018-07-09Basic reading of Interop/SMPTE image subtitles with a test for Interop.Carl Hetherington
2018-07-09Store image subtitle ID in the object, rather than a separate map. Start of ↵Carl Hetherington
reading image subtitles.
2018-07-09Switch to UUIDs for Interop image subtitle identification (rather than ↵Carl Hetherington
indices). Basic and untested SMPTE image subtitle support.
2018-07-07SubtitleString -> shared_ptr<Subtitle>Carl Hetherington
2018-03-13Merge EncryptionContext with DecryptionContext and use HMAC when decrypting.Carl Hetherington
2018-03-13Store interop/SMPTE in MXF.Carl Hetherington