├── .gitattributes ├── .gitignore ├── COPYING ├── Doxyfile ├── LICENSE.OpenSSL ├── LICENSE.SMPTE ├── README.md ├── TESTING ├── benchmark ├── j2k_transcode.cc ├── rgb_to_xyz.cc └── wscript ├── cscript ├── doc ├── decrypt_kdm.sh ├── design ├── mainpage.txt └── make_kdm.sh ├── examples ├── help.j2c ├── help.png ├── make_dcp.cc ├── make_kdm.cc ├── read_dcp.cc ├── sine_440_-12dB.wav ├── sine_880_-12dB.wav └── wscript ├── libdcp-1.0.pc.in ├── ratings ├── run ├── benchmark ├── coverage ├── examples │ ├── make_dcp │ ├── make_kdm │ └── read_dcp ├── test │ ├── rewrite_subs │ └── subs_in_out ├── tests ├── tests.bat └── tools │ ├── dcpdecryptmxf │ ├── dcpdiff │ ├── dcpdumpimage │ ├── dcpdumpsub │ ├── dcpinfo │ ├── dcpkdm │ ├── dcpmap │ ├── dcprecover │ ├── dcpsignerthumb │ └── dcpverify ├── schema ├── SMPTE-429-7-2006-CPL.xsd ├── SMPTE-430-1-2006-Amd-1-2009-KDM.xsd ├── SMPTE-430-3-2008-ETM.xsd ├── XMLSchema.xsd ├── check_kdm.sh ├── xenc-schema.xsd └── xmldsig-core-schema.xsd ├── scripts ├── check-boilerplate ├── plotdiff ├── remake-test-certificates ├── update-language-subtags └── update-ratings ├── src ├── array_data.cc ├── array_data.h ├── asset.cc ├── asset.h ├── asset_factory.cc ├── asset_factory.h ├── asset_list.h ├── asset_map.cc ├── asset_map.h ├── asset_reader.h ├── asset_writer.cc ├── asset_writer.h ├── atmos_asset.cc ├── atmos_asset.h ├── atmos_asset_reader.h ├── atmos_asset_writer.cc ├── atmos_asset_writer.h ├── atmos_frame.h ├── behaviour.h ├── bitstream.cc ├── bitstream.h ├── certificate.cc ├── certificate.h ├── certificate_chain.cc ├── certificate_chain.h ├── chromaticity.cc ├── chromaticity.h ├── colour_conversion.cc ├── colour_conversion.h ├── combine.cc ├── combine.h ├── compose.hpp ├── content_kind.cc ├── content_kind.h ├── cpl.cc ├── cpl.h ├── crypto_context.h ├── data.cc ├── data.h ├── dcp.cc ├── dcp.h ├── dcp_assert.h ├── dcp_time.cc ├── dcp_time.h ├── decrypted_kdm.cc ├── decrypted_kdm.h ├── decrypted_kdm_key.cc ├── decrypted_kdm_key.h ├── encrypted_kdm.cc ├── encrypted_kdm.h ├── equality_options.h ├── exceptions.cc ├── exceptions.h ├── ffmpeg_image.cc ├── ffmpeg_image.h ├── file.cc ├── file.h ├── filesystem.cc ├── filesystem.h ├── font_asset.cc ├── font_asset.h ├── frame.h ├── frame_info.h ├── fsk.cc ├── fsk.h ├── gamma_transfer_function.cc ├── gamma_transfer_function.h ├── h_align.cc ├── h_align.h ├── identity_transfer_function.cc ├── identity_transfer_function.h ├── interop_load_font_node.cc ├── interop_load_font_node.h ├── interop_text_asset.cc ├── interop_text_asset.h ├── j2k_picture_asset.cc ├── j2k_picture_asset.h ├── j2k_picture_asset_writer.cc ├── j2k_picture_asset_writer.h ├── j2k_picture_asset_writer_common.cc ├── j2k_transcode.cc ├── j2k_transcode.h ├── key.cc ├── key.h ├── language_tag.cc ├── language_tag.h ├── load_font_node.h ├── load_variable_z.cc ├── load_variable_z.h ├── local_time.cc ├── local_time.h ├── locale_convert.cc ├── locale_convert.h ├── main_sound_configuration.cc ├── main_sound_configuration.h ├── metadata.cc ├── metadata.h ├── modified_gamma_transfer_function.cc ├── modified_gamma_transfer_function.h ├── mono_j2k_picture_asset.cc ├── mono_j2k_picture_asset.h ├── mono_j2k_picture_asset_reader.h ├── mono_j2k_picture_asset_writer.cc ├── mono_j2k_picture_asset_writer.h ├── mono_j2k_picture_frame.cc ├── mono_j2k_picture_frame.h ├── mono_mpeg2_picture_asset.cc ├── mono_mpeg2_picture_asset.h ├── mono_mpeg2_picture_asset_reader.h ├── mono_mpeg2_picture_asset_writer.cc ├── mono_mpeg2_picture_asset_writer.h ├── mono_mpeg2_picture_frame.cc ├── mono_mpeg2_picture_frame.h ├── mpeg2_picture_asset.cc ├── mpeg2_picture_asset.h ├── mpeg2_picture_asset_writer.cc ├── mpeg2_picture_asset_writer.h ├── mpeg2_picture_asset_writer_common.cc ├── mpeg2_transcode.cc ├── mpeg2_transcode.h ├── mxf.cc ├── mxf.h ├── name_format.cc ├── name_format.h ├── object.cc ├── object.h ├── openjpeg_image.cc ├── openjpeg_image.h ├── picture_asset.cc ├── picture_asset.h ├── piecewise_lut.h ├── pkl.cc ├── pkl.h ├── profile.h ├── rating.cc ├── rating.h ├── raw_convert.cc ├── raw_convert.h ├── reel.cc ├── reel.h ├── reel_asset.cc ├── reel_asset.h ├── reel_atmos_asset.cc ├── reel_atmos_asset.h ├── reel_file_asset.cc ├── reel_file_asset.h ├── reel_interop_text_asset.cc ├── reel_interop_text_asset.h ├── reel_markers_asset.cc ├── reel_markers_asset.h ├── reel_mono_picture_asset.cc ├── reel_mono_picture_asset.h ├── reel_picture_asset.cc ├── reel_picture_asset.h ├── reel_smpte_text_asset.cc ├── reel_smpte_text_asset.h ├── reel_sound_asset.cc ├── reel_sound_asset.h ├── reel_stereo_picture_asset.cc ├── reel_stereo_picture_asset.h ├── reel_text_asset.cc ├── reel_text_asset.h ├── ref.cc ├── ref.h ├── rgb_xyz.cc ├── rgb_xyz.h ├── ruby.cc ├── ruby.h ├── s_gamut3_transfer_function.cc ├── s_gamut3_transfer_function.h ├── scope_guard.h ├── search.cc ├── search.h ├── smpte_load_font_node.cc ├── smpte_load_font_node.h ├── smpte_text_asset.cc ├── smpte_text_asset.h ├── sound_asset.cc ├── sound_asset.h ├── sound_asset_reader.h ├── sound_asset_writer.cc ├── sound_asset_writer.h ├── sound_frame.cc ├── sound_frame.h ├── stereo_j2k_picture_asset.cc ├── stereo_j2k_picture_asset.h ├── stereo_j2k_picture_asset_reader.h ├── stereo_j2k_picture_asset_writer.cc ├── stereo_j2k_picture_asset_writer.h ├── stereo_j2k_picture_frame.cc ├── stereo_j2k_picture_frame.h ├── subtitle_standard.cc ├── subtitle_standard.h ├── text.cc ├── text.h ├── text_asset.cc ├── text_asset.h ├── text_asset_internal.cc ├── text_asset_internal.h ├── text_image.cc ├── text_image.h ├── text_string.cc ├── text_string.h ├── text_type.h ├── transfer_function.cc ├── transfer_function.h ├── types.cc ├── types.h ├── utc_offset.cc ├── utc_offset.h ├── util.cc ├── util.h ├── v_align.cc ├── v_align.h ├── verify.cc ├── verify.h ├── verify_internal.h ├── verify_j2k.cc ├── verify_j2k.h ├── verify_report.cc ├── verify_report.h ├── version.h ├── warnings.h ├── wscript └── xml.h ├── tags ├── dcnc ├── extlang ├── language ├── region ├── script └── variant ├── test ├── asset_test.cc ├── atmos_test.cc ├── certificates_test.cc ├── colour_conversion_test.cc ├── colour_test.cc ├── combine_test.cc ├── cpl_metadata_test.cc ├── cpl_ratings_test.cc ├── cpl_sar_test.cc ├── cpl_test.cc ├── data │ ├── 1s_24-bit_48k_silence.wav │ ├── 2007.mxf │ ├── 2010.mxf │ ├── 2014.mxf │ ├── 32x32_red_square.j2c │ ├── 822bd341-c751-45b1-94d2-410e4ffcff1b.png │ ├── DCP │ │ ├── ASSETMAP.xml │ │ ├── VOLINDEX.xml │ │ ├── audio.mxf │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ ├── pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml │ │ └── video.mxf │ ├── bad_cert.pem │ ├── base64_test │ ├── broken_smpte.mxf │ ├── certificate_chain │ ├── cpl_content_kind_test1.xml │ ├── cpl_content_kind_test2.xml │ ├── cpl_content_kind_test3.xml │ ├── dummy.mxf │ ├── dummy.ttf │ ├── empty_but_with_children.xml │ ├── empty_text.mxf │ ├── empty_with_empty_children.xml │ ├── extra_assetmap │ │ ├── 1cab4236-9ad1-5b2f-bbac-1234567890ab.mxf │ │ ├── ASSETMAP │ │ ├── VOLINDEX │ │ ├── cpl_d74fda30-d5f4-4c5f-870f-ebc089d97eb7.xml │ │ ├── j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf │ │ ├── pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf │ │ └── pkl_0382c908-7389-45d6-b671-d5100868cbbe.xml │ ├── failing-private.key │ ├── flat_red.j2c │ ├── flat_red.png │ ├── good_cert.pem │ ├── kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml │ ├── private.key │ ├── private2.key │ ├── private_key_from_windows.pem │ ├── ruby1.xml │ ├── signer.key │ ├── sub.png │ ├── subs.mxf │ ├── subs1.xml │ ├── subs2.xml │ ├── subs3.xml │ ├── subs4.xml │ ├── subs5.xml │ ├── subtitles_with_vZani.xml │ ├── subtitles_with_vZani_parsed.xml │ ├── target.pem.crt.de5d4eba-e683-41ca-bdda-aa4ad96af3f4.kdm.xml │ ├── text_formatter.txt │ ├── text_formatter_windows.txt │ ├── verify_incorrect_closed_caption_ordering3.xml │ └── verify_incorrect_closed_caption_ordering4.xml ├── dcp_font_test.cc ├── dcp_test.cc ├── dcp_time_test.cc ├── decryption_test.cc ├── effect_test.cc ├── encryption_test.cc ├── exception_test.cc ├── filesystem_test.cc ├── fraction_test.cc ├── frame_info_hash_test.cc ├── gamma_transfer_function_test.cc ├── h_align_test.cc ├── interop_load_font_test.cc ├── interop_subtitle_test.cc ├── kdm_test.cc ├── key_test.cc ├── language_tag_test.cc ├── load_variable_z_test.cc ├── local_time_test.cc ├── long_filenames_test.cc ├── make_digest_test.cc ├── markers_test.cc ├── mca_test.cc ├── mono_mpeg2_picture_read_test.cc ├── mono_mpeg2_picture_write_test.cc ├── raw_convert_test.cc ├── read_change_write_test.cc ├── read_dcp_test.cc ├── recovery_test.cc ├── reel_asset_test.cc ├── ref │ ├── DCP │ │ ├── dcp_test1 │ │ │ ├── ASSETMAP.xml │ │ │ ├── VOLINDEX.xml │ │ │ ├── audio.mxf │ │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ │ ├── pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml │ │ │ └── video.mxf │ │ ├── dcp_test2 │ │ │ ├── ASSETMAP.xml │ │ │ ├── VOLINDEX.xml │ │ │ ├── audio.mxf │ │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ │ ├── pkl_8577c7c0-be29-4eb5-a449-1e3870a42bbd.xml │ │ │ └── video.mxf │ │ ├── dcp_test3 │ │ │ ├── ASSETMAP │ │ │ ├── VOLINDEX │ │ │ ├── cpl_cbfd2bc0-21cf-4a8f-95d8-9cddcbe51296.xml │ │ │ ├── j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf │ │ │ ├── pcm_69cf9eaf-9a99-4776-b022-6902208626c3.mxf │ │ │ └── pkl_d87a950c-bd6f-41f6-90cc-56ccd673e131.xml │ │ ├── dcp_test5 │ │ │ ├── ASSETMAP.xml │ │ │ ├── VOLINDEX.xml │ │ │ ├── audio.mxf │ │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ │ ├── pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml │ │ │ └── video.mxf │ │ ├── dcp_test7 │ │ │ ├── ASSETMAP │ │ │ ├── VOLINDEX │ │ │ ├── audio.mxf │ │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ │ ├── pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml │ │ │ └── video.mxf │ │ ├── dcp_test8 │ │ │ ├── ASSETMAP │ │ │ ├── VOLINDEX │ │ │ ├── cpl_d74fda30-d5f4-4c5f-870f-ebc089d97eb7.xml │ │ │ ├── j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf │ │ │ ├── pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf │ │ │ └── pkl_0382c908-7389-45d6-b671-d5100868cbbe.xml │ │ ├── encryption_test │ │ │ ├── ASSETMAP.xml │ │ │ ├── VOLINDEX.xml │ │ │ ├── audio.mxf │ │ │ ├── cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml │ │ │ ├── pkl_5203f3d4-9d62-4062-8bf1-7a114eff99df.xml │ │ │ └── video.mxf │ │ └── subtitle_namespace_test │ │ │ ├── ASSETMAP.xml │ │ │ ├── VOLINDEX.xml │ │ │ ├── cpl_fc815694-7977-4a27-a8b3-32b9d4075e4c.xml │ │ │ ├── j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf │ │ │ ├── pcm_9611db6b-7566-4d83-a485-7d23948bf219.mxf │ │ │ ├── pkl_d4a4b6ae-ff66-48ff-b0d0-ee695590b6af.xml │ │ │ └── sub_315de731-1173-484c-9a35-bdacf5a9d99d.mxf │ ├── base64_test_decoded │ ├── cpl_content_kind_test1.xml │ ├── cpl_content_kind_test2.xml │ ├── cpl_content_kind_test3.xml │ ├── cpl_metadata_test1.xml │ ├── cpl_metadata_test2.xml │ ├── cpl_metadata_test3.xml │ ├── cpl_metadata_test4.xml │ ├── cpl_metadata_test5.xml │ ├── crypt │ │ ├── ca.cnf │ │ ├── ca.key │ │ ├── ca.key.public │ │ ├── ca.self-signed.pem │ │ ├── intermediate.cnf │ │ ├── intermediate.csr │ │ ├── intermediate.key │ │ ├── intermediate.key.public │ │ ├── intermediate.signed.pem │ │ ├── leaf.cnf │ │ ├── leaf.csr │ │ ├── leaf.key │ │ ├── leaf.key.public │ │ └── leaf.signed.pem │ ├── j2c │ │ ├── 1.j2c │ │ ├── 10.j2c │ │ ├── 11.j2c │ │ ├── 12.j2c │ │ ├── 13.j2c │ │ ├── 14.j2c │ │ ├── 15.j2c │ │ ├── 16.j2c │ │ ├── 17.j2c │ │ ├── 18.j2c │ │ ├── 19.j2c │ │ ├── 2.j2c │ │ ├── 20.j2c │ │ ├── 21.j2c │ │ ├── 22.j2c │ │ ├── 23.j2c │ │ ├── 24.j2c │ │ ├── 3.j2c │ │ ├── 4.j2c │ │ ├── 5.j2c │ │ ├── 6.j2c │ │ ├── 7.j2c │ │ ├── 8.j2c │ │ └── 9.j2c │ ├── make.py │ ├── wav │ │ ├── 1.wav │ │ └── 2.wav │ └── write_interop_subtitle_test3 │ │ ├── ASSETMAP │ │ ├── VOLINDEX │ │ ├── cpl_5407b210-4441-4e97-8b16-8bdc7c12da54.xml │ │ ├── dd015243-ab77-435c-a13d-690566885121.png │ │ ├── pkl_ac8d301c-e5d9-4343-b6f3-ba2668adbe56.xml │ │ └── subs.xml ├── rewrite_subs.cc ├── rgb_xyz_test.cc ├── round_trip_test.cc ├── scope_guard_test.cc ├── search_test.cc ├── shared_subtitle_test.cc ├── smpte_load_font_test.cc ├── smpte_subtitle_test.cc ├── sound_asset_writer_test.cc ├── sound_frame_test.cc ├── stream_operators.cc ├── stream_operators.h ├── subs_in_out.cc ├── sync_test.cc ├── test.cc ├── test.h ├── utf8_test.cc ├── util_test.cc ├── v_align_test.cc ├── verify_report_test.cc ├── verify_test.cc └── wscript ├── tools ├── common.cc ├── common.h ├── dcpdecryptmxf.cc ├── dcpdiff.cc ├── dcpdumpimage.cc ├── dcpdumpsub.cc ├── dcpinfo.cc ├── dcpkdm.cc ├── dcprecover.cc ├── dcpthumb.cc ├── dcpverify.cc └── wscript ├── waf ├── waf-tools └── clang_compilation_database.py ├── wscript └── xsd ├── DCDMSubtitle-2010.xsd ├── DCDMSubtitle-2014.xsd ├── DCSubtitle.v1.mattsson.xsd ├── Dolby-2012-AD.xsd ├── Main-Stereo-Picture-CPL.xsd ├── PROTO-ASDCP-AM-20040311.xsd ├── PROTO-ASDCP-CC-CPL-20070926.xsd ├── PROTO-ASDCP-CPL-20040511.xsd ├── PROTO-ASDCP-PKL-20040311.xsd ├── SMPTE-335-2012.xsd ├── SMPTE-395-2014-13-1-aaf.xsd ├── SMPTE-429-10-2008.xsd ├── SMPTE-429-12-2008.xsd ├── SMPTE-429-16.xsd ├── SMPTE-429-7-2006-CPL.xsd ├── SMPTE-429-8-2006-PKL.xsd ├── SMPTE-429-9-2007-AM.xsd ├── XMLSchema.dtd ├── XMLSchema.xsd ├── isdcf-mca.xsd ├── xlink.xsd ├── xml.xsd └── xmldsig-core-schema.xsd /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pem binary 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | core 2 | *~ 3 | build 4 | .waf* 5 | .lock* 6 | doc/html 7 | doc/latex 8 | src/version.cc 9 | *.pyc 10 | __pycache__ 11 | GPATH 12 | GRTAGS 13 | GSYMS 14 | GTAGS 15 | .*.swp 16 | TAGS 17 | .ccls-cache 18 | compile_commands.json 19 | .cache 20 | 21 | run/tools/dcpdummy 22 | -------------------------------------------------------------------------------- /LICENSE.SMPTE: -------------------------------------------------------------------------------- 1 | Portions of this repository are covered by the following licence: 2 | 3 | ---8<--- 4 | 5 | Copyright (c), Society of Motion Pictures and Television Engineers. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 11 | 12 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 13 | 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 17 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | 20 | This document is an element of SMPTE ST 2067-100:2014, which is available at http://standards.smpte.org. 21 | 22 | To ensure interoperability, users are encouraged to: 23 | 24 | (a) retain this notice; 25 | (b) retrieve the recent versions of this document and its companion defining engineering document. In particular, this document alone might not be sufficient to ensure interoperability; 26 | (c) highlight and explain any modification they make to this document; and 27 | (d) report issues to the Director of Standards at https://www.smpte.org/about/staff. 28 | 29 | ---8<--- 30 | 31 | -------------------------------------------------------------------------------- /TESTING: -------------------------------------------------------------------------------- 1 | libdcp has unit tests which are run with 2 | 3 | run/tests 4 | 5 | -------------------------------------------------------------------------------- /benchmark/wscript: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Carl Hetherington 3 | # 4 | # This file is part of libdcp. 5 | # 6 | # libdcp is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # libdcp is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with libdcp. If not, see . 18 | # 19 | # In addition, as a special exception, the copyright holders give 20 | # permission to link the code of portions of this program with the 21 | # OpenSSL library under certain conditions as described in each 22 | # individual source file, and distribute linked combinations 23 | # including the two. 24 | # 25 | # You must obey the GNU General Public License in all respects 26 | # for all of the code used other than OpenSSL. If you modify 27 | # file(s) with this exception, you may extend this exception to your 28 | # version of the file(s), but you are not obligated to do so. If you 29 | # do not wish to do so, delete this exception statement from your 30 | # version. If you delete this exception statement from all source 31 | # files in the program, then also delete it here. 32 | # 33 | 34 | def build(bld): 35 | for p in ['rgb_to_xyz', 'j2k_transcode']: 36 | obj = bld(features='cxx cxxprogram') 37 | obj.name = p 38 | obj.uselib = 'BOOST_FILESYSTEM ASDCPLIB_DCPOMATIC CXML AVCODEC AVUTIL' 39 | obj.cppflags = ['-g', '-O2'] 40 | obj.use = 'libdcp%s' % bld.env.API_VERSION 41 | obj.source = "%s.cc" % p 42 | obj.target = p 43 | -------------------------------------------------------------------------------- /doc/decrypt_kdm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | KDM_DECRYPT=/home/carl/src/digital_cinema_tools/encryption/kdm-decrypt.rb 4 | KDM=kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml 5 | 6 | $KDM_DECRYPT $KDM target_private.key 7 | -------------------------------------------------------------------------------- /doc/design: -------------------------------------------------------------------------------- 1 | 2 | Read an existing DCP, adjust it, write it back out again, preserving things we didn't adjust; 3 | perhaps being variably strict and pointing out errors. 4 | Read multiple DCPs and pull bits out 5 | Create a new DCP without having to remember to fill in every detail 6 | 7 | Structures & their unique (important) components 8 | 9 | -- CPL 10 | "playlist"; entry points, durations of assets, frame rates, aspect ratios 11 | 12 | -- PKL 13 | Hashes, sizes 14 | 15 | -- ASSETMAP 16 | MXF filenames (also CPL/PKL filenames) 17 | 18 | -- VOLINDEX 19 | Nothing (unless we support multiple volumes) 20 | 21 | -- MXFs 22 | actual data 23 | 24 | 25 | Approaches 26 | 27 | 1. 28 | Load a DCP -> we get some assets [each with hash, size, filename] and a CPL (pointing to assets via real pointer or ID) 29 | CPL its own class; then we can do things like 30 | cpl = new CPL 31 | cpl->add_asset (picture, ...) 32 | DCP dcp (cpl); 33 | dcp.write_xml (); 34 | 35 | Can't see a drawback with this, and it's pretty much what is happening now. -------------------------------------------------------------------------------- /doc/mainpage.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @mainpage libdcp 4 | 5 | libdcp is a library to create Digital Cinema Packages (DCPs) from 6 | video, audio and subtitle data, and also to read and process existing 7 | DCPs. 8 | 9 | Most of the hard work is done by a (slightly patched) version of 10 | asdcplib (http://www.cinecert.com/asdcplib/). 11 | 12 | libdcp is distributed under the GNU GPL. 13 | 14 | Creating DCPs 15 | -- 16 | 17 | An example of DCP creation is given in examples/make_dcp.cc. 18 | 19 | Reading existing DCPs 20 | -- 21 | 22 | An example of DCP reading is given in examples/read_dcp.cc. 23 | */ 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/make_kdm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CINEMASLIDES=/home/carl/src/digital_cinema_tools/cinemaslides 4 | #CPL=/home/carl/src/libdcp-test/TONEPLATES-SMPTE-ENCRYPTED_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV/cpl_eece17de-77e8-4a55-9347-b6bab5724b9f_.xml 5 | CPL=/home/carl/DCP/kdmtest/KDMTEST_TST-1_F_51_2K_20130928/fbb1d2ce-fcd9-4765-8f01-2afcad274506_cpl.xml 6 | 7 | ls $CPL 8 | export CINEMACERTSTORE=/home/carl/.config/dcpomatic/crypt 9 | $CINEMASLIDES -v debug --kdm --cpl $CPL --start 2013-09-28T01:41:51+00:00 --end 2014-09-28T01:41:51+00:00 --target target.pem --keysdir content_keys 10 | 11 | -------------------------------------------------------------------------------- /examples/help.j2c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/examples/help.j2c -------------------------------------------------------------------------------- /examples/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/examples/help.png -------------------------------------------------------------------------------- /examples/sine_440_-12dB.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/examples/sine_440_-12dB.wav -------------------------------------------------------------------------------- /examples/sine_880_-12dB.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/examples/sine_880_-12dB.wav -------------------------------------------------------------------------------- /examples/wscript: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012-2016 Carl Hetherington 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 2 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | # 18 | 19 | def build(bld): 20 | for example in ['make_dcp', 'read_dcp', 'make_kdm']: 21 | obj = bld(features='cxx cxxprogram') 22 | obj.name = example 23 | obj.use = 'libdcp%s' % bld.env.API_VERSION 24 | obj.uselib = 'OPENJPEG CXML OPENMP ASDCPLIB_DCPOMATIC BOOST_FILESYSTEM OPENSSL XMLSEC1 MAGICK AVCODEC AVUTIL' 25 | obj.source = example + '.cc' 26 | obj.target = example 27 | obj.install_path = '' 28 | -------------------------------------------------------------------------------- /libdcp-1.0.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@includedir@ 4 | 5 | Name: libdcp 6 | Description: DCP reading and writing library 7 | Version: @version@ 8 | Requires: openssl libxml++-@xmlpp_api@ xmlsec1 libasdcp-dcpomatic xerces-c libavutil libavcodec fmt 9 | Libs: @libs@ 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /run/benchmark: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | perf=0 4 | if [ "$1" == "--perf" ]; then 5 | perf=1 6 | shift 7 | fi 8 | 9 | bm=$1 10 | shift 11 | if [ "$bm" == "" ]; then 12 | echo "Syntax: $0 [--perf] " 13 | exit 1 14 | fi 15 | 16 | export LD_LIBRARY_PATH=build/src 17 | if [ "$perf" == "1" ]; then 18 | perf stat build/benchmark/$bm "$*" 19 | else 20 | build/benchmark/$bm "$*" 21 | fi 22 | 23 | -------------------------------------------------------------------------------- /run/coverage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | run/tests 4 | 5 | # Calculate coverage 6 | cd build 7 | gcovr --root=$(pwd) --keep 8 | lcov --capture --directory $(pwd) --base-directory $(pwd) --output-file test/coverage.info 9 | lcov --remove test/coverage.info "/usr*" -o test/coverage.info 10 | genhtml test/coverage.info --output-directory test/coverage 11 | -------------------------------------------------------------------------------- /run/examples/make_dcp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/examples/make_dcp "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/examples/make_dcp "$@" 10 | else 11 | build/examples/make_dcp "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/examples/make_kdm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:build/src 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/examples/make_kdm "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/examples/make_kdm "$@" 10 | else 11 | build/examples/make_kdm "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/examples/read_dcp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/examples/read_dcp "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/examples/read_dcp "$@" 10 | else 11 | build/examples/read_dcp "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/test/rewrite_subs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:$LD_LIBRARY_PATH 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/test/rewrite_subs "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/test/rewrite_subs "$@" 10 | else 11 | build/test/rewrite_subs "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/test/subs_in_out: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:$LD_LIBRARY_PATH 4 | # SIP stops this being passed in from the caller's environment 5 | export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib 6 | if [ "$1" == "--debug" ]; then 7 | shift 8 | gdb --args build/test/subs_in_out "$@" 9 | elif [ "$1" == "--valgrind" ]; then 10 | shift 11 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/test/subs_in_out "$@" 12 | else 13 | build/test/subs_in_out "$@" 14 | fi 15 | -------------------------------------------------------------------------------- /run/tests.bat: -------------------------------------------------------------------------------- 1 | set PATH=%PATH%;c:\users\ci\bin_v2.18.x;c:\users\ci\workspace\libdcp\bin;c:\users\ci\workspace\libdcp\lib 2 | xcopy ..\libdcp\tags build\tags\ 3 | xcopy ..\libdcp\ratings build\ 4 | build\test\tests.exe --log_level=test_suite -- c:\users\ci\libdcp-test-private 5 | -------------------------------------------------------------------------------- /run/tools/dcpdecryptmxf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | 6 | export LD_LIBRARY_PATH=$top/build/src:$top/build/asdcplib/src:$LD_LIBRARY_PATH 7 | export LIBDCP_RESOURCES=$top 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpdecryptmxf "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpdecryptmxf "$@" 14 | else 15 | $top/build/tools/dcpdecryptmxf "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcpdiff: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | cd $DIR/../.. 5 | 6 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:$LD_LIBRARY_PATH 7 | export LIBDCP_RESOURCES=. 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args build/tools/dcpdiff "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/tools/dcpdiff "$@" 14 | else 15 | build/tools/dcpdiff "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcpdumpimage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | 6 | export LD_LIBRARY_PATH=$top/build/src:$top/build/asdcplib/src:$LD_LIBRARY_PATH 7 | if [ "$1" == "--debug" ]; then 8 | shift 9 | gdb --args $top/build/tools/dcpdumpimage "$@" 10 | elif [ "$1" == "--valgrind" ]; then 11 | shift 12 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpdumpimage "$@" 13 | else 14 | $top/build/tools/dcpdumpimage "$@" 15 | fi 16 | -------------------------------------------------------------------------------- /run/tools/dcpdumpsub: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | export LIBDCP_RESOURCES=$top 6 | 7 | export LD_LIBRARY_PATH=$top/build/src:$top/build/asdcplib/src:$LD_LIBRARY_PATH 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpdumpsub "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpdumpsub "$@" 14 | else 15 | $top/build/tools/dcpdumpsub "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcpinfo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | 6 | export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:/usr/local/lib64:$LD_LIBRARY_PATH 7 | export LIBDCP_RESOURCES=$top 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpinfo "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpinfo "$@" 14 | else 15 | $top/build/tools/dcpinfo "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcpkdm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | 6 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH 7 | export LIBDCP_RESOURCES=. 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpkdm "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpkdm "$@" 14 | else 15 | $top/build/tools/dcpkdm "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcpmap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | export LIBDCP_RESOURCES=$top 6 | 7 | export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:$LD_LIBRARY_PATH 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpmap "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpmap "$@" 14 | else 15 | $top/build/tools/dcpmap "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /run/tools/dcprecover: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/tools/dcprecover "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/tools/dcprecover "$@" 10 | else 11 | build/tools/dcprecover "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/tools/dcpsignerthumb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export LD_LIBRARY_PATH=build/src:build/asdcplib/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH 4 | if [ "$1" == "--debug" ]; then 5 | shift 6 | gdb --args build/tools/dcpsignerthumb "$@" 7 | elif [ "$1" == "--valgrind" ]; then 8 | shift 9 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/tools/dcpsignerthumb "$@" 10 | else 11 | build/tools/dcpsignerthumb "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /run/tools/dcpverify: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | top=$DIR/../.. 5 | export LIBDCP_RESOURCES=$top 6 | 7 | export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:$LD_LIBRARY_PATH 8 | if [ "$1" == "--debug" ]; then 9 | shift 10 | gdb --args $top/build/tools/dcpverify "$@" 11 | elif [ "$1" == "--valgrind" ]; then 12 | shift 13 | valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpverify "$@" 14 | else 15 | $top/build/tools/dcpverify "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /schema/check_kdm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | xmllint --path . --nonet --noout --schema SMPTE-430-1-2006-Amd-1-2009-KDM.xsd $1 3 | -------------------------------------------------------------------------------- /scripts/check-boilerplate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import glob 4 | import os 5 | import sys 6 | 7 | for file in glob.glob('src/*.h'): 8 | for line in open(file).readlines(): 9 | if line.find('@file') != -1: 10 | filename = line.strip().split()[2] 11 | if filename != file: 12 | print(f'AWOOGA: {file} {filename}') 13 | sys.exit(1) 14 | elif line.find('ifndef') != -1: 15 | guard = line.strip().split()[1] 16 | if not guard.startswith('LIBDCP'): 17 | print(f'AWOOGA: {file} {guard}') 18 | sys.exit(1) 19 | correct_guard = 'LIBDCP_' + os.path.basename(file).upper().replace('.', '_') 20 | if guard != correct_guard: 21 | print(f'AWOOGA: {file} {guard} {correct_guard}') 22 | sys.exit(1) 23 | 24 | -------------------------------------------------------------------------------- /scripts/plotdiff: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import matplotlib.pylab as plt 5 | import numpy 6 | 7 | mean = None 8 | deviation = None 9 | 10 | with open(sys.argv[1], 'r') as f: 11 | for l in f: 12 | l = l.strip() 13 | s = l.split() 14 | 15 | if l.find("out of range") != -1: 16 | continue 17 | 18 | if l.startswith('Compared'): 19 | N = int(s[3]) 20 | if mean is None: 21 | mean = numpy.zeros(int(s[5])) 22 | deviation = numpy.zeros(int(s[5])) 23 | elif l.startswith('mean'): 24 | print s 25 | mean[N] = float(s[2]) 26 | deviation[N] = float(s[4]) 27 | 28 | plt.plot(mean) 29 | plt.plot(deviation) 30 | plt.show() 31 | -------------------------------------------------------------------------------- /scripts/remake-test-certificates: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DCT=$HOME/src/digital_cinema_tools 4 | PRIVATE=$HOME/src/libdcp-test-private 5 | 6 | mkdir work 7 | cd work 8 | 9 | $DCT/make-dc-certificate-chain.rb 10 | CINEMACERTSTORE=. $DCT/cinemaslides --kdm \ 11 | --cpl $PRIVATE/TONEPLATES-SMPTE-ENCRYPTED_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV/cpl_eece17de-77e8-4a55-9347-b6bab5724b9f_.xml \ 12 | --target leaf.signed.pem \ 13 | --keysdir $DCT/encryption/content_keys \ 14 | --formulation modified-transitional-1 \ 15 | --start 8 16 | 17 | mv kdm_*.xml ../../test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml 18 | mv dc-certificate-chain ../../test/data/certificate_chain 19 | mv leaf.key ../../test/data/private.key 20 | 21 | cd .. 22 | rm -rf work 23 | 24 | -------------------------------------------------------------------------------- /scripts/update-language-subtags: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import urllib.request 5 | import json 6 | 7 | block = {} 8 | lists = {} 9 | 10 | with urllib.request.urlopen('https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry') as f: 11 | #with open('language-subtag-registry', 'r') as f: 12 | for l in f.readlines(): 13 | if l.strip() == "%%": 14 | if 'Type' in block: 15 | if block['Type'] in ['language', 'variant', 'region', 'script', 'extlang']: 16 | if not block['Type'] in lists: 17 | lists[block['Type']] = [] 18 | lists[block['Type']].append((block['Subtag'], block['Description'])) 19 | elif block['Type'] == 'redundant' or block['Type'] == 'grandfathered': 20 | # We'll ignore these (for now) 21 | pass 22 | else: 23 | print("Unknown type `%s'" % block['Type']) 24 | block = {} 25 | else: 26 | p = l.strip().split(':') 27 | if len(p) > 1: 28 | key = p[0] 29 | value = p[1][1:] 30 | if key == 'Description' and key in block: 31 | block[key] = '/'.join([block[key], value]) 32 | else: 33 | block[key] = value 34 | 35 | for k, v in lists.items(): 36 | with open(os.path.join('tags', k), 'w') as f: 37 | for e in v: 38 | print(e[0], file=f) 39 | print(e[1], file=f) 40 | 41 | 42 | with urllib.request.urlopen('https://registry.isdcf.com/languages') as f, open(os.path.join('tags', 'dcnc'), 'w') as g: 43 | js = json.loads(f.read()) 44 | for d in js['data']: 45 | if 'dcncTag' in d: 46 | print(d['rfc5646Tag'], file=g) 47 | print(d['dcncTag'], file=g) 48 | -------------------------------------------------------------------------------- /scripts/update-ratings: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys 4 | import urllib.request 5 | 6 | import bs4 7 | 8 | # Output is 9 | # URI (for DCP metadata) 10 | # Name/ID of rating system 11 | # Country[/Region] 12 | # Country code 13 | # Rating label 14 | 15 | 16 | with urllib.request.urlopen('https://www.movielabs.com/md/ratings/v2.4.8/CMR_Ratings_v2.4.8.xml') as f, open('ratings', 'w') as g: 17 | #with open('CMR_Ratings_v2.4.8.xml') as f, open('ratings', 'w') as g: 18 | soup = bs4.BeautifulSoup(f.read(), 'xml') 19 | for system in soup.find_all('mdcr:RatingSystem'): 20 | print(system.URI.get_text(), file=g) 21 | print(system.RatingSystemID.System.get_text(), file=g) 22 | if system.AdoptiveRegion.SubRegion: 23 | print(system.Region.RegionName.get_text().title() + "/" + system.AdoptiveRegion.SubRegion.get_text(), file=g) 24 | else: 25 | print(system.Region.RegionName.get_text().title(), file=g) 26 | print(system.Region.country.get_text(), file=g) 27 | for rating in system("Rating"): 28 | print(rating['ratingID'], file=g) 29 | 30 | -------------------------------------------------------------------------------- /src/atmos_asset_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/atmos_asset_reader.h 36 | * @brief AtmosAssetReader typedef 37 | */ 38 | 39 | 40 | #include "asset_reader.h" 41 | #include "atmos_frame.h" 42 | 43 | 44 | namespace dcp { 45 | 46 | 47 | typedef AssetReader AtmosAssetReader; 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/atmos_frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/atmos_frame.h 36 | * @brief AtmosFrame typedef 37 | */ 38 | 39 | 40 | #ifndef LIBDCP_ATMOS_FRAME_H 41 | #define LIBDCP_ATMOS_FRAME_H 42 | 43 | 44 | #include "frame.h" 45 | 46 | 47 | namespace dcp { 48 | 49 | 50 | typedef Frame AtmosFrame; 51 | 52 | 53 | } 54 | 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/behaviour.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2024 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #ifndef LIBDCP_BEHAVIOUR_H 36 | #define LIBDCP_BEHAVIOUR_H 37 | 38 | 39 | namespace dcp { 40 | 41 | 42 | enum class Behaviour { 43 | OVERWRITE_EXISTING, 44 | MAKE_NEW 45 | }; 46 | 47 | 48 | } 49 | 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/bitstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2020-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/bitstream.h 36 | * @brief Bitstream class 37 | */ 38 | 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | 46 | namespace dcp { 47 | 48 | 49 | class Bitstream 50 | { 51 | public: 52 | void start_crc (uint16_t poly); 53 | void write_bit (bool bit); 54 | void write_from_byte (uint8_t byte, int bits = 8); 55 | void write_from_word (uint32_t word, int bits = 32); 56 | void write_crc (); 57 | 58 | std::vector get() const { 59 | return _data; 60 | } 61 | 62 | private: 63 | std::vector _data; 64 | boost::optional> _crc; 65 | }; 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/chromaticity.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** file src/chromaticity.cc 36 | * brief Chromaticity class 37 | */ 38 | 39 | 40 | #include "chromaticity.h" 41 | 42 | 43 | using namespace dcp; 44 | 45 | 46 | Chromaticity 47 | Chromaticity::D65 () 48 | { 49 | return Chromaticity (0.3127, 0.329); 50 | } 51 | -------------------------------------------------------------------------------- /src/dcp_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/dcp_assert.h 36 | * @brief DCP_ASSERT macro 37 | */ 38 | 39 | 40 | #include "exceptions.h" 41 | 42 | 43 | #define DCP_ASSERT(x) if (!(x)) throw dcp::ProgrammingError (__FILE__, __LINE__); 44 | -------------------------------------------------------------------------------- /src/decrypted_kdm_key.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2013-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/decrypted_kdm_key.cc 36 | * @brief DecryptedKDMKey class 37 | */ 38 | 39 | 40 | #include "decrypted_kdm_key.h" 41 | 42 | 43 | using namespace dcp; 44 | 45 | 46 | bool 47 | dcp::operator== (dcp::DecryptedKDMKey const & a, dcp::DecryptedKDMKey const & b) 48 | { 49 | return a.type() == b.type() 50 | && a.id() == b.id() 51 | && a.key() == b.key() 52 | && a.cpl_id() == b.cpl_id() 53 | && a.standard() == b.standard(); 54 | } 55 | -------------------------------------------------------------------------------- /src/font_asset.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/font_asset.cc 36 | * @brief FontAsset class 37 | */ 38 | 39 | 40 | #include "font_asset.h" 41 | 42 | 43 | using std::string; 44 | using namespace dcp; 45 | 46 | 47 | FontAsset::FontAsset (string id, boost::filesystem::path file) 48 | : Asset (id, file) 49 | { 50 | 51 | } 52 | 53 | 54 | string 55 | FontAsset::static_pkl_type (Standard) 56 | { 57 | return "application/ttf"; 58 | } 59 | -------------------------------------------------------------------------------- /src/font_asset.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/font_asset.h 36 | * @brief FontAsset class 37 | */ 38 | 39 | 40 | #include "asset.h" 41 | 42 | 43 | namespace dcp { 44 | 45 | 46 | /** @class FontAsset 47 | * @brief A (truetype) font asset for subtitles in an Interop DCP. 48 | */ 49 | class FontAsset : public Asset 50 | { 51 | public: 52 | FontAsset (std::string id, boost::filesystem::path file); 53 | 54 | static std::string static_pkl_type (Standard standard); 55 | 56 | private: 57 | std::string pkl_type (Standard standard) const override { 58 | return static_pkl_type (standard); 59 | } 60 | }; 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/h_align.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #ifndef LIBDCP_H_ALIGN_H 36 | #define LIBDCP_H_ALIGN_H 37 | 38 | 39 | #include 40 | 41 | 42 | namespace dcp { 43 | 44 | 45 | enum class HAlign 46 | { 47 | LEFT, ///< horizontal position is distance from left of screen to left of subtitle 48 | CENTER, ///< horizontal position is distance from centre of screen to centre of subtitle 49 | RIGHT, ///< horizontal position is distance from right of screen to right of subtitle 50 | }; 51 | 52 | 53 | extern std::string halign_to_string(HAlign a); 54 | extern HAlign string_to_halign(std::string s); 55 | 56 | 57 | } 58 | 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /src/identity_transfer_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/identity_transfer_function.h 36 | * @brief IdentityTransferFunction class 37 | */ 38 | 39 | 40 | #include "transfer_function.h" 41 | 42 | 43 | namespace dcp { 44 | 45 | 46 | class IdentityTransferFunction : public TransferFunction 47 | { 48 | public: 49 | bool about_equal (std::shared_ptr other, double epsilon) const override; 50 | 51 | protected: 52 | std::vector make_double_lut(double from, double to, int bit_depth, bool inverse) const override; 53 | }; 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/load_font_node.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/load_font_node.h 36 | * @brief LoadFontNode class 37 | */ 38 | 39 | 40 | #include 41 | 42 | 43 | namespace dcp { 44 | 45 | 46 | /** @class LoadFontNode 47 | * @brief Parser for LoadFont nodes from subtitle XML 48 | */ 49 | class LoadFontNode 50 | { 51 | public: 52 | LoadFontNode () {} 53 | explicit LoadFontNode (std::string id_) 54 | : id (id_) 55 | {} 56 | 57 | virtual ~LoadFontNode () {} 58 | 59 | std::string id; 60 | }; 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/mono_j2k_picture_asset_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/mono_j2k_picture_asset_reader.h 36 | * @brief MonoJ2KPictureAssetReader typedef 37 | */ 38 | 39 | 40 | #ifndef LIBDCP_MONO_J2K_PICTURE_ASSET_READER_H 41 | #define LIBDCP_MONO_J2K_PICTURE_ASSET_READER_H 42 | 43 | 44 | #include "asset_reader.h" 45 | #include "mono_j2k_picture_frame.h" 46 | 47 | 48 | namespace dcp { 49 | 50 | 51 | typedef AssetReader MonoJ2KPictureAssetReader; 52 | 53 | 54 | } 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/mono_mpeg2_picture_asset_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/mono_mpeg2_picture_asset_reader.h 36 | * @brief MonoJ2KPictureAssetReader typedef 37 | */ 38 | 39 | 40 | #ifndef LIBDCP_MONO_MPEG2_PICTURE_ASSET_READER_H 41 | #define LIBDCP_MONO_MPEG2_PICTURE_ASSET_READER_H 42 | 43 | 44 | #include "asset_reader.h" 45 | #include "mono_mpeg2_picture_frame.h" 46 | 47 | 48 | namespace dcp { 49 | 50 | 51 | typedef AssetReader MonoMPEG2PictureAssetReader; 52 | 53 | 54 | } 55 | 56 | 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /src/mpeg2_picture_asset_writer.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2024 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "mpeg2_picture_asset.h" 36 | #include "mpeg2_picture_asset_writer.h" 37 | 38 | 39 | using namespace dcp; 40 | 41 | 42 | MPEG2PictureAssetWriter::MPEG2PictureAssetWriter(MPEG2PictureAsset* asset, boost::filesystem::path file, bool overwrite) 43 | : AssetWriter(asset, file) 44 | , _picture_asset(asset) 45 | , _overwrite(overwrite) 46 | { 47 | asset->set_file(file); 48 | } 49 | -------------------------------------------------------------------------------- /src/object.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/object.cc 36 | * @brief Object class 37 | */ 38 | 39 | 40 | #include "object.h" 41 | #include "dcp_assert.h" 42 | #include "util.h" 43 | 44 | 45 | using std::string; 46 | using namespace dcp; 47 | 48 | 49 | Object::Object () 50 | : _id (make_uuid()) 51 | { 52 | 53 | } 54 | 55 | 56 | Object::Object (string id) 57 | : _id (id) 58 | { 59 | DCP_ASSERT (_id.substr(0, 9) != "urn:uuid:"); 60 | } 61 | -------------------------------------------------------------------------------- /src/picture_asset.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "picture_asset.h" 36 | 37 | 38 | using namespace dcp; 39 | 40 | 41 | PictureAsset::PictureAsset(boost::filesystem::path file) 42 | : Asset(file) 43 | { 44 | 45 | } 46 | 47 | 48 | PictureAsset::PictureAsset(Fraction edit_rate, Standard standard) 49 | : MXF(standard) 50 | , _edit_rate(edit_rate) 51 | { 52 | 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/profile.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2025 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | namespace dcp { 36 | 37 | 38 | enum class Profile 39 | { 40 | SMPTE_A, 41 | SMPTE_BV20, 42 | SMPTE_BV21 43 | }; 44 | 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/ref.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/ref.cc 36 | * @brief Ref class 37 | */ 38 | 39 | 40 | #include "ref.h" 41 | 42 | 43 | using std::shared_ptr; 44 | using std::vector; 45 | using namespace dcp; 46 | 47 | 48 | void 49 | Ref::resolve (vector> assets) 50 | { 51 | auto i = assets.begin(); 52 | while (i != assets.end() && !ids_equal ((*i)->id(), _id)) { 53 | ++i; 54 | } 55 | 56 | if (i != assets.end ()) { 57 | _asset = *i; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/ruby.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "ruby.h" 36 | #include "types.h" 37 | 38 | 39 | using namespace dcp; 40 | 41 | 42 | bool dcp::operator==(Ruby const& a, Ruby const& b) 43 | { 44 | return a.base == b.base && 45 | a.annotation == b.annotation && 46 | fabs(a.size - b.size) < SIZE_EPSILON && 47 | a. position == b.position && 48 | fabs(a.offset - b.offset) < OFFSET_EPSILON && 49 | fabs(a.spacing - b.spacing) < SPACING_EPSILON && 50 | fabs(a.aspect_adjust - b.aspect_adjust) < ASPECT_ADJUST_EPSILON; 51 | } 52 | 53 | 54 | bool dcp::operator!=(Ruby const& a, Ruby const& b) 55 | { 56 | return !(a == b); 57 | } 58 | -------------------------------------------------------------------------------- /src/ruby.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include 36 | 37 | 38 | namespace dcp { 39 | 40 | 41 | enum class RubyPosition 42 | { 43 | BEFORE, 44 | AFTER 45 | }; 46 | 47 | 48 | class Ruby 49 | { 50 | public: 51 | Ruby(std::string base_, std::string annotation_) 52 | : base(base_) 53 | , annotation(annotation_) 54 | {} 55 | 56 | std::string base; 57 | std::string annotation; 58 | float size = 0.5; 59 | RubyPosition position = RubyPosition::BEFORE; 60 | float offset = 0; 61 | float spacing = 0; 62 | float aspect_adjust = 1; 63 | }; 64 | 65 | 66 | bool operator==(Ruby const& a, Ruby const& b); 67 | bool operator!=(Ruby const& a, Ruby const& b); 68 | 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/s_gamut3_transfer_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/s_gamut3_transfer_function.h 36 | * @brief SGamut3TransferFunction class. 37 | */ 38 | 39 | 40 | #include "transfer_function.h" 41 | 42 | 43 | namespace dcp { 44 | 45 | 46 | class SGamut3TransferFunction : public TransferFunction 47 | { 48 | public: 49 | bool about_equal (std::shared_ptr other, double epsilon) const override; 50 | 51 | protected: 52 | std::vector make_double_lut(double from, double to, int bit_depth, bool inverse) const override; 53 | }; 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/search.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2022 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | 40 | namespace dcp { 41 | 42 | 43 | class CPL; 44 | 45 | 46 | extern std::vector> find_and_resolve_cpls (std::vector const& directories, bool tolerant); 47 | extern std::vector find_potential_dcps(boost::filesystem::path directory); 48 | 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/sound_asset_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/sound_asset_reader.h 36 | * @brief SoundAssetReader typedef 37 | */ 38 | 39 | 40 | #include "asset_reader.h" 41 | #include "sound_frame.h" 42 | 43 | 44 | namespace dcp { 45 | 46 | 47 | typedef AssetReader SoundAssetReader; 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/stereo_j2k_picture_asset_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/stereo_j2k_picture_asset_reader.h 36 | * @brief StereoJ2KPictureAssetReader typedef 37 | */ 38 | 39 | 40 | #ifndef LIBDCP_STEREO_J2K_PICTURE_ASSET_READER_H 41 | #define LIBDCP_STEREO_J2K_PICTURE_ASSET_READER_H 42 | 43 | 44 | #include "asset_reader.h" 45 | #include "stereo_j2k_picture_frame.h" 46 | 47 | 48 | namespace dcp { 49 | 50 | 51 | typedef AssetReader StereoJ2KPictureAssetReader; 52 | 53 | 54 | } 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/subtitle_standard.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "subtitle_standard.h" 36 | 37 | 38 | using namespace dcp; 39 | 40 | 41 | bool 42 | dcp::uses_baseline(SubtitleStandard standard) 43 | { 44 | return standard == SubtitleStandard::INTEROP || standard == SubtitleStandard::SMPTE_2014; 45 | } 46 | 47 | 48 | bool 49 | dcp::uses_bounding_box(SubtitleStandard standard) 50 | { 51 | /* I didn't check the 2007 version but I am assuming they didn't start out using Interop-style 52 | * then change their mind to bounding-box and then change it back again. 53 | */ 54 | return standard == SubtitleStandard::SMPTE_2007 || standard == SubtitleStandard::SMPTE_2010; 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/subtitle_standard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #ifndef LIBDCP_SUBTITLE_STANDARD_H 36 | #define LIBDCP_SUBTITLE_STANDARD_H 37 | 38 | 39 | namespace dcp { 40 | 41 | 42 | enum class SubtitleStandard { 43 | INTEROP, 44 | SMPTE_2007, 45 | SMPTE_2010, 46 | SMPTE_2014 47 | }; 48 | 49 | 50 | bool uses_baseline(SubtitleStandard standard); 51 | bool uses_bounding_box(SubtitleStandard standard); 52 | 53 | 54 | } 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/text_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2024 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #ifndef LIBDCP_TEXT_TYPE_H 36 | #define LIBDCP_TEXT_TYPE_H 37 | 38 | 39 | namespace dcp { 40 | 41 | 42 | enum class TextType 43 | { 44 | OPEN_SUBTITLE, 45 | OPEN_CAPTION, 46 | CLOSED_SUBTITLE, 47 | CLOSED_CAPTION 48 | }; 49 | 50 | 51 | } 52 | 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /src/utc_offset.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "dcp_assert.h" 36 | #include "utc_offset.h" 37 | 38 | 39 | using namespace dcp; 40 | 41 | 42 | void 43 | UTCOffset::set_hour(int hour) 44 | { 45 | DCP_ASSERT(hour >= -11 && hour <= 12); 46 | _hour = hour; 47 | } 48 | 49 | 50 | void 51 | UTCOffset::set_minute(int minute) 52 | { 53 | DCP_ASSERT(minute >= -59 && minute <= 59); 54 | _minute = minute; 55 | } 56 | 57 | 58 | bool 59 | dcp::operator==(UTCOffset const& a, UTCOffset const& b) 60 | { 61 | return a.hour() == b.hour() && a.minute() == b.minute(); 62 | } 63 | 64 | 65 | bool 66 | dcp::operator!=(UTCOffset const& a, UTCOffset const& b) 67 | { 68 | return a.hour() != b.hour() || a.minute() != b.minute(); 69 | } 70 | -------------------------------------------------------------------------------- /src/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | /** @file src/version.h 36 | * @brief Versioning variables that are written by the build system 37 | */ 38 | 39 | 40 | namespace dcp { 41 | 42 | 43 | extern char const * version; 44 | extern char const * git_commit; 45 | extern bool const built_with_debug; 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /tags/dcnc: -------------------------------------------------------------------------------- 1 | hy 2 | HY 3 | sq 4 | SQ 5 | ar 6 | AR 7 | bs 8 | BS 9 | bg 10 | BG 11 | ca 12 | CA 13 | yue 14 | YUE 15 | cmn 16 | CMN 17 | cmn-Hans 18 | QMS 19 | cmn-Hant 20 | QMT 21 | nan 22 | NAN 23 | cmn-TW 24 | QTM 25 | hr 26 | HR 27 | cs 28 | CS 29 | da 30 | DA 31 | nl 32 | NL 33 | en 34 | EN 35 | et 36 | ET 37 | eu 38 | EU 39 | fi 40 | FI 41 | nl-BE 42 | VLS 43 | fr 44 | FR 45 | gl 46 | GL 47 | fr-CA 48 | QFC 49 | de 50 | DE 51 | gsw 52 | GSW 53 | el 54 | EL 55 | he 56 | HE 57 | hi 58 | HI 59 | hu 60 | HU 61 | is 62 | IS 63 | id 64 | IND 65 | it 66 | IT 67 | ja 68 | JA 69 | kk 70 | KK 71 | km 72 | KM 73 | ko 74 | KO 75 | ky 76 | KG 77 | lv 78 | LV 79 | lt 80 | LT 81 | ms 82 | MSA 83 | mr 84 | MR 85 | mn 86 | MN 87 | no 88 | NO 89 | pl 90 | PL 91 | pt-BR 92 | QBP 93 | pt 94 | PT 95 | ro 96 | RO 97 | ru 98 | RU 99 | sr 100 | SR 101 | sk 102 | SK 103 | sl 104 | SL 105 | es-AR 106 | QSA 107 | es 108 | ES 109 | es-419 110 | LAS 111 | es-MX 112 | QSM 113 | sv 114 | SV 115 | ta 116 | TA 117 | te 118 | TE 119 | th 120 | TH 121 | tr 122 | TR 123 | uk 124 | UK 125 | ur 126 | UR 127 | vi 128 | VI 129 | cy 130 | WEL 131 | -------------------------------------------------------------------------------- /test/atmos_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "atmos_asset.h" 36 | #include "test.h" 37 | #include 38 | #include 39 | 40 | 41 | /** Check basic read of an Atmos asset */ 42 | BOOST_AUTO_TEST_CASE (atmos_read_test) 43 | { 44 | dcp::AtmosAsset a (private_test / "20160218_NameOfFilm_FTR_OV_EN_A_dcs_r01.mxf"); 45 | BOOST_CHECK_EQUAL (a.first_frame(), 192); 46 | BOOST_CHECK_EQUAL (a.max_channel_count(), 10); 47 | BOOST_CHECK_EQUAL (a.max_object_count(), 118); 48 | } 49 | -------------------------------------------------------------------------------- /test/data/1s_24-bit_48k_silence.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/1s_24-bit_48k_silence.wav -------------------------------------------------------------------------------- /test/data/2007.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/2007.mxf -------------------------------------------------------------------------------- /test/data/2010.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/2010.mxf -------------------------------------------------------------------------------- /test/data/2014.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/2014.mxf -------------------------------------------------------------------------------- /test/data/32x32_red_square.j2c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/data/822bd341-c751-45b1-94d2-410e4ffcff1b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/822bd341-c751-45b1-94d2-410e4ffcff1b.png -------------------------------------------------------------------------------- /test/data/DCP/ASSETMAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:76aef948-ca63-4d4a-b707-27727c55d370 4 | Created by libdcp 5 | OpenDCP 0.0.25 6 | 1 7 | 2012-07-17T04:45:18+00:00 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:d76fdaaf-8316-42dc-a87e-1719ad6ca3ca 12 | true 13 | 14 | 15 | pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml 16 | 1 17 | 0 18 | 1380 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 2024 30 | 31 | 32 | 33 | 34 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 40144 41 | 42 | 43 | 44 | 45 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 161326 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/data/DCP/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/data/DCP/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/DCP/audio.mxf -------------------------------------------------------------------------------- /test/data/DCP/cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 4 | A Test DCP 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | A Test DCP 9 | feature 10 | 11 | urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 12 | 81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 13 | 14 | 15 | 16 | 17 | urn:uuid:8577c7c0-be29-4eb5-a449-1e3870a42bbd 18 | 19 | 20 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | o3VmpdFsNUgF11oadcaGJ/IfO0M= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 31 | 24 1 32 | 24 33 | 0 34 | 24 35 | l+XLgxe2fMZDgY+0QYzDfGhvTQM= 36 | 37 | 38 | urn:uuid:b68febcc-5ddf-489a-84a7-924f29fa2afd 39 | 24 1 40 | 1489 41 | 0 42 | 1489 43 | jo8pQSebhScPN4EVvvpIUWRrDeM= 44 | urn:smpte:ul:060e2b34.04010105.0e090604.00000000 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /test/data/DCP/pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d76fdaaf-8316-42dc-a87e-1719ad6ca3ca 4 | Created by libdcp 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | 9 | 10 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 11 | 6affb8ee-0020-4dff-a53c-17652f6358ab 12 | eqEIVxSAbJL+SROmqrDHbr9sb+A= 13 | 2024 14 | text/xml 15 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 16 | 17 | 18 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 19 | 5407b210-4441-4e97-8b16-8bdc7c12da54 20 | o3VmpdFsNUgF11oadcaGJ/IfO0M= 21 | 40144 22 | application/mxf 23 | video.mxf 24 | 25 | 26 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 27 | 97f0f352-5b77-48ee-a558-9df37717f4fa 28 | l+XLgxe2fMZDgY+0QYzDfGhvTQM= 29 | 161326 30 | application/mxf 31 | audio.mxf 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/data/DCP/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/DCP/video.mxf -------------------------------------------------------------------------------- /test/data/bad_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEZDCCA0ygAwIBAgIBBTANBgkqhkiG9w0BAQsFADB9MRYwFAYDVQQKDA1kY3Bv 3 | bWF0aWMuY29tMRYwFAYDVQQLDA1kY3BvbWF0aWMuY29tMSQwIgYDVQQDDBsuZGNw 4 | b21hdGljLnNtcHRlLTQzMC0yLlJPT1QxJTAjBgNVBC4THEhDMnl3T1JNWFIwUWJa 5 | SHNUZjhkSjh1alpFVT0wHhcNMTgwMzA3MjM1NDE3WhcNMjgwMzA0MjM1NDE3WjB9 6 | MRYwFAYDVQQKDA1kY3BvbWF0aWMuY29tMRYwFAYDVQQLDA1kY3BvbWF0aWMuY29t 7 | MSQwIgYDVQQDDBsuZGNwb21hdGljLnNtcHRlLTQzMC0yLlJPT1QxJTAjBgNVBC4T 8 | HEhDMnl3T1JNWFIwUWJaSHNUZjhkSjh1alpFVT0wggEiMA0GCSqGSIb3DQEBAQUA 9 | A4IBDwAwggEKAoIBAQCSc753UrXKDb2yN/VDvAjw8uRwDImeRXDcwn7Qrr/nqjCI 10 | 1LsYYbGkyztctv5l+gje3LHhPIRq3Xlblops3CbrCRu40CRI7WIjmPR0s4YtEo/F 11 | m1hugD7nHIVom1dlr4ooTCSawoDics70BbCPc40Daggq2neQERprReePSdjMaGFX 12 | xjSc7EUPWHM6gjQ2QSDduTN5XPDSlNovBIgjKX6v05AZ1XWIaFPGzEGZlC9zlUi5 13 | vqxvJrJ9SoR/zGv8NEG+2U0qp3tQd1ltziMFG0Tm7PcNPVRDUmji9wWYjDwjzZd4 14 | 32lEimzDFN4dXXNzmMyHpmHmh4jMnlS6IegHjxBFAgMBAAGjge4wgeswEgYDVR0T 15 | AQH/BAgwBgEB/wIBAzALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFBwtssDkTF0dEG2R 16 | 7E3/HSfLo2RFMIGoBgNVHSMEgaAwgZ2AFBwtssDkTF0dEG2R7E3/HSfLo2RFoYGB 17 | pH8wfTEWMBQGA1UECgwNZGNwb21hdGljLmNvbTEWMBQGA1UECwwNZGNwb21hdGlj 18 | LmNvbTEkMCIGA1UEAwwbLmRjcG9tYXRpYy5zbXB0ZS00MzAtMi5ST09UMSUwIwYD 19 | VQQuExxIQzJ5d09STVhSMFFiWkhzVGY4ZEo4dWpaRVU9ggEFMA0GCSqGSIb3DQEB 20 | CwUAA4IBAQA2qsgESICdM9yW78xK1EsZvNvbtjdm6ZVU/Z0zwTQgAXARe16N+IR6 21 | OwrvwXMLf/AJJQwT0AB8kUOvaDvUu6txXhZfz7qztntIvAfy/JzfaBXTg8CmTtmv 22 | P7OrUUXMqeq5fItESIFbCFK1rUmMX8p0t2wvEo9cUWiXs3ydGbMDDQVUVacvMWxf 23 | YN1PKFqvFv71t0k/Bkv5smRBe4ibOuzacUwJmOKpBVTc/khQEpDv0y64YnxFnGkW 24 | ac2OeRBg2hmRKFUKSQQeQFpWbu7fp/0Rl8RSgYnJC9oFPb8VWaFcJ91Lkcbjel3f 25 | yuuJ6es/KnE6slOIt4L7igIt6XlRQW4x 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /test/data/base64_test: -------------------------------------------------------------------------------- 1 | EXpqcbsbZiXsHV/hD9RGlk6xk9hJ3or98MWVwDojHhmkgAhq5294msu3TjfdCz9LAcUCJMB88QNC 2 | 3lQdM+vHzY7gmQi6Ymnww9Gvfm/xbFVLmJd7dJHmBavb6+OnfZ38OK9wamVgH7Me+qqvRZj3eoqT 3 | 2pW6QVQmtvVkMXzNDW6FHtVu5UwsWwt6RTFRp+8v/M/6LD8koNw0PIyAIfENEKQkoENbBiomHtDC 4 | vzlegK9k23n00sRgGCwK7BEIU+s4C/x1ySxaIneqb4F50oMtxJtRN50UNLVMDao7POpTFI/ryxSJ 5 | UbwNSlxaKFHQQ3OAKpD+7Vzj73DV/kJLbwgHWw== 6 | 7 | -------------------------------------------------------------------------------- /test/data/broken_smpte.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/broken_smpte.mxf -------------------------------------------------------------------------------- /test/data/cpl_content_kind_test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | feature 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/data/cpl_content_kind_test2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | clip 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/data/cpl_content_kind_test3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | tangoadvert 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/data/dummy.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/dummy.mxf -------------------------------------------------------------------------------- /test/data/dummy.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/dummy.ttf -------------------------------------------------------------------------------- /test/data/empty_but_with_children.xml: -------------------------------------------------------------------------------- 1 | 2 | 04a77cb2-3d44-4fea-8817-ce9feb5ad79bDCP1UnknownThis is wrong. 3 | -------------------------------------------------------------------------------- /test/data/empty_text.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/empty_text.mxf -------------------------------------------------------------------------------- /test/data/empty_with_empty_children.xml: -------------------------------------------------------------------------------- 1 | 2 | 04a77cb2-3d44-4fea-8817-ce9feb5ad79bDCP1Unknown 3 | -------------------------------------------------------------------------------- /test/data/extra_assetmap/1cab4236-9ad1-5b2f-bbac-1234567890ab.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/extra_assetmap/1cab4236-9ad1-5b2f-bbac-1234567890ab.mxf -------------------------------------------------------------------------------- /test/data/extra_assetmap/VOLINDEX: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/data/extra_assetmap/j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/extra_assetmap/j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf -------------------------------------------------------------------------------- /test/data/extra_assetmap/pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/extra_assetmap/pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf -------------------------------------------------------------------------------- /test/data/failing-private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA00J/nd2IUrU3B5c2E6FOs+zRP2BfhiSWpVNQR2ufGkPdu9qO 3 | Kf3NPtiiTr5eaXiGAEmWKbhkKb/NNh+HD+msQreOGujCcY/T+t56vN0ynXrrPOS6 4 | 9wApNtuuOq5Q4dj6cTsVq877LxhNDwiNT2u5DxYPcbb4tsyxN8DyB7Wd9ulRL/AS 5 | MFlyj8BGKfxzlEL02X9qVrWU1x0GfU/JPFbat9nt7chLH4nAuKdWq2AE9QFllWia 6 | J07HC6M/B5XnVSMd8r/kDdACd8H+UHCUcebdk3XOzvaL5VM65fX84QH8z1LZiBtW 7 | gqGVWQkIGistPfkBTeo2cVk/PQ7kgcoGUxBykQIDAQABAoIBAQDEONfgAYxFhhv+ 8 | 6OxJf2JirGwOua0AI6vpE2FVdRjqhG7HtVCmoB6raPwYt6lpvZB5Y+AeEC64uHYa 9 | 912z4g8mSOetBtTUNgtm0I6gLbR9oVYt0SX3liax1YoW5yIpJCg6U+7lDfMw4xlw 10 | BTl7s0rIQG1H6fNJlwZkCsrDbmWyl4PKcb6Kqfw4iafQmCRAJx9gvYW0QXigaxU5 11 | xSJRiA5Y4Ts0ZhH+RwKzNVap4IhWtKoIZS2Vvz+H1/iPavs9axdcyhfXg+9mOkT1 12 | 4x3LQlNAmcYzUBByJN1d+yzoCVb3s8aP5vcWvR3t9TlnutBhKFGvJo0Jbfx1z5fx 13 | b45+rjihAoGBAOv3thZeyqfLjl3tG00EhkDDxVvlDYtCfuyhNT7w/tCWlyoS1Wsh 14 | iar0/yp/7wXMkasEaq0E/G2Srez39F9wd2GSuymmtMBzzXL8SXWIpfYlizgo/Zun 15 | fRNNMDxYsY4Gaq4/QU7YCOzmAs1iZPyk10s8RYkUuS49ZGbgC1fy1bUDAoGBAOUx 16 | z4/4R71mIlyr5/XGoWt7HDy7LD1AFlscBJ7bTFTzePuL8kawrm0P5Rg4zTTkJqZs 17 | /ukVng+PRD+gY0cPEdwrZH6CTxMjxps1TPSGrM7KFK6//J+ez5iYordVhMEB2vRC 18 | tIVN2tEcx9JdqCUb1k1esBlCZ1E1tyaFsAMzZTPbAoGBAJ+RbYMHKwf5MRb3JkUY 19 | 0CivuqB/7n7Dws0F3tnnYolvrF15SvUdQtlmv77fsKU9Ryxc2j6SZpk6XX8n1gtM 20 | JI7JCOQLpaOXK9GcJZjjhUdE8DZUEdvWkVAiHIJSgA9I649VmzZUBQUeLbrx1NS8 21 | LBLmeSdP6kIIpgKjc0hQIJA9AoGAQAejaiA9wo73CJbKDeK5E/Ln15ue51mxJTD1 22 | pX+0moMOiI/3VoJjqHppUVQFGEKo/ZOzv2BXsRcgRPpE4gQ2xCCnSaST/M/g21mP 23 | rzy0qGzSTGO8aseOTZ5OzxMoLFedWOIN1rQCbqsws/eQUxWs0B6k6dmgTZLJIQz2 24 | OF6yZkMCgYArWYrcsefBFznwckK3S+EXZeYApyREmWywHtuC6NKmWfksRtDce8B6 25 | Hs6T7xClvbd99h4CNf4nywRBRAO85HfSTkjamLB42xoGrWizeN3XGou6NA5im9IO 26 | dRSNHaS084mEm9/HaxfvWHTLsUaArjDG/26ji236Dr6m3+ghDIUJMQ== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /test/data/flat_red.j2c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/flat_red.j2c -------------------------------------------------------------------------------- /test/data/flat_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/flat_red.png -------------------------------------------------------------------------------- /test/data/good_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEZDCCA0ygAwIBAgIBBTANBgkqhkiG9w0BAQsFADB9MRYwFAYDVQQKEw1kY3Bv 3 | bWF0aWMuY29tMRYwFAYDVQQLEw1kY3BvbWF0aWMuY29tMSQwIgYDVQQDExsuZGNw 4 | b21hdGljLnNtcHRlLTQzMC0yLlJPT1QxJTAjBgNVBC4THFRnOE5meCt3WGowYTcr 5 | MVkvVEprNjdDTnFFZz0wHhcNMTgwMjI4MDAxNTIxWhcNMjgwMjI2MDAxNTIxWjB9 6 | MRYwFAYDVQQKEw1kY3BvbWF0aWMuY29tMRYwFAYDVQQLEw1kY3BvbWF0aWMuY29t 7 | MSQwIgYDVQQDExsuZGNwb21hdGljLnNtcHRlLTQzMC0yLlJPT1QxJTAjBgNVBC4T 8 | HFRnOE5meCt3WGowYTcrMVkvVEprNjdDTnFFZz0wggEiMA0GCSqGSIb3DQEBAQUA 9 | A4IBDwAwggEKAoIBAQDp9DFAfri2RM5a4j349GRyL+PBEGd3zmEug8FSrYGhssOJ 10 | OWBkAYcKYFW73COqwsVqsWK8uhzMjt0qQ6nDF15WMvrIYBtwFRu/s2nD90txq+9u 11 | XCghrTETVFxJCOLkI46OKAguN+KOVQIao+9UsVOxNCs4DMoi/foWOR2vbqvXhZre 12 | 1LiSv4aVEYrT/uZ4L+kM90rRUGOrF3Sf9D8IpjDH9OiQRHXrop7PoK7tHYGHax49 13 | CtW6sbmFjGNcHAtu3fALDUPBeRM09BDklMzr9i68DTNvi797HxKdalSOAi42rG9p 14 | t0eKoFykrPyAVY8xpI6udehdT49ryXLqC9Vj7t9hAgMBAAGjge4wgeswEgYDVR0T 15 | AQH/BAgwBgEB/wIBAzALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFE4PDX8fsF49Gu/t 16 | WP0yZOuwjahIMIGoBgNVHSMEgaAwgZ2AFE4PDX8fsF49Gu/tWP0yZOuwjahIoYGB 17 | pH8wfTEWMBQGA1UEChMNZGNwb21hdGljLmNvbTEWMBQGA1UECxMNZGNwb21hdGlj 18 | LmNvbTEkMCIGA1UEAxMbLmRjcG9tYXRpYy5zbXB0ZS00MzAtMi5ST09UMSUwIwYD 19 | VQQuExxUZzhOZngrd1hqMGE3KzFZL1RKazY3Q05xRWc9ggEFMA0GCSqGSIb3DQEB 20 | CwUAA4IBAQAfB1XkuCfhxsPnALZT+7pR33jrq4O5dHVVcSWNF/MpGUqWCM/EFFUr 21 | nOIiML23fYAFheFfgZdWIFCWNmZV9YeTmovwZW5QeDihC8ibOubrNW+H/tCsCzkU 22 | MOoKerSxmRrJqLcItg2N05bEuwQM9ayFPUDMhR6ePpoi7YsjAuXPQIeuQsq4d2YL 23 | qeNvCtJCC07wjy0RD6H9iU+m0SGHIrnmjffvfTBTgmdgkfW0e1S6Jl6yDFPdDhJM 24 | MtlfR7Hv779sBcpv/kHtu1aRA/fLfpBOnKlh0stLUWr566+S4qgddHNqJ20RvTZw 25 | ACpSoPSRvbXHWJCffFV4Ui0ZPHVxFRSZ 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /test/data/private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCqI7toh6iOLbQw 3 | RkxJ4sPEFI6VWpVrNoV/wRFF6gusHz396ZroneKVEqN/uFBcvtep5QiUCO2Gsjlj 4 | 0/2qPD9nGRjDKyuoJOIc3Q/8oyzhPsz1DAJaAjwupOx+WkfKgRKCOeUOOYSz9FWs 5 | LwgMvn/xW28u6QkBCjXMxcbJCnsryeOOZJDbHy3Uya+oOGKKm6HrDAGayAw8HSeR 6 | Ev7E0cw290ZacaWCtxvaA/y8ynCgPNCdwSYxNt4Vos0eNkbGIZVHyD4sDmQnjAUi 7 | BZDnV3ikYnLfRT2QF8djq3BRChAHoWgt8Jc5ui1qLk6cbGfMYmTyObeH4hwrxz63 8 | ndC60MNrAgMBAAECggEABQbh6PhmdNpJgkpMGLwYIqP6Ln7VqVbxYiaXLGSk4aSu 9 | qouLZdIRuWvVOYHS8K/mzqs+B08C4uxDIShIog3+UD0qlnb2ZupoD92W36pb5MUm 10 | kxrpZYq+snYcUq4M2aEvUHpbbSx/4j1BhsErpgy+2lJkROjiY43PVx8vfLh649Pv 11 | 1LPiy0UVfAL3h/6Ew/vVAh6b1q001cVc+W60e9cnC0w5ga3+ifisnp/QyeetImyW 12 | YJ3MNyNxGDaupM3viuw00hnJOL3TeY+fz5FUpmUh5df/rm0XLQp3JgIOCoH2m8SM 13 | CgtAQnjRY10ryPFXbH0e5Zo7IIaqpzHiNMvIP2kg4QKBgQC9r1NlGS3Lsl2+9sz8 14 | 9AB8SSzIHEap8lYP+r1V9cBTfsJOZQRaP1VIx9Hel0cBecf4p3CdH+YPvi/Fqjr9 15 | QZhEepGYnUpRhjWn++kYLVAGVK7BJtZi1a9M6PJAtrfLEm4RodLkw/c2dVKBdcuu 16 | SSu5n2YY/aWS67DV9CQpvWBSkQKBgQDlnx2TsnJRulubVeFnG7/QXTfanmfjXvLu 17 | UjOPh2pJdie6wj1zG0tyeahYiBRfqyR8qszguvwS08FFe5K1VJ81Qvmn6Wkg8hqO 18 | b/P8qcCLQgKNqNGI36Z1kbNoBo47j/8NlAKZKBnM2JSFb0gj9oQBHpZatHt84pbR 19 | pbrTTGf8OwKBgGshWIJi5CCFjrjJ/yBmVtfbJDWo8qgNPFouDT09XPBLSUapevnV 20 | hz9hy8BhxDKrKyvetZWobHE7wxNqf4KFx4/1gcGmJFFC8Y78kbub6/SHY2OnobGU 21 | ajuP3TJ7f/ZrZEsFEG0v2LGjNYP0maLHpLBjvHAk4ZzHDMrp5nrEgGBhAoGAIetU 22 | QiodCwedWp/gEQwfVJdAlfHKZOL0vdG0viIByGJE0ii5TRSeG4XvIUzQvaUZWbUd 23 | WKEmdV2EclAjxtd+QS7olC49kllRJPNStmMZBzk0CVsDwNVQ0JM6TkaRoijOQ2I2 24 | 1AsBbKodnmxm2rEipMuw6Cs7BqKuJr/1jhr+TVsCgYAc4wEWVKqwgMjxYG8+QmXq 25 | MjGEppuD9Vl17mcTUvn+T/P9YDJoBx0vOLFF+75f2hhME98ptNEWm1bLUVsqlZvm 26 | tHOpwVGS/Od/3ASTqm+xP4N2PkmFLdNrOqg/WnKUNQCgafvDEv92kGij+G3YnEwM 27 | nwnztJBcAqG76564Qjb7SA== 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /test/data/private2.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCM3WNanE8/1eIg 3 | MQ5tiN8cJZmwIlVyw0dGnTxvvN705zI/fD9IxfCECavCGxpuH/23YC93K147k7UD 4 | tbj+jSlAhEqksWzC/ebrHyTAtL4iH1N4LeoKuLFv1YYOe2dtqNeJfMNegma0FyXN 5 | uoBShnju2FP5OX8nDFEQ2OnOatJ4TnA7+vUr2DVeEoD8yZxg36kGuJce/sJNGqqN 6 | J+2FIHq97gzHF5TrhIfxZN0lymUWkYJ5CHYJAMEGl+j/1D6JhV+vBX7sYmqR6+Fd 7 | OaHC8PEmrJjwJID8Dx8QgRjpaoJHvoC8tPknvtkoFbBLjVj6tPgmeqnoeZnpYgVj 8 | A5KSojchAgMBAAECggEACMu9K7gFcc688TYm+Lt6dQM7CsbGD6W2cmgYkUCZqnCy 9 | UEkFmZl0iIYjEbqIBrbcLKJmrFoKpw002R+0hr6RRBxOneSPTki07dsSvC69DZvn 10 | piI10kgQmlNarNZTUcNgfA8Mkv7xA09LtsItx5lqfT2IVtBainloKXVl+hPtAwKJ 11 | IyV0fN8yn3hpj34nZpulgbuKD4WwT5KQKpYKCEnwLW0L5hgFnl/NXeHkSYs9eHxh 12 | itMFmF2MHyzrEtb4g2n1fYTdRhimSWUSDgnJbMgwuZngzNscPD8EguBUl6xFpkbv 13 | egU9dTjD4ZQG+jLKeXHjDDmVQKkw5W2Uy7HglVEvrQKBgQDA4jDaa1ACSbGUvKMg 14 | nWvMG4WauA9Ugb3akXKXqlYfQXf98nK1o6iOieqhMJsoreljwe47yf+OmC0M0Ciw 15 | XdYYCw5ytksM4G1HGPeA64rz0uLfAS4IJAi+9SuLNoRFD+ZFJ1NhvzdoRoKDdCCE 16 | UfsMsJV6suYURVlMMsy0auEW7QKBgQC69ZklIbwDTn36kQYB2rCNTnmEPcnLpS3h 17 | KVi+QgMFTm+wJDTJnHEQfe9cseMGUFzMnJL71i5ZN/FzvxB0K2+qQ26/lMLHvaO7 18 | xl8oPAe7H5vYwnF4Nixk5iefbwB+NkqCTqmMnpyMLnqqNTKEOho2JZxGeyC50lvx 19 | HOeTHw7GhQKBgQDAbWhbn4/UmHynbII5+ZMfr51cu5/fqQglU9HE6VS+Hex91zEF 20 | cV6pxYHkib9hmA8tTL5Fu8JPGhZnoAvX1+XNWspxOtgo4oVi1s+lOFgJ5CweWuj3 21 | iiuHhsSIQD05QSFzgEY5UDEQwLdYObRvDfKtuEWIgY30TzNFR7DdlXs2CQKBgB8i 22 | e2iFn6vlTHGH6Tox0ykVIoN1Tr/NOEDBA/hbQemGUG9C+E+C8AlRD6WeMjKA+5NP 23 | l+K8nmdZO6qM7Q6LlUMDi9P30CA3YqcIuBwZMyhkcS294+ujCe2bromMkMZ0ACCH 24 | PREf8O4fZ2olBc6jZm4SAV5zbtXDRHB44c/MYkeJAoGBAI6VhJ3q7MGNUVkWKr4E 25 | eQG2mJtvB3XOzUvnKevJO3uuihBasj+e4w0GBehbkAjMVle43xWLUSryGGTeVayR 26 | sffPm36lxlgKiEfS/Q9f5g/FmuNZIjzrKD2EfFgk8oi45v0ghh8k+1JSHiDM+AJg 27 | /GXnb0eXvbHrgbKUxDi8dCYX 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /test/data/private_key_from_windows.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCl3O93blmhfKib 3 | M2y/fhA/bsDn4vLe/hJJLheagVK0E0DluXQSZAjzQNvIGIhl4pWpXh0pUtBirG8y 4 | H6Uq4fpameXO4wBIVP91z8a7N8T8Vx63wQb+xMfZe7YjQi5BzX4LnVBw49yQOXba 5 | oYQGxaUByMaaaZxYs2p/gA6+CWkJLxatzJxXg4m9oN+96Hk2Up9gJrq0W93VR2fo 6 | B3SDs2erRLGxZ35Xs+t2aw58HWrS68gQ4Rc+pqT8K5b5OPpMRoiOdYg87jV8R3z7 7 | LDkBkXn88UX4r4O3XTRNbZ8vug9BYVP2KkYQTviLMVRfjzk99MRFzR3ApUX3r6dV 8 | NNyjr2b/AgMBAAECggEAAuEbfR2UZVosv4j8gQFQvReQnLxS9NRA5mlSh2ADjggf 9 | 7vz+fiU9BiM6ZxzAUJ7gdApXHXUIR6lwde4yGu6SWIlMaBntUtQhUF71HbuBnW0F 10 | WP5H8oGuNuEDAyJIFRdapU8rt57IOohTPy3HnqoTfvAiPOL+QyHv0UFpWbSZg+T4 11 | uBcTAJO0In++iTpDvNfSHuYIfDAGztr5ivyrqMwXaotWiPOUzDXmqk1LHkKF4CWj 12 | Ymrp90F2RjAOIAKYqPHqlvJEx+bBAGZ5DnpvgZcIHRvArK6Il2df640VRIlzteaY 13 | e5X5/viHtpWiE9V5aztSiBaHADgIbS3PFR0Sne0iNQKBgQDQQTRB65JLsc9dAJiT 14 | 9gFsibuksPkRRVksXqAl3UCZIYKAhddj53rXRQdukbtA4Vv3J3ybAsfwFr6ICZa8 15 | ZasRXcUVFQNWIsoLsKap6t/6uoiNbqyxOjHZZq5nmKmsUxEE0VDUaBrc6cBT9nla 16 | DbYe3SY6kXBMbZv5JOkODw48pQKBgQDL47KAcA8N5GxEtYbDF5lHd5WvYQjiR7/h 17 | OWKSTAxgc9o0tIxya9XgAt2Czx/00wBoHAV3CvfEQOkhAzpQXYLASJhjugMbH7v7 18 | 6Vyh06FXFcvMiQTl/Uc6pp3pH2s8qprtjxabdElgHzyxr15cI11S8DXdXlzQlXop 19 | Ppg84iLP0wKBgQC1rTx+iZkd6efB9aQl6EYDvwBww2b1Vy9dEsvZXHRfYqlrn9dw 20 | s18p73F1VzMpfbByJAODY2CzJdRf7yWOA4/CXbByHNvFSCJFIn2y3FE7dYFtCPEk 21 | x2T3iKl7fOYAjJLbRhOiyZMtx8peNTZWhoGr2TfhfkGemzynlDiwaBf+dQKBgBVB 22 | N2qMRAV+uoqvIc1UuHXq0X/m7bYpJKemA9CcfO3RJf44lCuZckJYCh+I2Bv9ox03 23 | TpqKWinrWmJGo92c4fSJnNlImupI9J/eQ/naxgb+DrDT197h+Hr0w6F51QQOBPie 24 | 4gxyovOSThF35q5UQXZT9EmPfL2B16pVDCnMqTRhAoGBAKNdmG/Pcxfd9z6EWTxk 25 | Yltzla2TAhdoK2zTUemAiY5ZTlcuG2oxojmZR45lTnnWH6cM63NGVFWg9its0ScC 26 | hDsUPiSyH7NVNX4b8SHb1yKZ8JFKkmSZeVb8wfvr4iVthUGTbC9f33plWqgrYyv/ 27 | S+yeZq1fcREOJUB+PTWGF1Kk 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /test/data/ruby1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cab5c268-222b-41d2-88ae-6d6999441b17 4 | Movie Title 5 | 1 6 | French 7 | 8 | 9 | 10 | BaseAnnotateHello world 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/data/signer.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAt6QreIDAQheQZVeln9+7z/M2ssr2iCTmcmFEJU2anRhuCUDA 3 | Cp9QFfT+5tcPNi7qO5mz0IoPQ8jzvYSaQysWGGofQiSbPMRP0J3fhP6wK4KCD4ES 4 | T6zLzGQ84DaQOLJoncom4lNZrS56ugVJrm3ekUoWGCZ9YfBHH1A8eWUm5yJiJN0F 5 | AuvhQojS0hBqcWbwfOJDogR2NvBSaL6kzVlTGPcgu+27SQ+AIMJT8V5hqmMixWc+ 6 | etEYzsg7hFM8EQj3KoaPi70yJ8ELfK3yy1tpnOCkg9RtGWXS2eKEGR9AMI2424Z5 7 | 9dcbunZkE0sRzEXp+kBKyc/qIAWVrkEbliBXcwIDAQABAoIBAGHIOJ1hcP3ALlLH 8 | 6JjIOOjxSB7Lk5nKjCo7QF3chIdBitXCdH8zdSE74r5npOHk+TPjE6vm11nwllhD 9 | UyCQwKMfXqWJeF9S6GzcozfdpVCFnVtEDsv95kZe2UtJwmFuHeZmzW2VlBpytUZ3 10 | qlQGjIwwNrOFSx3rIvO5dXnuMli/PyQqEqXE4agQj1ZSHXgc//crzRX/XWKNY+bA 11 | cWAVinjl+TIR6OOLLLu6X9lPU+Ai9TuhzMQCCMocR0w81fG2pflh37buAzfzdvms 12 | MunZL8Le4/S6fuMTMslx12AHL55PIAiLF6uApah48rGfL7sZsDEhoPQk7b1Y7pHW 13 | A6C7AYECgYEA3wYIT59lIhEaMgagyUfb5xX8Zk2TOq6qJwkRwiSdep2D5bL8l9eL 14 | 63bwi5ZMxuPMCnb3bw18J6bV7e7NERjQAz7deL7WxxB68muDXw44cyBHkpgBs2i3 15 | Qg01tTFyUqB7LHlQ9J9ZTXoHrpgmySXfu3DLWlFCjqt0dv7qsNgEhQcCgYEA0sts 16 | 5aHMah3uZdIdrB7nAFVShlcM96yU/+np+re1E+L5Qpr+yox7IKTWZI7WlZ11QDmb 17 | //qLqdGjECIcoS3jkCZKpqPzuZKWoGyUef0ixmQTccq77Xitd1pu07QoS06VydVG 18 | TeMqdZCchYN2NAiTK/4d1H4kpJCSNMpM/JfaizUCgYEAsbIDwzUUBk2sGnnPeDBK 19 | FNger4BVs2bhaZK/VHmKA90m70hqG62A7U5qID3T1JBBzYC2awRKjOlQAHDJcTrc 20 | 2gknuwIK7LbDzw08sesJrSjl/fYhPMpNYVJXHZRVK2J0YZ4Tk6S3KZT2M/VEyfXk 21 | Slt3mvGt3zDa7cj0Q40KJNcCgYA8BLfI2jy9qjAKxby1GUdkjOamYXrLulPiWdPJ 22 | Ey13sBSQplkNitoz/Tsd/p2Sk/aihsSoKcpCW/I10cCdE9fLX1u5/sySde51VvUf 23 | lrekDTKMH9FKWCXr6c/Mb2tZpdJ4WUVfP+MC/l3Slg+92QMub3hG3HPKd29poIAz 24 | G3maUQKBgGgqigBTrmOcZuEPxcC2eei7m4wckv0pCmTbuvZ479jsoWZRkSE8jm9X 25 | V+ZjLRbwCCcdEky7CW/iif5Zc0WW2Z2Y86KPPApESnhkMVyZDt4sjjo9maMAxAI6 26 | ajdpjTszRZvJaeTYDOTZM9bPRFiMHJlAQp0+lt8zrlHUhohl2yT2 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /test/data/sub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/sub.png -------------------------------------------------------------------------------- /test/data/subs.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/data/subs.mxf -------------------------------------------------------------------------------- /test/data/subs1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cab5c268-222b-41d2-88ae-6d6999441b17 4 | Movie Title 5 | 1 6 | French 7 | 8 | 9 | 10 | My jacket was Idi Amin's 11 | 12 | 13 | 14 | My corset was H.M. The Queen's 15 | 16 | My large wonderbra 17 | 18 | 19 | 20 | 21 | Once belonged to the Shah 22 | 23 | 24 | 25 | And these are Roy Hattersley's jeans 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/data/subs3.xml: -------------------------------------------------------------------------------- 1 | 2 | a6c58cff-3e1e-4b38-acec-a42224475ef6Test1EN822bd341-c751-45b1-94d2-410e4ffcff1b.png 3 | -------------------------------------------------------------------------------- /test/data/subs4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cab5c268-222b-41d2-88ae-6d6999441b17 4 | Movie Title 5 | 1 6 | French 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/data/subs5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12345678-9abc-def0-1234-56789abcdef0 4 | Frobozz 5 | 1 6 | English 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/data/text_formatter.txt: -------------------------------------------------------------------------------- 1 | Heading 2 | 3 | Subheading 4 | * Foo 5 | * Bar 6 | * Fred 7 | * Jim 8 | * Sheila 9 | -------------------------------------------------------------------------------- /test/data/text_formatter_windows.txt: -------------------------------------------------------------------------------- 1 | Heading 2 | 3 | Subheading 4 | * Foo 5 | * Bar 6 | * Fred 7 | * Jim 8 | * Sheila 9 | -------------------------------------------------------------------------------- /test/data/verify_incorrect_closed_caption_ordering3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:fc754ec1-eb8d-4029-8023-80d7dadc6313 4 | 5 | 2021-10-24T00:23:49.000+02:00 6 | de-DE 7 | 24 1 8 | 24 9 | 00:00:00:00 10 | urn:uuid:e4f0ff0a-9eba-49e0-92ee-d89a88a575f6 11 | 12 | 13 | 14 | This 15 | is 16 | also not fine 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/data/verify_incorrect_closed_caption_ordering4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:fc754ec1-eb8d-4029-8023-80d7dadc6313 4 | 5 | 2021-10-24T00:23:49.000+02:00 6 | de-DE 7 | 24 1 8 | 24 9 | 00:00:00:00 10 | urn:uuid:e4f0ff0a-9eba-49e0-92ee-d89a88a575f6 11 | 12 | 13 | 14 | This 15 | is 16 | fine, though. 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/exception_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2019 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | #include "exceptions.h" 35 | #include 36 | 37 | using std::string; 38 | 39 | /** Test exception classes */ 40 | BOOST_AUTO_TEST_CASE (exception_test) 41 | { 42 | BOOST_CHECK_EQUAL (string (dcp::FileError ("foo", "bar", 42).what()), "foo (bar) (error 42)"); 43 | BOOST_CHECK_EQUAL (string (dcp::UnresolvedRefError ("foo").what()), "Unresolved reference to asset id foo"); 44 | BOOST_CHECK_EQUAL (string (dcp::NotEncryptedError ("foo").what()), "foo is not encrypted"); 45 | BOOST_CHECK_EQUAL (string (dcp::ProgrammingError ("foo", 42).what()), "Programming error at foo:42"); 46 | } 47 | -------------------------------------------------------------------------------- /test/fraction_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2019 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | #include "types.h" 35 | #include "exceptions.h" 36 | #include 37 | 38 | /** Test dcp::Fraction */ 39 | BOOST_AUTO_TEST_CASE (fraction_test) 40 | { 41 | dcp::Fraction f (42, 26); 42 | dcp::Fraction g (42, 26); 43 | dcp::Fraction h (43, 26); 44 | dcp::Fraction i (42, 27); 45 | 46 | BOOST_CHECK (f == g); 47 | BOOST_CHECK (g != h); 48 | BOOST_CHECK (g != i); 49 | 50 | BOOST_CHECK_THROW (dcp::Fraction ("1 2 3"), dcp::XMLError); 51 | } 52 | -------------------------------------------------------------------------------- /test/h_align_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "exceptions.h" 36 | #include "h_align.h" 37 | #include 38 | 39 | 40 | BOOST_AUTO_TEST_CASE(h_align_test) 41 | { 42 | BOOST_CHECK(dcp::string_to_halign("left") == dcp::HAlign::LEFT); 43 | BOOST_CHECK(dcp::string_to_halign("center") == dcp::HAlign::CENTER); 44 | BOOST_CHECK(dcp::string_to_halign("right") == dcp::HAlign::RIGHT); 45 | BOOST_CHECK(dcp::string_to_halign("Left") == dcp::HAlign::LEFT); 46 | BOOST_CHECK(dcp::string_to_halign("CentER") == dcp::HAlign::CENTER); 47 | BOOST_CHECK(dcp::string_to_halign("RIGHT") == dcp::HAlign::RIGHT); 48 | 49 | BOOST_CHECK_THROW(dcp::string_to_halign("ostrabagalous"), dcp::ReadError); 50 | } 51 | 52 | -------------------------------------------------------------------------------- /test/key_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2019 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | #include "key.h" 35 | #include 36 | #include 37 | 38 | using std::string; 39 | 40 | BOOST_AUTO_TEST_CASE (key_hex_test) 41 | { 42 | dcp::Key key (string("0123456789abcdef915a9157123ba218")); 43 | BOOST_CHECK_EQUAL (key.hex(), "0123456789abcdef915a9157123ba218"); 44 | key = dcp::Key (string("af1a1b061389ddac62be8a19bbc52dff")); 45 | BOOST_CHECK_EQUAL (key.hex(), "af1a1b061389ddac62be8a19bbc52dff"); 46 | key = dcp::Key (string("af1a1b061389ddac62be8a")); 47 | BOOST_CHECK_EQUAL (key.hex(), "af1a1b061389ddac62be8a"); 48 | } 49 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test1/ASSETMAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:017b3de4-6dda-408d-b19b-6711354b0bc3 4 | A Test DCP 5 | OpenDCP 0.0.25 6 | 1 7 | 2012-07-17T04:45:18+00:00 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:d199d58b-5ef8-4d49-b270-07e590ccb280 12 | true 13 | 14 | 15 | pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml 16 | 1 17 | 0 18 | 1373 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 8559 30 | 31 | 32 | 33 | 34 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 31648 41 | 42 | 43 | 44 | 45 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 881326 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test1/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test1/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test1/audio.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test1/pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d199d58b-5ef8-4d49-b270-07e590ccb280 4 | A Test DCP 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | 9 | 10 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 11 | 6affb8ee-0020-4dff-a53c-17652f6358ab 12 | skI+5b/9LA/y6h0mcyxysJYanxI= 13 | 8559 14 | text/xml 15 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 16 | 17 | 18 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 19 | 5407b210-4441-4e97-8b16-8bdc7c12da54 20 | vsVjRV9vhTBPUWfE/TT1o2vdQsI= 21 | 31648 22 | application/mxf 23 | video.mxf 24 | 25 | 26 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 27 | 97f0f352-5b77-48ee-a558-9df37717f4fa 28 | 3M7YTgvFKXXMEGLkIbV4miC90FE= 29 | 881326 30 | application/mxf 31 | audio.mxf 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test1/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test1/video.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/ASSETMAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d76fdaaf-8316-42dc-a87e-1719ad6ca3ca 4 | Created by libdcp 5 | OpenDCP 0.0.25 6 | 1 7 | 2012-07-17T04:45:18+00:00 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:8577c7c0-be29-4eb5-a449-1e3870a42bbd 12 | true 13 | 14 | 15 | pkl_8577c7c0-be29-4eb5-a449-1e3870a42bbd.xml 16 | 1 17 | 0 18 | 1380 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 1686 30 | 31 | 32 | 33 | 34 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 63160 41 | 42 | 43 | 44 | 45 | urn:uuid:fc843acc-1ad9-4808-b9ed-33f5319e047d 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 161326 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test2/audio.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 4 | A Test DCP 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | A Test DCP 9 | feature 10 | 11 | urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 12 | 81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 13 | 14 | 15 | 16 | 17 | urn:uuid:d98861e8-aefc-433d-9e96-1745e7ba039e 18 | 19 | 20 | urn:uuid:fc843acc-1ad9-4808-b9ed-33f5319e047d 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | X+4lOvviLTQeP28hyzhCOGjraiE= 26 | 27 | 28 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 29 | 24 1 30 | 24 31 | 0 32 | 24 33 | dU+tcR6bZ5BQ/TXKtBY03ejjUmc= 34 | 48 1 35 | 1998 1080 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/pkl_8577c7c0-be29-4eb5-a449-1e3870a42bbd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:8577c7c0-be29-4eb5-a449-1e3870a42bbd 4 | Created by libdcp 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | 9 | 10 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 11 | 6affb8ee-0020-4dff-a53c-17652f6358ab 12 | 2jp5+JDLOh5CqzQ8goZTzBEWsPo= 13 | 1686 14 | text/xml 15 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 16 | 17 | 18 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 19 | 5407b210-4441-4e97-8b16-8bdc7c12da54 20 | dU+tcR6bZ5BQ/TXKtBY03ejjUmc= 21 | 63160 22 | application/mxf 23 | video.mxf 24 | 25 | 26 | urn:uuid:fc843acc-1ad9-4808-b9ed-33f5319e047d 27 | fc843acc-1ad9-4808-b9ed-33f5319e047d 28 | X+4lOvviLTQeP28hyzhCOGjraiE= 29 | 161326 30 | application/mxf 31 | audio.mxf 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test2/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test2/video.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test3/ASSETMAP: -------------------------------------------------------------------------------- 1 | 2 | urn:uuid:fe6cc6ff-05f8-435e-9486-7ce432f3855aCreated by DCP-o-matic 2.8.4devel 4ba821a8b012016-05-24T10:56:58+01:00DCP-o-matic 2.8.4devel 4ba821a8b0DCP-o-matic 2.8.4devel 4ba821a8b0urn:uuid:d87a950c-bd6f-41f6-90cc-56ccd673e131truepkl_d87a950c-bd6f-41f6-90cc-56ccd673e131.xml108175urn:uuid:cbfd2bc0-21cf-4a8f-95d8-9cddcbe51296cpl_cbfd2bc0-21cf-4a8f-95d8-9cddcbe51296.xml108542urn:uuid:c6035f97-b07d-4e1c-944d-603fc2ddc242j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf10561776urn:uuid:69cf9eaf-9a99-4776-b022-6902208626c3pcm_69cf9eaf-9a99-4776-b022-6902208626c3.mxf10881174 3 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test3/VOLINDEX: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test3/j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test3/j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test3/pcm_69cf9eaf-9a99-4776-b022-6902208626c3.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test3/pcm_69cf9eaf-9a99-4776-b022-6902208626c3.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/ASSETMAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:76aef948-ca63-4d4a-b707-27727c55d370 4 | Created by libdcp 5 | OpenDCP 0.0.25 6 | 1 7 | 2012-07-17T04:45:18+00:00 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:d76fdaaf-8316-42dc-a87e-1719ad6ca3ca 12 | true 13 | 14 | 15 | pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml 16 | 1 17 | 0 18 | 1380 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 2024 30 | 31 | 32 | 33 | 34 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 40144 41 | 42 | 43 | 44 | 45 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 161326 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test5/audio.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 4 | A Test DCP 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | A Test DCP 9 | feature 10 | 11 | urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 12 | 81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00 13 | 14 | 15 | 16 | 17 | urn:uuid:8577c7c0-be29-4eb5-a449-1e3870a42bbd 18 | 19 | 20 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | w7xIWU3Q+QnEQMq7BcOhsWO+OU0= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 31 | 24 1 32 | 24 33 | 0 34 | 24 35 | 5ANfi1KoyGiZ8hQIhDHm5f/OvQY= 36 | 37 | 38 | urn:uuid:b68febcc-5ddf-489a-84a7-924f29fa2afd 39 | 24 1 40 | 1489 41 | 0 42 | 1489 43 | jo8pQSebhScPN4EVvvpIUWRrDeM= 44 | urn:smpte:ul:060e2b34.04010105.0e090604.00000000 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/pkl_d76fdaaf-8316-42dc-a87e-1719ad6ca3ca.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d76fdaaf-8316-42dc-a87e-1719ad6ca3ca 4 | Created by libdcp 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | 9 | 10 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 11 | 6affb8ee-0020-4dff-a53c-17652f6358ab 12 | 4zHV3/AhGYo5WjNmyuxeRSPOVwk= 13 | 2024 14 | text/xml 15 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 16 | 17 | 18 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 19 | 5407b210-4441-4e97-8b16-8bdc7c12da54 20 | w7xIWU3Q+QnEQMq7BcOhsWO+OU0= 21 | 40144 22 | application/mxf 23 | video.mxf 24 | 25 | 26 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 27 | 97f0f352-5b77-48ee-a558-9df37717f4fa 28 | 5ANfi1KoyGiZ8hQIhDHm5f/OvQY= 29 | 161326 30 | application/mxf 31 | audio.mxf 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test5/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test5/video.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/ASSETMAP: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:017b3de4-6dda-408d-b19b-6711354b0bc3 4 | Created by libdcp 5 | 1 6 | 2012-07-17T04:45:18+00:00 7 | OpenDCP 0.0.25 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:d199d58b-5ef8-4d49-b270-07e590ccb280 12 | true 13 | 14 | 15 | pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml 16 | 1 17 | 0 18 | 1447 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 1965 30 | 31 | 32 | 33 | 34 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 31648 41 | 42 | 43 | 44 | 45 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 881326 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/VOLINDEX: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test7/audio.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 4 | A Test DCP 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | A Test DCP 9 | trailer 10 | 11 | urn:uuid:75ac29aa-42ac-1234-ecae-49251abefd11 12 | content-version-label-text 13 | 14 | 15 | 16 | 17 | urn:uuid:d1102bfd-65c2-465c-ab33-200ace46fcf5 18 | 19 | 20 | urn:uuid:3b198cbc-c1d2-4410-805c-397b6fea0297 21 | 24 1 22 | 24 23 | 24 | 25 | 26 | 1 27 | 28 | 29 | 30 | 23 31 | 32 | 33 | 34 | 35 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 36 | 24 1 37 | 24 38 | 0 39 | 24 40 | vsVjRV9vhTBPUWfE/TT1o2vdQsI= 41 | 24 1 42 | 1.85 43 | 44 | 45 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 46 | 24 1 47 | 24 48 | 0 49 | 24 50 | 3M7YTgvFKXXMEGLkIbV4miC90FE= 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/pkl_d199d58b-5ef8-4d49-b270-07e590ccb280.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d199d58b-5ef8-4d49-b270-07e590ccb280 4 | Created by libdcp 5 | 2012-07-17T04:45:18+00:00 6 | OpenDCP 0.0.25 7 | OpenDCP 0.0.25 8 | 9 | 10 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 11 | 6affb8ee-0020-4dff-a53c-17652f6358ab 12 | SgCEvehTaji0MCWOJTVioOcNndY= 13 | 1965 14 | text/xml;asdcpKind=CPL 15 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 16 | 17 | 18 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 19 | 5407b210-4441-4e97-8b16-8bdc7c12da54 20 | vsVjRV9vhTBPUWfE/TT1o2vdQsI= 21 | 31648 22 | application/x-smpte-mxf;asdcpKind=Picture 23 | video.mxf 24 | 25 | 26 | urn:uuid:97f0f352-5b77-48ee-a558-9df37717f4fa 27 | 97f0f352-5b77-48ee-a558-9df37717f4fa 28 | 3M7YTgvFKXXMEGLkIbV4miC90FE= 29 | 881326 30 | application/x-smpte-mxf;asdcpKind=Sound 31 | audio.mxf 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test7/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test7/video.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test8/ASSETMAP: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:5a89bd07-3af3-4f48-bdb4-b8fe6d22d8f8 4 | Short_FTR-1_F_MOS_2K_20200308_IOP_OV 5 | 1 6 | 2020-03-08T22:39:14+01:00 7 | DCP-o-matic 2.15.47devel caf67bef26 8 | DCP-o-matic 2.15.47devel caf67bef26 9 | 10 | 11 | urn:uuid:0382c908-7389-45d6-b671-d5100868cbbe 12 | true 13 | 14 | 15 | pkl_0382c908-7389-45d6-b671-d5100868cbbe.xml 16 | 1 17 | 0 18 | 8738 19 | 20 | 21 | 22 | 23 | urn:uuid:d74fda30-d5f4-4c5f-870f-ebc089d97eb7 24 | 25 | 26 | cpl_d74fda30-d5f4-4c5f-870f-ebc089d97eb7.xml 27 | 1 28 | 0 29 | 9079 30 | 31 | 32 | 33 | 34 | urn:uuid:d7576dcb-a361-4139-96b8-267f5f8d7f91 35 | 36 | 37 | j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf 38 | 1 39 | 0 40 | 47739 41 | 42 | 43 | 44 | 45 | urn:uuid:a2a87f5d-b749-4a7e-8d0c-9d48a4abf626 46 | 47 | 48 | pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf 49 | 1 50 | 0 51 | 845154 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test8/VOLINDEX: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test8/j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test8/j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf -------------------------------------------------------------------------------- /test/ref/DCP/dcp_test8/pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/dcp_test8/pcm_a2a87f5d-b749-4a7e-8d0c-9d48a4abf626.mxf -------------------------------------------------------------------------------- /test/ref/DCP/encryption_test/ASSETMAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:d060dec0-cb61-4ca0-8d12-39346c7ec9c5 4 | Created by libdcp 5 | OpenDCP 0.0.25 6 | 1 7 | 2012-07-17T04:45:18+00:00 8 | OpenDCP 0.0.25 9 | 10 | 11 | urn:uuid:5203f3d4-9d62-4062-8bf1-7a114eff99df 12 | true 13 | 14 | 15 | pkl_5203f3d4-9d62-4062-8bf1-7a114eff99df.xml 16 | 1 17 | 0 18 | 8902 19 | 20 | 21 | 22 | 23 | urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358ab 24 | 25 | 26 | cpl_6affb8ee-0020-4dff-a53c-17652f6358ab.xml 27 | 1 28 | 0 29 | 9226 30 | 31 | 32 | 33 | 34 | urn:uuid:9a7fbb03-4078-4944-90b1-0d8a21c9d793 35 | 36 | 37 | video.mxf 38 | 1 39 | 0 40 | 44008 41 | 42 | 43 | 44 | 45 | urn:uuid:ce300880-a425-40a6-adac-eb1e3f5643fc 46 | 47 | 48 | audio.mxf 49 | 1 50 | 0 51 | 165454 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/DCP/encryption_test/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/encryption_test/audio.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/encryption_test/audio.mxf -------------------------------------------------------------------------------- /test/ref/DCP/encryption_test/video.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/encryption_test/video.mxf -------------------------------------------------------------------------------- /test/ref/DCP/subtitle_namespace_test/VOLINDEX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/DCP/subtitle_namespace_test/j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/subtitle_namespace_test/j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf -------------------------------------------------------------------------------- /test/ref/DCP/subtitle_namespace_test/pcm_9611db6b-7566-4d83-a485-7d23948bf219.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/subtitle_namespace_test/pcm_9611db6b-7566-4d83-a485-7d23948bf219.mxf -------------------------------------------------------------------------------- /test/ref/DCP/subtitle_namespace_test/sub_315de731-1173-484c-9a35-bdacf5a9d99d.mxf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/DCP/subtitle_namespace_test/sub_315de731-1173-484c-9a35-bdacf5a9d99d.mxf -------------------------------------------------------------------------------- /test/ref/base64_test_decoded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/base64_test_decoded -------------------------------------------------------------------------------- /test/ref/cpl_content_kind_test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | feature 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/ref/cpl_content_kind_test2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | clip 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/ref/cpl_content_kind_test3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 4 | 5 | 2020-08-28T13:35:06+02:00 6 | libdcp1.6.4devel 7 | libdcp1.6.4devel 8 | 9 | tangoadvert 10 | 11 | some-id 12 | version 1 13 | 14 | 15 | 16 | 17 | urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516 18 | 19 | 20 | urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0 21 | 24 1 22 | 24 23 | 0 24 | 24 25 | JtPL3uT3jyKMLysaqgdBWQb/n2E= 26 | 24 1 27 | 1998 1080 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/ref/crypt/ca.cnf: -------------------------------------------------------------------------------- 1 | [ req ] 2 | distinguished_name = req_distinguished_name 3 | x509_extensions = v3_ca 4 | [ v3_ca ] 5 | basicConstraints = critical,CA:true,pathlen:3 6 | keyUsage = keyCertSign,cRLSign 7 | subjectKeyIdentifier = hash 8 | authorityKeyIdentifier = keyid:always,issuer:always 9 | [ req_distinguished_name ] 10 | O = Unique organization name 11 | OU = Organization unit 12 | CN = Entity and dnQualifier 13 | -------------------------------------------------------------------------------- /test/ref/crypt/ca.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEA0HTS4tFNKfZJH7MwMppFuH1U6huCmajZTuN3hOPiLY069Kgx 3 | L8sqveLadsNf+2moPOzc29/Oom6hc5XRLd7vMcvQl2p1MhYNr0cwCfloJ4JivAHc 4 | x6nT82E7SHTDY9BkJBfs3tFSzNUHwBlL7Ec3KmCQAw/aJr7Dp2Yrm/dns2y+bMC2 5 | i6WatdIthxmKg2cSpXLJZmlVz4Ie2nJiPW95XnaS4zrb0TTyOrX8vI4Y7wmWPNfl 6 | eYmasik3s6y06qoDQZRY8yHQk9QUZWzpUueYjpaESvKvRU16lejNY6jek+BZSs6K 7 | 42FjRCqdVefAxwaLAAdBV7PknNdFlk7qi/UN1QIDAQABAoIBAH4bXoTG9/Z9vwkF 8 | XxAN0kXk1Fz4HY8V3bji1Sg4sFi8SsE9itwN/aJ4PY+BbGxtI9EPviDqCVisstF4 9 | /d3RM0UdtugTCCkvvEGgQEiYcFEOiOqR+d10OPvQg4u2z4lvxVUsgCjf20Z9Tb4B 10 | z7N19cKWPikMCv5Lg5OetJ0bE8ov1IcXBnMn82/uM/8eRuCJjs6MJmJBBjfNDW2I 11 | I5jScUNGbRJgSZtFXypUfWfBS6nMnfvznTzAIUyx6r0vTwK3RvnMYbA2hLZUwRp8 12 | VhgiThEuderU0z4ltHAnLXZEP0ljKzHqtBs8r15KcSOhBxf+nutLQY6KHAyh/Ctx 13 | SCAJrbUCgYEA69iqvLyicguqwM5gVmqZu+jKEtf+JqYfGDPMB2RyYycmXPJNRIK2 14 | DuKbeInnVFKZV2F0x6AJvetN4W0Jv3LbDlQUTr+LBYbCetaAk9rGSQuCBwrvH+Ax 15 | Fk2IZAFqMvTIalTSNVUydNucc0LX9Yu2p4JjspCCU3B/CnWCkcD4kvMCgYEA4kT6 16 | T4R4aEk8rNMNopITCIQxaGrypg/KItT5mpqnFEfiSo8+mbfKMWreqxfYDtO4qXiU 17 | HGhHxTDIPayV5s3VPCQs8sCbs3H+rZYYE4BuZIu1qU+EzyAk6ulnQIi1/5IwguwO 18 | NPycq5XTkvsIwEfO5D8t6z5QbyI4Sh/7Uv4TPhcCgYEA6aXG0CAY1t8UFNrfufz1 19 | vKFMwApXcLaWi4WVFaW/ZNd+PAqX3c2Yy3pYB7ym/nSuEVEtPi8gN5SLnU5Gn/IL 20 | blCBpdpAwgLVXJhw3QmZ8veBo7SDXZLfTncVLe3w5fZ3LlBFyCxVRkvi3JVWGZ6G 21 | H8EfP+HGGx+R3Cy6Y+dG210CgYBJ60Li62Hyn8pko2ZW7+Wr6JPDivzOZ2Yfzvfk 22 | HBXtODajKPzIdxRk5Ibt2hJJdb1kD/JC/YZE01T3YQRvrFq3FRJiE65KBzmuN9SR 23 | umlWC5ZDQ6kdiWDGJY4HtSHP5lBW1QsnIEeGfqHp6HzJZCwgwMsdiPP5+nHtNVmD 24 | mWFr7QKBgF9JEieU2P1DOVlqhTndEUm26y2TzRFf9M7PPNHoGMd/VRfI7nP7kXJa 25 | YcjF6xISxbSYtQlaxQW2CX8sf24r02Qo1aSKdBiJBN/xHyB57gOeUEvF86SKffEk 26 | FBtvXV3MEtAqpwBqb/KxegdsoYu4dN/dg6Ck2Ms2sqHpXXAd8a+5 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /test/ref/crypt/ca.key.public: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0HTS4tFNKfZJH7MwMppF 3 | uH1U6huCmajZTuN3hOPiLY069KgxL8sqveLadsNf+2moPOzc29/Oom6hc5XRLd7v 4 | McvQl2p1MhYNr0cwCfloJ4JivAHcx6nT82E7SHTDY9BkJBfs3tFSzNUHwBlL7Ec3 5 | KmCQAw/aJr7Dp2Yrm/dns2y+bMC2i6WatdIthxmKg2cSpXLJZmlVz4Ie2nJiPW95 6 | XnaS4zrb0TTyOrX8vI4Y7wmWPNfleYmasik3s6y06qoDQZRY8yHQk9QUZWzpUueY 7 | jpaESvKvRU16lejNY6jek+BZSs6K42FjRCqdVefAxwaLAAdBV7PknNdFlk7qi/UN 8 | 1QIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /test/ref/crypt/ca.self-signed.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEdzCCA1+gAwIBAgIBBTANBgkqhkiG9w0BAQsFADCBgjEUMBIGA1UEChMLZXhh 3 | bXBsZS5vcmcxFDASBgNVBAsTC2V4YW1wbGUub3JnMS0wKwYDVQQDFCQuc21wdGUt 4 | NDMwLTIuUk9PVC5OT1RfRk9SX1BST0RVQ1RJT04xJTAjBgNVBC4THERDblJkSEZi 5 | Y3Y0QU5WVXEyK3dNVkFMRlNlYz0wHhcNMTUwNjA1MTMyMDA4WhcNMjUwNjAyMTMy 6 | MDA4WjCBgjEUMBIGA1UEChMLZXhhbXBsZS5vcmcxFDASBgNVBAsTC2V4YW1wbGUu 7 | b3JnMS0wKwYDVQQDFCQuc21wdGUtNDMwLTIuUk9PVC5OT1RfRk9SX1BST0RVQ1RJ 8 | T04xJTAjBgNVBC4THERDblJkSEZiY3Y0QU5WVXEyK3dNVkFMRlNlYz0wggEiMA0G 9 | CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQdNLi0U0p9kkfszAymkW4fVTqG4KZ 10 | qNlO43eE4+ItjTr0qDEvyyq94tp2w1/7aag87Nzb386ibqFzldEt3u8xy9CXanUy 11 | Fg2vRzAJ+WgngmK8AdzHqdPzYTtIdMNj0GQkF+ze0VLM1QfAGUvsRzcqYJADD9om 12 | vsOnZiub92ezbL5swLaLpZq10i2HGYqDZxKlcslmaVXPgh7acmI9b3ledpLjOtvR 13 | NPI6tfy8jhjvCZY81+V5iZqyKTezrLTqqgNBlFjzIdCT1BRlbOlS55iOloRK8q9F 14 | TXqV6M1jqN6T4FlKzorjYWNEKp1V58DHBosAB0FXs+Sc10WWTuqL9Q3VAgMBAAGj 15 | gfUwgfIwEgYDVR0TAQH/BAgwBgEB/wIBAzALBgNVHQ8EBAMCAQYwHQYDVR0OBBYE 16 | FAwp0XRxW3L+ADVVKtvsDFQCxUnnMIGvBgNVHSMEgacwgaSAFAwp0XRxW3L+ADVV 17 | KtvsDFQCxUnnoYGIpIGFMIGCMRQwEgYDVQQKEwtleGFtcGxlLm9yZzEUMBIGA1UE 18 | CxMLZXhhbXBsZS5vcmcxLTArBgNVBAMUJC5zbXB0ZS00MzAtMi5ST09ULk5PVF9G 19 | T1JfUFJPRFVDVElPTjElMCMGA1UELhMcRENuUmRIRmJjdjRBTlZVcTIrd01WQUxG 20 | U2VjPYIBBTANBgkqhkiG9w0BAQsFAAOCAQEAEOGcZTz1XGfZunxCnclrNDDsgLhy 21 | RvqxG7Li7enVyKF5798ckA17jCnkY/W9YwtjpgfEpjw9aGdCy6cviNu51jT5F9qg 22 | y0O2OXhtX47aS9G6r1m50cBmrciBxrqSTr6/co6jcRImRhTpvVcLcbv3emCLogBw 23 | 9v93abXvbT+GZ6yc2OOArTZCFlrLW8XTDSDrPp/hida2NjZOrxJj6iFEh6+M+S7Z 24 | T/bwFNfuPDsDhtccoVt/hIM0imFnjKlwbo3HbJ3v+Lhy2oUS66d5ELHuuQnMuKFT 25 | pxf6/gl42q4gFbwBDp6jxy5L1J4LZGZIwsoTv6dFjo1MNttqmfMTheiwpQ== 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /test/ref/crypt/intermediate.cnf: -------------------------------------------------------------------------------- 1 | [ default ] 2 | distinguished_name = req_distinguished_name 3 | x509_extensions = v3_ca 4 | [ v3_ca ] 5 | basicConstraints = critical,CA:true,pathlen:2 6 | keyUsage = keyCertSign,cRLSign 7 | subjectKeyIdentifier = hash 8 | authorityKeyIdentifier = keyid:always,issuer:always 9 | [ req_distinguished_name ] 10 | O = Unique organization name 11 | OU = Organization unit 12 | CN = Entity and dnQualifier 13 | -------------------------------------------------------------------------------- /test/ref/crypt/intermediate.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIC0DCCAbgCAQAwgYoxFDASBgNVBAoTC2V4YW1wbGUub3JnMRQwEgYDVQQLEwtl 3 | eGFtcGxlLm9yZzE1MDMGA1UEAxQsLnNtcHRlLTQzMC0yLklOVEVSTUVESUFURS5O 4 | T1RfRk9SX1BST0RVQ1RJT04xJTAjBgNVBC4THDZlYXQ4cjMzVVM3MWF2dVFFb2pt 5 | SCtiams4ND0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDI7++fB6z0 6 | 3k4QE12hVCQslJRmy8REyUNpal8eWvVy/xQzbDDddSGfYYVH4/yldmjQ2Cdp7GiJ 7 | wHmdNJDYBjjjwKhdCmop6zuL5WEAddJ8HJn7yPwbaluBhVwQ2KSF78he7LOHuGae 8 | doflFZH02A8H9dFu7z/Bq9cCmiLxbLhmwd+Q9z31/uJWnBdnDTBUhy4/qIi7oObz 9 | qaKP0E0vqIAZdphnLUi2hARPcfxztdA8u1l61KaJDxnB4Sc8DpWwJ1bel+JADVQE 10 | 3+X38tFEBLkToLElJvoSvx6plF0xOhsux4u7JLXSOl9xJwXc7Htb8TUE6ysumzF7 11 | MHIDpJJZ5OQBAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEACK39E+yttPBciOpv 12 | i8eVe8GvwMWguZAXFyll6Whd0NaborJWInZ/bqqYlXH0pAm2m7aK/JhFyYTL2HH/ 13 | YEHwyGkeLdpGbX5XNENotCM4pFXsvamn/GpZGSM72TFAHk1HeFuTaRTcPossfDJP 14 | neLCBk9sGHcAGplZhlH1qLRgdrUM8VE/nUIEnnOb5az04LmY23BY1fkWbid8dcAw 15 | 1VHnj4upHlGdzu3YWXye0hMOV9flH11gdVIJeMsegTg3rB4ql9UFG03UniD6BaZd 16 | sRmq8wKgePb5as1EAu2AKQEckLXP2z4601OV2j8FUMhX55up2iWjJgGwFB7D7ZTu 17 | jDOKtA== 18 | -----END CERTIFICATE REQUEST----- 19 | -------------------------------------------------------------------------------- /test/ref/crypt/intermediate.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAyO/vnwes9N5OEBNdoVQkLJSUZsvERMlDaWpfHlr1cv8UM2ww 3 | 3XUhn2GFR+P8pXZo0NgnaexoicB5nTSQ2AY448CoXQpqKes7i+VhAHXSfByZ+8j8 4 | G2pbgYVcENikhe/IXuyzh7hmnnaH5RWR9NgPB/XRbu8/wavXApoi8Wy4ZsHfkPc9 5 | 9f7iVpwXZw0wVIcuP6iIu6Dm86mij9BNL6iAGXaYZy1ItoQET3H8c7XQPLtZetSm 6 | iQ8ZweEnPA6VsCdW3pfiQA1UBN/l9/LRRAS5E6CxJSb6Er8eqZRdMTobLseLuyS1 7 | 0jpfcScF3Ox7W/E1BOsrLpsxezByA6SSWeTkAQIDAQABAoIBAANgLIliaqBuf6c7 8 | fA4yyKzLDjcv4ys4ql5CADkVVBxLdr5qaeO+jQMNc1zC0sLA23/usbLQ2uy9hA2F 9 | DY3jhN8mpG1zuFbd8dEm2FtWn2OgY2HcfYfEYKcrY2GREiqB3b7igR2dlnPBEAVk 10 | OGCBpLcAhTU05cBOL72Gc2HU7sAjKAmPuCAJ95WoI5OxQXR+0EVoBgdWK0+Kl5l7 11 | BGrfcxQX1DfNc3q5BTKjMOTl2w9ZTjFZNWUdV/+pIHkj2zJTYAE1qGTRHseSdFU/ 12 | aUxlngNzLk3ZsE6KEBONaIfORVB1EGodusqXzkUbbYlKvQEe/hOgh3wqTlG2gT5k 13 | E5rwWsECgYEA75GkCYObhroi9bE1qAieVbTTL7sImwZk+vfQNJzqe+M8VxyFoiqe 14 | p0g4uILKn1YMqZFH9N7yeC6mvq2Aos2fiVgGG86i5WQlMloCjtkgylKc4hXB2G+s 15 | s7JekXhPLScoS3FP0c2TlJPvcj1nq1cAkVCUBwOzMSvJOHiHVN5pVskCgYEA1rf/ 16 | zfarD2723lHmJYj/r80IKuFkS4dy5H76ToreHW4NiiefNuX+9WfcIquv6MYLkUz5 17 | GybNFZl6Fi8leIoKoejFBVgvPALL7gw14yFvWMP+DZmC2107Mo3EipFvqyDg2bT8 18 | 56nU3MnBip7B5TYAZ5JAj6k2A4+eV1RmBL6wZ3kCgYEAkLpDhxvi0TmR9SvhZmoO 19 | fWiITMWJJV5vks4zEhXZ8o4M3fN1J8rnndebrJwXHLs3WxlRhzVI9iH4yii3FaNz 20 | Rd3Pkuz6q+ocLpcCBJpXnOLbtBnAyahthQG079zmuDh3t1v1BKJVDeVxOmquPmyJ 21 | A0DSrIonrwTswxjNaRAUQ0ECgYBK9ISKA9gHVTc8uN5csAyB9FMrlO8MJsaG2YTL 22 | slKDd42mctpzsaplRNJmEAUifzA+kt5LCiqBpcgmwmKUR6wahUVx7izfCCLkgMK2 23 | /U7/b7vaR4KUzWEC7tZzgP24gYu8tB+tR24VfSDhITaSq11MypNbEzjV2WbvGXlb 24 | oq22EQKBgQC/5J92YLDBP3cNQhlHj1j0AqNbCWBxaHSfG9pWPTgL4ccPDhFQngJd 25 | QCz7Lt7l5W1JOmRqMzKjS4f/r6KdG952I6/S46qZSpf/fIjIAEFCwtRY37D3pjQV 26 | 5cbwkQdGIHOXQ5SAtwgi8TbYzFRbl9noeTz+JNTIPVTQKeAXxauLrQ== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /test/ref/crypt/intermediate.key.public: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO/vnwes9N5OEBNdoVQk 3 | LJSUZsvERMlDaWpfHlr1cv8UM2ww3XUhn2GFR+P8pXZo0NgnaexoicB5nTSQ2AY4 4 | 48CoXQpqKes7i+VhAHXSfByZ+8j8G2pbgYVcENikhe/IXuyzh7hmnnaH5RWR9NgP 5 | B/XRbu8/wavXApoi8Wy4ZsHfkPc99f7iVpwXZw0wVIcuP6iIu6Dm86mij9BNL6iA 6 | GXaYZy1ItoQET3H8c7XQPLtZetSmiQ8ZweEnPA6VsCdW3pfiQA1UBN/l9/LRRAS5 7 | E6CxJSb6Er8eqZRdMTobLseLuyS10jpfcScF3Ox7W/E1BOsrLpsxezByA6SSWeTk 8 | AQIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /test/ref/crypt/intermediate.signed.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEfzCCA2egAwIBAgIBBjANBgkqhkiG9w0BAQsFADCBgjEUMBIGA1UEChMLZXhh 3 | bXBsZS5vcmcxFDASBgNVBAsTC2V4YW1wbGUub3JnMS0wKwYDVQQDFCQuc21wdGUt 4 | NDMwLTIuUk9PVC5OT1RfRk9SX1BST0RVQ1RJT04xJTAjBgNVBC4THERDblJkSEZi 5 | Y3Y0QU5WVXEyK3dNVkFMRlNlYz0wHhcNMTUwNjA1MTMyMDA4WhcNMjUwNjAxMTMy 6 | MDA4WjCBijEUMBIGA1UEChMLZXhhbXBsZS5vcmcxFDASBgNVBAsTC2V4YW1wbGUu 7 | b3JnMTUwMwYDVQQDFCwuc21wdGUtNDMwLTIuSU5URVJNRURJQVRFLk5PVF9GT1Jf 8 | UFJPRFVDVElPTjElMCMGA1UELhMcNmVhdDhyMzNVUzcxYXZ1UUVvam1IK2Jqazg0 9 | PTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMjv758HrPTeThATXaFU 10 | JCyUlGbLxETJQ2lqXx5a9XL/FDNsMN11IZ9hhUfj/KV2aNDYJ2nsaInAeZ00kNgG 11 | OOPAqF0KainrO4vlYQB10nwcmfvI/BtqW4GFXBDYpIXvyF7ss4e4Zp52h+UVkfTY 12 | Dwf10W7vP8Gr1wKaIvFsuGbB35D3PfX+4lacF2cNMFSHLj+oiLug5vOpoo/QTS+o 13 | gBl2mGctSLaEBE9x/HO10Dy7WXrUpokPGcHhJzwOlbAnVt6X4kANVATf5ffy0UQE 14 | uROgsSUm+hK/HqmUXTE6Gy7Hi7sktdI6X3EnBdzse1vxNQTrKy6bMXswcgOkklnk 15 | 5AECAwEAAaOB9TCB8jASBgNVHRMBAf8ECDAGAQH/AgECMAsGA1UdDwQEAwIBBjAd 16 | BgNVHQ4EFgQU6eat8r33US71avuQEojmH+bjk84wga8GA1UdIwSBpzCBpIAUDCnR 17 | dHFbcv4ANVUq2+wMVALFSeehgYikgYUwgYIxFDASBgNVBAoTC2V4YW1wbGUub3Jn 18 | MRQwEgYDVQQLEwtleGFtcGxlLm9yZzEtMCsGA1UEAxQkLnNtcHRlLTQzMC0yLlJP 19 | T1QuTk9UX0ZPUl9QUk9EVUNUSU9OMSUwIwYDVQQuExxEQ25SZEhGYmN2NEFOVlVx 20 | Mit3TVZBTEZTZWM9ggEFMA0GCSqGSIb3DQEBCwUAA4IBAQBGr/uVKvBE7yGcPdOG 21 | AaacD8zmEkb8BL+otrumW1BqAI0BIVghvuTDAKtk/cFy7Mbnnp/mTJ6h5F7lDON4 22 | YVBQ9gouw5+pLM61r/ZTF+shiWA4C4cwWb1X/gw82TXD2wXch9IJmcblrfrabHkB 23 | Y3wyyn5unqHm+uy/ZsNzoTmRcrxnPua5DyZKxGBHV0TEDzJMUMgluRcQwRs0HmG1 24 | vWeROkXRWyYiY2QAdpINuQUKUqjtFTtOGcA3I/Hd7vUiqqxNr9fL0H/HDvAbEmIw 25 | +YSFJ9uFyESvls8Lv5tydwhnqJBIKk19/CDIwMAPZnyT1WT3XwnD5hVRYljpgjm5 26 | xwd0 27 | -----END CERTIFICATE----- 28 | -------------------------------------------------------------------------------- /test/ref/crypt/leaf.cnf: -------------------------------------------------------------------------------- 1 | [ default ] 2 | distinguished_name = req_distinguished_name 3 | x509_extensions = v3_ca 4 | [ v3_ca ] 5 | basicConstraints = critical,CA:false 6 | keyUsage = digitalSignature,keyEncipherment 7 | subjectKeyIdentifier = hash 8 | authorityKeyIdentifier = keyid,issuer:always 9 | [ req_distinguished_name ] 10 | O = Unique organization name 11 | OU = Organization unit 12 | CN = Entity and dnQualifier 13 | -------------------------------------------------------------------------------- /test/ref/crypt/leaf.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICyjCCAbICAQAwgYQxFDASBgNVBAoTC2V4YW1wbGUub3JnMRQwEgYDVQQLEwtl 3 | eGFtcGxlLm9yZzEvMC0GA1UEAxQmQ1Muc21wdGUtNDMwLTIuTEVBRi5OT1RfRk9S 4 | X1BST0RVQ1RJT04xJTAjBgNVBC4THFFGVmx5bTdmdXFsNmJQT25ZMzhhYU8xWlBX 5 | ND0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTy9F1G9SHfU6L3oQY 6 | ep+ZizYaHEpLtjUAmlUaM9ZDJkViTCynMb2+grqsxudcRDkdEMnSNnkNrFLvOuZg 7 | g6xfoNCmXaRjwxMdeZZkWDrbccgP5cCjAWqRMbtS1Slexn++P6A4q7Q9A+Z1EsxG 8 | DkezbJDFJLv9KLO4bnYKsCawh5pv278A4vXS4tGZQHMsxpe3i4/PaL7c9eL65W6V 9 | /Le0RDf5BE02wfYbo7qxRFH7idgHRwsuUg2kdN0GLF8ZT8Rv2D/CkPfOsZwBXple 10 | /FQs13hFzEfxizXlC6+10wbBb/wtbX/TdY7ld5BGRyg8XjjJXhdR5MTnB5dgBoxk 11 | fuEzAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAK00A1YJvujYHfqShrrkn8dUd 12 | Od7epX1VF1IoHI2aetwZnw9fHu1/O70pHFsKHxGQgC8uagMNVMJ/p+sgCQCisPEp 13 | uPE4bkmh2zVlAo9Z//fEle5uqtvjmlO3PcTfZy4P/idu5l8YFolGoRXxetlia3Oq 14 | dJgUONWDSKo8+lMTsmrc/XUwtkRqol/Z/h2ZwrwHKvL6dA6H5H6XHRme7eTNU6Do 15 | uTRFBK0KVc/X8y2cX+aAbnsrVAfJ1xjHP9WbrUWzbr/ToALf7laTz1BdTo1EPpnt 16 | O2tr5j6onqcQs09vT+1mMdi85ahIXFftk5OOZxO54bJpVqoX3aw1jEZ1nrrk9Q== 17 | -----END CERTIFICATE REQUEST----- 18 | -------------------------------------------------------------------------------- /test/ref/crypt/leaf.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEA08vRdRvUh31Oi96EGHqfmYs2GhxKS7Y1AJpVGjPWQyZFYkws 3 | pzG9voK6rMbnXEQ5HRDJ0jZ5DaxS7zrmYIOsX6DQpl2kY8MTHXmWZFg623HID+XA 4 | owFqkTG7UtUpXsZ/vj+gOKu0PQPmdRLMRg5Hs2yQxSS7/SizuG52CrAmsIeab9u/ 5 | AOL10uLRmUBzLMaXt4uPz2i+3PXi+uVulfy3tEQ3+QRNNsH2G6O6sURR+4nYB0cL 6 | LlINpHTdBixfGU/Eb9g/wpD3zrGcAV6ZXvxULNd4RcxH8Ys15QuvtdMGwW/8LW1/ 7 | 03WO5XeQRkcoPF44yV4XUeTE5weXYAaMZH7hMwIDAQABAoIBAQCexTcCzFcZLrV4 8 | Itnxo9MK/pITJswHT9MR3aAYYW2orwLqemIrAB3WuBeKuBzuTPJnuJMi89TxjBIr 9 | 5oKXLX5Fvb9MR/yZEL6+pMw58u5EXVp1mG09hS1HJPnhUYyO0M0oaHgKo6Uc7FSR 10 | xQK/LatQdP1d3HjUgfOgOaZhwsVuJQxPKZ/MZFsQH7hkTiFVteRwlsRiUshKuHKL 11 | rOniTcsr792BaHxwuFYMqOtnnF5Jakeol98Iq1T3+jYz5tfHX/pnU/tn48SKN+m+ 12 | Q6YUAY0VNqilq9avozVYzcw3IiOqipa8/k83hfj6+16pWzqPh8C8KuBXBAifsJeJ 13 | HZRw90HRAoGBAO3J939vKhYobOPXSDDQIw4JJ3Skp3HADib0/TZ7SGA5Npyp/hf+ 14 | ov43k+dM9Wi8x7Q3W1QRFk9tS536VOg/7a+r6zyqbFAJCf+rBDULhH3bJvHoLqBz 15 | pPCJkh35quIcQEM7rmHLSXSZpBV5TEvdUDVDWixer0B+pVCqNxW2MqdJAoGBAOQE 16 | Pk5oz8R35X5vRFKezH5jECPPq4BZCfPEa8Mdu80S1RKc843adra1l6I9tpcii1Z7 17 | fjp+6vUFUF4owDMnpnKVbEKxRBmh+rut3wUXL8bm0rv7mUPSqJCnJRuXbe/wocDl 18 | 7E3UybHWCjyAjISY3IU9qRoPqcLQOm2i3Qo7PtibAoGATH/ZW+oLhC1lOrebxfhw 19 | DqfrRZ9jLzk2VFokzE5FLo+5fhVCZb3J+jcvIg6kNRnmtZfJjfYhU1Q6K4zJnB5U 20 | /Vs1xsKdLfJ6gQInzFj0OvkyQkkMFxqdSbU4iOQ1kaC9G+QradLYwuZa332yigWd 21 | NEWC0Rt1Di6wSI86QYXoLeECgYBiao52C3k6BMISa3Yi7xW2q41o15bfpA7On4Yf 22 | xnKr1igPi5z4KkY5IHIdfeOUoj1gC5d1KhjBvxRsP8yNh9yo8mOy+Y46PhbZ8Pck 23 | 3Fgr0q88oiEKDB/jp7E1kovKF6PJfbQb9+9Cie8LJDUCenQcMnwNmpscUgIWFkiv 24 | xNigZwKBgEJbPDGO+pEKyWass6R2v5nbNV4PBj0Iqydn6YPOR3+1Uy9f+S34BTgz 25 | EwOo7Tjm9MOA1IlRAcMVgaEO2jKLMZula8Bc3ulcr/KJXB3Y0gmhuxH51dknS24w 26 | ZzwkjLYiY1kZC0G6a8D4194xE1YO/sR+4UgILw4RIoWVtrjkdS/F 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /test/ref/crypt/leaf.key.public: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA08vRdRvUh31Oi96EGHqf 3 | mYs2GhxKS7Y1AJpVGjPWQyZFYkwspzG9voK6rMbnXEQ5HRDJ0jZ5DaxS7zrmYIOs 4 | X6DQpl2kY8MTHXmWZFg623HID+XAowFqkTG7UtUpXsZ/vj+gOKu0PQPmdRLMRg5H 5 | s2yQxSS7/SizuG52CrAmsIeab9u/AOL10uLRmUBzLMaXt4uPz2i+3PXi+uVulfy3 6 | tEQ3+QRNNsH2G6O6sURR+4nYB0cLLlINpHTdBixfGU/Eb9g/wpD3zrGcAV6ZXvxU 7 | LNd4RcxH8Ys15QuvtdMGwW/8LW1/03WO5XeQRkcoPF44yV4XUeTE5weXYAaMZH7h 8 | MwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /test/ref/crypt/leaf.signed.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEezCCA2OgAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBijEUMBIGA1UEChMLZXhh 3 | bXBsZS5vcmcxFDASBgNVBAsTC2V4YW1wbGUub3JnMTUwMwYDVQQDFCwuc21wdGUt 4 | NDMwLTIuSU5URVJNRURJQVRFLk5PVF9GT1JfUFJPRFVDVElPTjElMCMGA1UELhMc 5 | NmVhdDhyMzNVUzcxYXZ1UUVvam1IK2Jqazg0PTAeFw0xNTA2MDUxMzIwMDhaFw0y 6 | NTA1MzExMzIwMDhaMIGEMRQwEgYDVQQKEwtleGFtcGxlLm9yZzEUMBIGA1UECxML 7 | ZXhhbXBsZS5vcmcxLzAtBgNVBAMUJkNTLnNtcHRlLTQzMC0yLkxFQUYuTk9UX0ZP 8 | Ul9QUk9EVUNUSU9OMSUwIwYDVQQuExxRRlZseW03ZnVxbDZiUE9uWTM4YWFPMVpQ 9 | VzQ9MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA08vRdRvUh31Oi96E 10 | GHqfmYs2GhxKS7Y1AJpVGjPWQyZFYkwspzG9voK6rMbnXEQ5HRDJ0jZ5DaxS7zrm 11 | YIOsX6DQpl2kY8MTHXmWZFg623HID+XAowFqkTG7UtUpXsZ/vj+gOKu0PQPmdRLM 12 | Rg5Hs2yQxSS7/SizuG52CrAmsIeab9u/AOL10uLRmUBzLMaXt4uPz2i+3PXi+uVu 13 | lfy3tEQ3+QRNNsH2G6O6sURR+4nYB0cLLlINpHTdBixfGU/Eb9g/wpD3zrGcAV6Z 14 | XvxULNd4RcxH8Ys15QuvtdMGwW/8LW1/03WO5XeQRkcoPF44yV4XUeTE5weXYAaM 15 | ZH7hMwIDAQABo4HvMIHsMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgWgMB0GA1Ud 16 | DgQWBBRAVWXKbt+6qXps86djfxpo7Vk9bjCBrwYDVR0jBIGnMIGkgBTp5q3yvfdR 17 | LvVq+5ASiOYf5uOTzqGBiKSBhTCBgjEUMBIGA1UEChMLZXhhbXBsZS5vcmcxFDAS 18 | BgNVBAsTC2V4YW1wbGUub3JnMS0wKwYDVQQDFCQuc21wdGUtNDMwLTIuUk9PVC5O 19 | T1RfRk9SX1BST0RVQ1RJT04xJTAjBgNVBC4THERDblJkSEZiY3Y0QU5WVXEyK3dN 20 | VkFMRlNlYz2CAQYwDQYJKoZIhvcNAQELBQADggEBAA4CsCDn8UKBcH7wroorNKbf 21 | ZVzwGSxNyCMTmDm38ZmriNpV7FCNTLek4xmf21ITafC9nNxpbWA7l9bG5dRnktwa 22 | JSlHZKDKKVEUHJYu/47YUlmt4YNVo+zN0iB/QLXoHu6yGw3/N7z4sBDyLGGPl5mh 23 | sAxuXpFr1ruTQVqx483L7ie/p0GV9vsoAJQTRTnIcvEs7rVHxIWEsiOE8AZozW72 24 | jIBKSy9jsxSGYgmMgbdkrs5c2hBvVim5i58PIzSCo/lI/5WRREESZIyZ9zIBSwIS 25 | cYueAupiCrOxzY6Xg3GZlMbbHElp4MnDeV3zv90UAuZXomorCOcnutqUe36J63E= 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /test/ref/j2c/1.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/10.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/11.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/12.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/13.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/14.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/15.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/16.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/17.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/18.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/19.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/2.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/20.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/21.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/22.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/23.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/24.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/3.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/4.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/5.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/6.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/7.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/8.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/j2c/9.j2c: -------------------------------------------------------------------------------- 1 | ../../data/32x32_red_square.j2c -------------------------------------------------------------------------------- /test/ref/wav/1.wav: -------------------------------------------------------------------------------- 1 | ../../data/1s_24-bit_48k_silence.wav -------------------------------------------------------------------------------- /test/ref/wav/2.wav: -------------------------------------------------------------------------------- 1 | ../../data/1s_24-bit_48k_silence.wav -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/ASSETMAP: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:b3062f87-9060-4848-a664-d864d1877f1c 4 | Created by libdcp 5 | 1 6 | 2018-09-02T04:45:18+00:00 7 | libdcp 8 | libdcp 9 | 10 | 11 | urn:uuid:ac8d301c-e5d9-4343-b6f3-ba2668adbe56 12 | true 13 | 14 | 15 | pkl_ac8d301c-e5d9-4343-b6f3-ba2668adbe56.xml 16 | 1 17 | 0 18 | 1326 19 | 20 | 21 | 22 | 23 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 24 | 25 | 26 | cpl_5407b210-4441-4e97-8b16-8bdc7c12da54.xml 27 | 1 28 | 0 29 | 1061 30 | 31 | 32 | 33 | 34 | urn:uuid:a6c58cff-3e1e-4b38-acec-a42224475ef6 35 | 36 | 37 | subs.xml 38 | 1 39 | 0 40 | 438 41 | 42 | 43 | 44 | 45 | urn:uuid:dd015243-ab77-435c-a13d-690566885121 46 | 47 | 48 | dd015243-ab77-435c-a13d-690566885121.png 49 | 1 50 | 0 51 | 44861 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/VOLINDEX: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/cpl_5407b210-4441-4e97-8b16-8bdc7c12da54.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 4 | Created by libdcp 5 | 2018-09-02T04:45:18+00:00 6 | libdcp 7 | libdcp 8 | My film 9 | feature 10 | 11 | urn:uuid:b365eeb5-dcdf-4aaf-83f0-1202fa5d3ca8 12 | foo 13 | 14 | 15 | 16 | 17 | urn:uuid:73e16051-f99a-4bf4-b96a-c432d32aa19f 18 | 19 | 20 | urn:uuid:a6c58cff-3e1e-4b38-acec-a42224475ef6 21 | 24 1 22 | 6046 23 | 0 24 | 6046 25 | RmflhDu9QYUsNnBftdNlIEGdzG0= 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/dd015243-ab77-435c-a13d-690566885121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/test/ref/write_interop_subtitle_test3/dd015243-ab77-435c-a13d-690566885121.png -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/pkl_ac8d301c-e5d9-4343-b6f3-ba2668adbe56.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:uuid:ac8d301c-e5d9-4343-b6f3-ba2668adbe56 4 | Created by libdcp 5 | 2018-09-02T04:45:18+00:00 6 | libdcp 7 | libdcp 8 | 9 | 10 | urn:uuid:5407b210-4441-4e97-8b16-8bdc7c12da54 11 | 5407b210-4441-4e97-8b16-8bdc7c12da54 12 | M9U2kzcnfcBAy7MrXZGKjA8hQRU= 13 | 1061 14 | text/xml;asdcpKind=CPL 15 | cpl_5407b210-4441-4e97-8b16-8bdc7c12da54.xml 16 | 17 | 18 | urn:uuid:a6c58cff-3e1e-4b38-acec-a42224475ef6 19 | a6c58cff-3e1e-4b38-acec-a42224475ef6 20 | RmflhDu9QYUsNnBftdNlIEGdzG0= 21 | 438 22 | text/xml;asdcpKind=Subtitle 23 | subs.xml 24 | 25 | 26 | urn:uuid:dd015243-ab77-435c-a13d-690566885121 27 | 2vTylSKQ5MCQHbKPT4X+rlwfHk4= 28 | 44861 29 | image/png 30 | write_interop_subtitle_test3 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/ref/write_interop_subtitle_test3/subs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | a6c58cff-3e1e-4b38-acec-a42224475ef6 4 | Test 5 | 1 6 | EN 7 | 8 | dd015243-ab77-435c-a13d-690566885121.png 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/scope_guard_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015-2021 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "scope_guard.h" 36 | #include 37 | 38 | 39 | BOOST_AUTO_TEST_CASE(scope_guard_test) 40 | { 41 | int x = 0; 42 | 43 | { 44 | dcp::ScopeGuard sg = [&x]() { x = 42; }; 45 | BOOST_CHECK_EQUAL (x, 0); 46 | } 47 | 48 | BOOST_CHECK_EQUAL (x, 42); 49 | } 50 | -------------------------------------------------------------------------------- /test/subs_in_out.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012-2015 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | #include "interop_text_asset.h" 35 | #include "smpte_text_asset.h" 36 | #include 37 | 38 | using namespace std; 39 | 40 | int 41 | main (int argc, char* argv[]) 42 | { 43 | if (argc != 2) { 44 | cerr << "Syntax: " << argv[0] << " \n"; 45 | exit (EXIT_FAILURE); 46 | } 47 | 48 | try { 49 | dcp::InteropTextAsset sc(argv[1]); 50 | cout << sc.xml_as_string (); 51 | } catch (exception& e) { 52 | cerr << "Could not load as interop: " << e.what() << "\n"; 53 | try { 54 | dcp::SMPTETextAsset sc(argv[1]); 55 | cout << sc.xml_as_string(); 56 | } catch (exception& e) { 57 | cerr << "Could not load as SMPTE (" << e.what() << ")\n"; 58 | } 59 | } 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /test/utf8_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2018 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | #include "certificate.h" 35 | #include "util.h" 36 | #include 37 | 38 | BOOST_AUTO_TEST_CASE (utf8_test) 39 | { 40 | dcp::Certificate good (dcp::file_to_string ("test/data/good_cert.pem")); 41 | BOOST_CHECK_EQUAL (good.has_utf8_strings(), false); 42 | dcp::Certificate bad (dcp::file_to_string ("test/data/bad_cert.pem")); 43 | BOOST_CHECK_EQUAL (bad.has_utf8_strings(), true); 44 | } 45 | -------------------------------------------------------------------------------- /test/v_align_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2023 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | 19 | In addition, as a special exception, the copyright holders give 20 | permission to link the code of portions of this program with the 21 | OpenSSL library under certain conditions as described in each 22 | individual source file, and distribute linked combinations 23 | including the two. 24 | 25 | You must obey the GNU General Public License in all respects 26 | for all of the code used other than OpenSSL. If you modify 27 | file(s) with this exception, you may extend this exception to your 28 | version of the file(s), but you are not obligated to do so. If you 29 | do not wish to do so, delete this exception statement from your 30 | version. If you delete this exception statement from all source 31 | files in the program, then also delete it here. 32 | */ 33 | 34 | 35 | #include "exceptions.h" 36 | #include "v_align.h" 37 | #include 38 | 39 | 40 | BOOST_AUTO_TEST_CASE(v_align_test) 41 | { 42 | BOOST_CHECK(dcp::string_to_valign("top") == dcp::VAlign::TOP); 43 | BOOST_CHECK(dcp::string_to_valign("center") == dcp::VAlign::CENTER); 44 | BOOST_CHECK(dcp::string_to_valign("bottom") == dcp::VAlign::BOTTOM); 45 | BOOST_CHECK(dcp::string_to_valign("TOP") == dcp::VAlign::TOP); 46 | BOOST_CHECK(dcp::string_to_valign("CENter") == dcp::VAlign::CENTER); 47 | BOOST_CHECK(dcp::string_to_valign("Bottom") == dcp::VAlign::BOTTOM); 48 | 49 | BOOST_CHECK_THROW(dcp::string_to_valign("ostrabagalous"), dcp::ReadError); 50 | } 51 | 52 | -------------------------------------------------------------------------------- /test/verify_report_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2022 Carl Hetherington 3 | 4 | This file is part of DCP-o-matic. 5 | 6 | DCP-o-matic is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | DCP-o-matic is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with DCP-o-matic. If not, see . 18 | 19 | */ 20 | 21 | 22 | #include "verify.h" 23 | #include "verify_report.h" 24 | #include 25 | #include "test.h" 26 | 27 | 28 | BOOST_AUTO_TEST_CASE(verify_report_basically_ok) 29 | { 30 | dcp::HTMLFormatter formatter("build/test/verify_report_basically_ok.html"); 31 | dcp::verify_report( 32 | { 33 | dcp::verify( 34 | { private_test / "TONEPLATES-SMPTE-PLAINTEXT_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV" }, 35 | {}, 36 | [](std::string, boost::optional) {}, 37 | [](float) {}, 38 | {}, 39 | xsd_test 40 | ) 41 | }, 42 | formatter 43 | ); 44 | } 45 | 46 | 47 | BOOST_AUTO_TEST_CASE(text_formatter) 48 | { 49 | { 50 | dcp::TextFormatter fmt("build/test/text_formatter.txt"); 51 | 52 | fmt.heading("Heading"); 53 | fmt.subheading("Subheading"); 54 | auto A = fmt.unordered_list(); 55 | fmt.list_item("Foo"); 56 | fmt.list_item("Bar"); 57 | auto B = fmt.unordered_list(); 58 | fmt.list_item("Fred"); 59 | fmt.list_item("Jim"); 60 | fmt.list_item("Sheila"); 61 | } 62 | 63 | #ifdef LIBDCP_WINDOWS 64 | check_file("test/data/text_formatter_windows.txt", "build/test/text_formatter.txt"); 65 | #else 66 | check_file("test/data/text_formatter.txt", "build/test/text_formatter.txt"); 67 | #endif 68 | } 69 | 70 | -------------------------------------------------------------------------------- /tools/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014-2019 Carl Hetherington 3 | 4 | This file is part of libdcp. 5 | 6 | libdcp is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | libdcp is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with libdcp. If not, see . 18 | */ 19 | 20 | #include "verify.h" 21 | 22 | namespace dcp { 23 | 24 | extern std::vector filter_notes( 25 | std::vector const& notes, 26 | bool ignore_missing_assets, 27 | bool ignore_bv21_smpte 28 | ); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /waf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cth103/libdcp/00c0fe5947b3734c548194d617c3939d27aef57c/waf -------------------------------------------------------------------------------- /xsd/Dolby-2012-AD.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /xsd/Main-Stereo-Picture-CPL.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /xsd/PROTO-ASDCP-CC-CPL-20070926.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /xsd/SMPTE-429-10-2008.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /xsd/SMPTE-429-12-2008.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /xsd/isdcf-mca.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | --------------------------------------------------------------------------------