diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-09 12:48:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-09 12:48:47 +0100 |
| commit | 5c29a3586ea262abcc8829bf267d38d8a5a84d9b (patch) | |
| tree | 394c46a1b18d0b02b19b3b99439fdb5e33e11b85 /examples | |
| parent | 403c1e43d7e12af9ae72291f4bdff78fd242f9f6 (diff) | |
Somewhat hacky rearrangement to support multiple CPLs per DCP.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/make_dcp.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/examples/make_dcp.cc b/examples/make_dcp.cc index 5b764393..a84a19c1 100644 --- a/examples/make_dcp.cc +++ b/examples/make_dcp.cc @@ -49,14 +49,19 @@ video_frame (int /* frame */) int main () { - /* Make a DCP object. "My Film DCP" is the directory name for the DCP, "My Film" is the title - that will be shown on the projector / TMS when the DCP is ingested. + /* Make a DCP object. "My Film DCP" is the directory name for the DCP */ + libdcp::DCP dcp ("My Film DCP"); + + /* Now make a CPL object. + "My Film" is the title that will be shown on the projector / TMS when the DCP is ingested. FEATURE is the type that the projector will list the DCP as. - 24 is the frame rate, and the DCP will be 48 frames long (ie 2 seconds at 24 fps). - */ - libdcp::DCP dcp ("My Film DCP", "My Film", libdcp::FEATURE, 24, 48); + */ + boost::shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("My Film DCP", "My Film", libdcp::FEATURE, 24, 48)); + + /* And add the CPL to the DCP */ + dcp.add_cpl (cpl); /* Now make a `picture asset'. This is a collection of the JPEG2000 files that make up the picture, one per frame. Here we're using a function (video_frame) to obtain the name of the JPEG2000 file for each frame. @@ -92,8 +97,8 @@ main () new libdcp::SoundAsset (sound_files, "My Film DCP", "audio.mxf", 0, 24, 48) ); - /* Now that we have the assets, we can create a Reel to put them in and add it to the DCP */ - dcp.add_reel ( + /* Now that we have the assets, we can create a Reel to put them in and add it to the CPL */ + cpl->add_reel ( boost::shared_ptr<libdcp::Reel> ( new libdcp::Reel (picture_asset, sound_asset, boost::shared_ptr<libdcp::SubtitleAsset> ()) ) |
