summaryrefslogtreecommitdiff
path: root/src/smpte_subtitle_asset.cc
AgeCommit message (Collapse)Author
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
2018-02-12Use a different ID for the XML inside a SMPTE subtitle MXF than theCarl Hetherington
ID for the MXF itself. Apparently not doing so is an error (according to Doremi's release notes for 2.8.18).
2017-09-12Fix repeated subtitles when reading SMPTE encrypted DCPs.Carl Hetherington
2017-06-29Remove use of _formatted when writing subtitle XML.Carl Hetherington
This has the potential to add unwanted whitespace and newlines which are significant in subtitles. I think we'd have to write the XML ourselves to get around this.
2017-02-24Format XML sub output nicely with indents and such.Carl Hetherington
2016-11-09Don't use write_to_string_formatted with subs as it introduces lots of extra ↵Carl Hetherington
spaces into the actual subs.
2016-09-12Fix error.Carl Hetherington
2016-08-30Neater and more correct XML subtitle parser.Carl Hetherington
2016-08-17Use an optional<> where there should be one.Carl Hetherington
2016-08-14Support reading of encrypted subtitles.Carl Hetherington
2016-08-13Enable encryption of SMPTE subtitles.Carl Hetherington
Separate out EncryptionContext class to use in SMPTESubtitleAsset::write().
2016-07-21Trim some unused stream includes / usings.Carl Hetherington
2016-07-01asdcp headers moved into subdirectory.Carl Hetherington
2016-06-24Express standard differences in FontNode more neatly.Carl Hetherington
2016-06-13More consistent error message in a subtitle exception.Carl Hetherington