def check_am_xml(self, am): """ AssetMap XML syntax and structure check. Reference : N/A """ check_xml(am['FilePath'], am['Info']['AssetMap']['__xmlns__'], am['Info']['AssetMap']['Schema'], self.dcp.schema)
def check_subtitle_cpl_xml(self, playlist, asset, folder): """ Subtitle XML file syntax and structure validation. Reference : SMPTE ST 428-7 Interop TI Subtitle Spec 1.1 """ _, asset = asset asset_path = asset['Path'] if asset_path.endswith('.xml'): path = os.path.join(self.dcp.path, asset_path) namespace = 'interop_subtitle' label = 'Interop' else: path = os.path.join(folder, os.path.splitext(asset['Path'])[0]) namespace = asset['Probe']['NamespaceName'] label = asset['Probe']['LabelSetType'] if not os.path.exists(path): raise CheckException("Subtitle not found : {}".format(path)) if not os.path.isfile(path): raise CheckException("Subtitle must be a file : {}".format(path)) check_xml(path, namespace, label, self.dcp.schema)
def check_vol_xml(self, vol): """ VolIndex XML syntax and structure check. """ if self.dcp.schema == 'Interop': return check_xml(vol['FilePath'], vol['Info']['VolumeIndex']['__xmlns__'], vol['Info']['VolumeIndex']['Schema'], self.dcp.schema)
def check_subtitle_cpl_xml(self, playlist, asset, folder): """ Subtitle XML file syntax and structure validation. References: TI Subtitle Specification for DLP Cinema (v1.1) https://web.archive.org/web/20140924175755/http://dlp.com/downloads/pdf_dlp_cinema_CineCanvas_Rev_C.pdf SMPTE ST 428-7:2014 """ _, asset = asset asset_path = asset['Path'] if not asset_path: return if asset_path.endswith('.xml'): path = os.path.join(self.dcp.path, asset_path) namespace = 'interop_subtitle' label = 'Interop' else: path = os.path.join(folder, os.path.splitext(asset['Path'])[0]) namespace = asset['Probe']['NamespaceName'] label = asset['Probe']['LabelSetType'] if not os.path.exists(path): self.error("Subtitle not found : {}".format(path)) if not os.path.isfile(path): self.error("Subtitle must be a file : {}".format(path)) check_xml(self, path, namespace, label, self.dcp.schema)
def check_cpl_xml(self, playlist): """ CPL XML syntax and structure check. """ cpl = playlist['Info']['CompositionPlaylist'] check_xml( playlist['FilePath'], cpl['__xmlns__'], cpl['Schema'], self.dcp.schema)
def check_pkl_xml(self, pkl): """ PKL XML syntax and structure check. """ pkl_node = pkl['Info']['PackingList'] check_xml( pkl['FilePath'], pkl_node['__xmlns__'], pkl_node['Schema'], self.dcp.schema)
def check_vol_xml(self, vol): """ VolIndex XML syntax and structure check. Reference : SMPTE ST 429-9 Interop Delivery Media Representation and Segmentation 3.2 """ if self.dcp.schema == 'Interop': return check_xml(vol['FilePath'], vol['Info']['VolumeIndex']['__xmlns__'], vol['Info']['VolumeIndex']['Schema'], self.dcp.schema)
def check_vol_xml(self, vol): """ VolIndex XML syntax and structure check. References: SMPTE ST 429-9:2014 mpeg_ii_am_spec.doc (v3.4) https://interop-docs.cinepedia.com/Document_Release_2.0/mpeg_ii_am_spec.pdf """ if self.dcp.schema == 'Interop': return check_xml( self, vol['FilePath'], vol['Info']['VolumeIndex']['__xmlns__'], vol['Info']['VolumeIndex']['Schema'], self.dcp.schema)