From ecdf591929aba92163e29224d4e1af0d45cc2f5f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 16 Jan 2015 15:11:03 +0000 Subject: Movements in libdcp-test-private. --- run/tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run/tests b/run/tests index b5edf4ea..7083c684 100755 --- a/run/tests +++ b/run/tests @@ -95,6 +95,6 @@ fi # Dump the subs of JourneyToJah... (which has MXF-wrapped subtitles) # and check that they are right -$dcpinfo -s $private/JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV >> $work/jah.log +$dcpinfo -s $private/data/JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV >> $work/jah.log echo "PASS" -- cgit v1.2.3 From a8d04509ff58ac8e35338df05721adf5e36858d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 21 Jan 2015 19:36:31 +0000 Subject: Add SMPTESubtitleContent::valid_mxf. --- src/smpte_subtitle_content.cc | 8 ++++++++ src/smpte_subtitle_content.h | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/smpte_subtitle_content.cc b/src/smpte_subtitle_content.cc index 910219cb..4435fe23 100644 --- a/src/smpte_subtitle_content.cc +++ b/src/smpte_subtitle_content.cc @@ -84,3 +84,11 @@ SMPTESubtitleContent::load_font_nodes () const copy (_load_font_nodes.begin(), _load_font_nodes.end(), back_inserter (lf)); return lf; } + +bool +SMPTESubtitleContent::valid_mxf (boost::filesystem::path file) +{ + ASDCP::TimedText::MXFReader reader; + Kumu::Result_t r = reader.OpenRead (file.string().c_str ()); + return !ASDCP_FAILURE (r); +} diff --git a/src/smpte_subtitle_content.h b/src/smpte_subtitle_content.h index 8faea817..a47cbb3c 100644 --- a/src/smpte_subtitle_content.h +++ b/src/smpte_subtitle_content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ */ #include "subtitle_content.h" +#include namespace dcp { @@ -32,6 +33,8 @@ public: SMPTESubtitleContent (boost::filesystem::path file, bool mxf = true); std::list > load_font_nodes () const; + + static bool valid_mxf (boost::filesystem::path); private: std::list > _load_font_nodes; -- cgit v1.2.3