X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.cc;h=e25583cb69064b9ac3dd2fdb7352ab17c13efece;hp=b2034890b04eab8e58cc52824fd359143bce09e6;hb=8457b7c1066da4e14f00a76f3855e60d986b179f;hpb=4f139c25251b177878e30dd62350a0ebd5e07e14 diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index b2034890b..e25583cb6 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -35,6 +35,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -165,12 +168,12 @@ DCPExaminer::DCPExaminer (shared_ptr content) _encrypted = cpl->encrypted (); _kdm_valid = true; - /* Check that we can read the first picture frame */ + /* Check that we can read the first picture, sound and subtitle frames of each reel */ try { - if (!cpl->reels().empty ()) { - shared_ptr asset = cpl->reels().front()->main_picture()->asset (); - shared_ptr mono = dynamic_pointer_cast (asset); - shared_ptr stereo = dynamic_pointer_cast (asset); + BOOST_FOREACH (shared_ptr i, cpl->reels()) { + shared_ptr pic = i->main_picture()->asset (); + shared_ptr mono = dynamic_pointer_cast (pic); + shared_ptr stereo = dynamic_pointer_cast (pic); if (mono) { mono->start_read()->get_frame(0)->xyz_image (); @@ -178,6 +181,14 @@ DCPExaminer::DCPExaminer (shared_ptr content) stereo->start_read()->get_frame(0)->xyz_image (dcp::EYE_LEFT); } + if (i->main_sound()) { + shared_ptr sound = i->main_sound()->asset (); + i->main_sound()->asset()->start_read()->get_frame(0); + } + + if (i->main_subtitle()) { + i->main_subtitle()->asset()->subtitles (); + } } } catch (dcp::DCPReadError& e) { _kdm_valid = false;