summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-18 00:27:34 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-18 00:27:34 +0100
commit2915c4f48129a4cac2c8ca364b09dd8047364aad (patch)
tree119434688e7d055c89cd9d54d15c6b068755f670 /test/test.cc
parent6af628a0404e7135cb77cfa6d49a8419c883f2bf (diff)
Bv2.1 8.5: FFOC and LFOC should be present and have particular values.
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc33
1 files changed, 27 insertions, 6 deletions
diff --git a/test/test.cc b/test/test.cc
index e43e5a70..38ff565e 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -55,6 +55,7 @@
#include "reel_asset.h"
#include "test.h"
#include "util.h"
+#include "reel_markers_asset.h"
#include <asdcp/KM_util.h>
#include <asdcp/KM_prng.h>
#include <sndfile.h>
@@ -67,6 +68,7 @@ using std::string;
using std::min;
using std::vector;
using std::shared_ptr;
+using std::make_shared;
using boost::optional;
@@ -337,12 +339,21 @@ make_simple (boost::filesystem::path path, int reels, int frames)
shared_ptr<dcp::MonoPictureAsset> mp = simple_picture (path, suffix, frames);
shared_ptr<dcp::SoundAsset> ms = simple_sound (path, suffix, mxf_meta, "en-US", frames);
- cpl->add (shared_ptr<dcp::Reel> (
- new dcp::Reel (
- shared_ptr<dcp::ReelMonoPictureAsset>(new dcp::ReelMonoPictureAsset(mp, 0)),
- shared_ptr<dcp::ReelSoundAsset>(new dcp::ReelSoundAsset(ms, 0))
- )
- ));
+ auto reel = make_shared<dcp::Reel>(
+ shared_ptr<dcp::ReelMonoPictureAsset>(new dcp::ReelMonoPictureAsset(mp, 0)),
+ shared_ptr<dcp::ReelSoundAsset>(new dcp::ReelSoundAsset(ms, 0))
+ );
+
+ auto markers = make_shared<dcp::ReelMarkersAsset>(dcp::Fraction(24, 1), frames, 0);
+ if (i == 0) {
+ markers->set (dcp::Marker::FFOC, dcp::Time(0, 0, 0, 1, 24));
+ }
+ if (i == reels - 1) {
+ markers->set (dcp::Marker::LFOC, dcp::Time(0, 0, 0, frames - 1, 24));
+ }
+ reel->add (markers);
+
+ cpl->add (reel);
}
d->add (cpl);
@@ -379,6 +390,16 @@ simple_subtitle ()
}
+shared_ptr<dcp::ReelMarkersAsset>
+simple_markers (int frames)
+{
+ auto markers = make_shared<dcp::ReelMarkersAsset>(dcp::Fraction(24, 1), frames, 0);
+ markers->set (dcp::Marker::FFOC, dcp::Time(1, 24, 24));
+ markers->set (dcp::Marker::LFOC, dcp::Time(frames - 1, 24, 24));
+ return markers;
+}
+
+
shared_ptr<dcp::DCP>
make_simple_with_interop_subs (boost::filesystem::path path)
{