From a68b877d96a9e9f366f27752e071bc0e895e9dc7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 1 Jun 2016 23:53:06 +0100 Subject: Add Reader classes to permit much more efficient DCP reading. --- examples/read_dcp.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/read_dcp.cc b/examples/read_dcp.cc index 4e3f4836..6cc9b676 100644 --- a/examples/read_dcp.cc +++ b/examples/read_dcp.cc @@ -29,6 +29,7 @@ #include "reel_picture_asset.h" #include "mono_picture_frame.h" #include "mono_picture_asset.h" +#include "mono_picture_asset_reader.h" #include "stereo_picture_asset.h" #include "sound_asset.h" #include "subtitle_asset.h" @@ -82,8 +83,11 @@ main () cpl->reels().front()->main_picture()->asset() ); + /* Get a reader for it */ + boost::shared_ptr picture_asset_reader = picture_asset->start_read(); + /* Get the 1000th frame of it */ - boost::shared_ptr picture_frame_j2k = picture_asset->get_frame(999); + boost::shared_ptr picture_frame_j2k = picture_asset_reader->get_frame(999); /* Get the frame as an XYZ image */ boost::shared_ptr picture_image_xyz = picture_frame_j2k->xyz_image (); -- cgit v1.2.3