summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-05 00:05:32 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:36:27 +0100
commitfe99eae4b95c5fcf2f3730efad4a18d0cb5c29bc (patch)
tree265ca14896f63eeff210d602c5f11ed19d800ebf /test
parent7b717db244554300ebed8eade8421ee3faa28d33 (diff)
MXF -> Asset in lots of places.
Diffstat (limited to 'test')
-rw-r--r--test/cpl_sar_test.cc4
-rw-r--r--test/dcp_test.cc26
-rw-r--r--test/decryption_test.cc6
-rw-r--r--test/encryption_test.cc16
-rw-r--r--test/recovery_test.cc10
-rw-r--r--test/round_trip_test.cc28
6 files changed, 45 insertions, 45 deletions
diff --git a/test/cpl_sar_test.cc b/test/cpl_sar_test.cc
index bce57f58..691439db 100644
--- a/test/cpl_sar_test.cc
+++ b/test/cpl_sar_test.cc
@@ -19,7 +19,7 @@
#include "cpl.h"
#include "reel_mono_picture_asset.h"
-#include "mono_picture_mxf.h"
+#include "mono_picture_asset.h"
#include <libcxml/cxml.h>
#include <boost/test/unit_test.hpp>
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE (cpl_sar)
{
shared_ptr<dcp::ReelMonoPictureAsset> pa (
new dcp::ReelMonoPictureAsset (
- shared_ptr<dcp::MonoPictureMXF> (new dcp::MonoPictureMXF ("test/ref/DCP/dcp_test1/video.mxf")),
+ shared_ptr<dcp::MonoPictureAsset> (new dcp::MonoPictureAsset ("test/ref/DCP/dcp_test1/video.mxf")),
0
)
);
diff --git a/test/dcp_test.cc b/test/dcp_test.cc
index 6da30ffe..c4950704 100644
--- a/test/dcp_test.cc
+++ b/test/dcp_test.cc
@@ -20,11 +20,11 @@
#include "dcp.h"
#include "metadata.h"
#include "cpl.h"
-#include "mono_picture_mxf.h"
-#include "stereo_picture_mxf.h"
-#include "picture_mxf_writer.h"
-#include "sound_mxf_writer.h"
-#include "sound_mxf.h"
+#include "mono_picture_asset.h"
+#include "stereo_picture_asset.h"
+#include "picture_asset_writer.h"
+#include "sound_asset_writer.h"
+#include "sound_asset.h"
#include "reel.h"
#include "test.h"
#include "file.h"
@@ -62,18 +62,18 @@ BOOST_AUTO_TEST_CASE (dcp_test1)
cpl->set_content_version_label_text ("81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00");
cpl->set_metadata (xml_meta);
- shared_ptr<dcp::MonoPictureMXF> mp (new dcp::MonoPictureMXF (dcp::Fraction (24, 1)));
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
mp->set_metadata (mxf_meta);
- shared_ptr<dcp::PictureMXFWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test1/video.mxf", dcp::SMPTE, false);
+ shared_ptr<dcp::PictureAssetWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test1/video.mxf", dcp::SMPTE, false);
dcp::File j2c ("test/data/32x32_red_square.j2c");
for (int i = 0; i < 24; ++i) {
picture_writer->write (j2c.data (), j2c.size ());
}
picture_writer->finalize ();
- shared_ptr<dcp::SoundMXF> ms (new dcp::SoundMXF (dcp::Fraction (24, 1), 48000, 1));
+ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset (dcp::Fraction (24, 1), 48000, 1));
ms->set_metadata (mxf_meta);
- shared_ptr<dcp::SoundMXFWriter> sound_writer = ms->start_write ("build/test/DCP/dcp_test1/audio.mxf", dcp::SMPTE);
+ shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write ("build/test/DCP/dcp_test1/audio.mxf", dcp::SMPTE);
SF_INFO info;
info.format = 0;
@@ -133,9 +133,9 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
cpl->set_content_version_label_text ("81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00");
cpl->set_metadata (xml_meta);
- shared_ptr<dcp::StereoPictureMXF> mp (new dcp::StereoPictureMXF (dcp::Fraction (24, 1)));
+ shared_ptr<dcp::StereoPictureAsset> mp (new dcp::StereoPictureAsset (dcp::Fraction (24, 1)));
mp->set_metadata (mxf_meta);
- shared_ptr<dcp::PictureMXFWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test2/video.mxf", dcp::SMPTE, false);
+ shared_ptr<dcp::PictureAssetWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test2/video.mxf", dcp::SMPTE, false);
dcp::File j2c ("test/data/32x32_red_square.j2c");
for (int i = 0; i < 24; ++i) {
/* Left */
@@ -145,9 +145,9 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
}
picture_writer->finalize ();
- shared_ptr<dcp::SoundMXF> ms (new dcp::SoundMXF (dcp::Fraction (24, 1), 48000, 1));
+ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset (dcp::Fraction (24, 1), 48000, 1));
ms->set_metadata (mxf_meta);
- shared_ptr<dcp::SoundMXFWriter> sound_writer = ms->start_write ("build/test/DCP/dcp_test2/audio.mxf", dcp::SMPTE);
+ shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write ("build/test/DCP/dcp_test2/audio.mxf", dcp::SMPTE);
SF_INFO info;
info.format = 0;
diff --git a/test/decryption_test.cc b/test/decryption_test.cc
index 0080fe3e..0974b85d 100644
--- a/test/decryption_test.cc
+++ b/test/decryption_test.cc
@@ -22,7 +22,7 @@
#include "cpl.h"
#include "decrypted_kdm.h"
#include "encrypted_kdm.h"
-#include "mono_picture_mxf.h"
+#include "mono_picture_asset.h"
#include "reel_picture_asset.h"
#include "reel.h"
#include "test.h"
@@ -42,10 +42,10 @@ pair<uint8_t*, dcp::Size>
get_frame (dcp::DCP const & dcp)
{
shared_ptr<const dcp::Reel> reel = dcp.cpls().front()->reels().front ();
- shared_ptr<dcp::PictureMXF> picture = reel->main_picture()->mxf ();
+ shared_ptr<dcp::PictureAsset> picture = reel->main_picture()->asset ();
BOOST_CHECK (picture);
- shared_ptr<const dcp::MonoPictureMXF> mono_picture = dynamic_pointer_cast<const dcp::MonoPictureMXF> (picture);
+ shared_ptr<const dcp::MonoPictureAsset> mono_picture = dynamic_pointer_cast<const dcp::MonoPictureAsset> (picture);
shared_ptr<const dcp::MonoPictureFrame> j2k_frame = mono_picture->get_frame (0);
shared_ptr<dcp::XYZImage> xyz = j2k_frame->xyz_image();
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 6dc37b8d..299e5f9b 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -23,10 +23,10 @@
#include "dcp.h"
#include "signer.h"
#include "cpl.h"
-#include "mono_picture_mxf.h"
-#include "picture_mxf_writer.h"
-#include "sound_mxf_writer.h"
-#include "sound_mxf.h"
+#include "mono_picture_asset.h"
+#include "picture_asset_writer.h"
+#include "sound_asset_writer.h"
+#include "sound_asset.h"
#include "reel.h"
#include "test.h"
#include "file.h"
@@ -82,20 +82,20 @@ BOOST_AUTO_TEST_CASE (encryption_test)
dcp::Key key;
- shared_ptr<dcp::MonoPictureMXF> mp (new dcp::MonoPictureMXF (dcp::Fraction (24, 1)));
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
mp->set_metadata (mxf_metadata);
mp->set_key (key);
- shared_ptr<dcp::PictureMXFWriter> writer = mp->start_write ("build/test/DCP/encryption_test/video.mxf", dcp::SMPTE, false);
+ shared_ptr<dcp::PictureAssetWriter> writer = mp->start_write ("build/test/DCP/encryption_test/video.mxf", dcp::SMPTE, false);
dcp::File j2c ("test/data/32x32_red_square.j2c");
for (int i = 0; i < 24; ++i) {
writer->write (j2c.data (), j2c.size ());
}
writer->finalize ();
- shared_ptr<dcp::SoundMXF> ms (new dcp::SoundMXF (dcp::Fraction (24, 1), 48000, 1));
+ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset (dcp::Fraction (24, 1), 48000, 1));
ms->set_key (key);
- shared_ptr<dcp::SoundMXFWriter> sound_writer = ms->start_write ("build/test/DCP/encryption_test/audio.mxf", dcp::SMPTE);
+ shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write ("build/test/DCP/encryption_test/audio.mxf", dcp::SMPTE);
SF_INFO info;
info.format = 0;
diff --git a/test/recovery_test.cc b/test/recovery_test.cc
index 1d51a711..257c512d 100644
--- a/test/recovery_test.cc
+++ b/test/recovery_test.cc
@@ -19,8 +19,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
-#include "mono_picture_mxf_writer.h"
-#include "mono_picture_mxf.h"
+#include "mono_picture_asset_writer.h"
+#include "mono_picture_asset.h"
#include "KM_util.h"
using std::string;
@@ -48,8 +48,8 @@ BOOST_AUTO_TEST_CASE (recovery)
boost::filesystem::remove_all ("build/test/baz");
boost::filesystem::create_directories ("build/test/baz");
- shared_ptr<dcp::MonoPictureMXF> mp (new dcp::MonoPictureMXF (dcp::Fraction (24, 1)));
- shared_ptr<dcp::PictureMXFWriter> writer = mp->start_write ("build/test/baz/video1.mxf", dcp::SMPTE, false);
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
+ shared_ptr<dcp::PictureAssetWriter> writer = mp->start_write ("build/test/baz/video1.mxf", dcp::SMPTE, false);
int written_size = 0;
for (int i = 0; i < 24; ++i) {
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE (recovery)
Kumu::ResetTestRNG ();
#endif
- mp.reset (new dcp::MonoPictureMXF (dcp::Fraction (24, 1)));
+ mp.reset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
writer = mp->start_write ("build/test/baz/video2.mxf", dcp::SMPTE, true);
writer->write (data, size);
diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc
index 9f1030da..a719ff45 100644
--- a/test/round_trip_test.cc
+++ b/test/round_trip_test.cc
@@ -21,14 +21,14 @@
#include "decrypted_kdm.h"
#include "encrypted_kdm.h"
#include "signer.h"
-#include "mono_picture_mxf.h"
-#include "sound_mxf.h"
+#include "mono_picture_asset.h"
+#include "sound_asset.h"
#include "reel.h"
#include "test.h"
#include "cpl.h"
#include "mono_picture_frame.h"
#include "certificate_chain.h"
-#include "mono_picture_mxf_writer.h"
+#include "mono_picture_asset_writer.h"
#include "reel_picture_asset.h"
#include "reel_mono_picture_asset.h"
#include "file.h"
@@ -43,7 +43,7 @@ using std::list;
using boost::shared_ptr;
using boost::scoped_array;
-/* Build an encrypted picture MXF and a KDM for it and check that the KDM can be decrypted */
+/* Build an encrypted picture asset and a KDM for it and check that the KDM can be decrypted */
BOOST_AUTO_TEST_CASE (round_trip_test)
{
shared_ptr<dcp::Signer> signer (new dcp::Signer ("openssl"));
@@ -51,8 +51,8 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
boost::filesystem::path work_dir = "build/test/round_trip_test";
boost::filesystem::create_directory (work_dir);
- shared_ptr<dcp::MonoPictureMXF> mxf_A (new dcp::MonoPictureMXF (dcp::Fraction (24, 1)));
- shared_ptr<dcp::PictureMXFWriter> writer = mxf_A->start_write (work_dir / "video.mxf", dcp::SMPTE, false);
+ shared_ptr<dcp::MonoPictureAsset> asset_A (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
+ shared_ptr<dcp::PictureAssetWriter> writer = asset_A->start_write (work_dir / "video.mxf", dcp::SMPTE, false);
dcp::File j2c ("test/data/32x32_red_square.j2c");
for (int i = 0; i < 24; ++i) {
writer->write (j2c.data (), j2c.size ());
@@ -61,11 +61,11 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
dcp::Key key;
- mxf_A->set_key (key);
+ asset_A->set_key (key);
shared_ptr<dcp::CPL> cpl (new dcp::CPL ("A Test DCP", dcp::FEATURE));
shared_ptr<dcp::Reel> reel (new dcp::Reel ());
- reel->add (shared_ptr<dcp::ReelMonoPictureAsset> (new dcp::ReelMonoPictureAsset (mxf_A, 0)));
+ reel->add (shared_ptr<dcp::ReelMonoPictureAsset> (new dcp::ReelMonoPictureAsset (asset_A, 0)));
cpl->add (reel);
/* A KDM using our certificate chain's leaf key pair */
@@ -98,16 +98,16 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
++j;
}
- /* Reload the picture MXF */
- shared_ptr<dcp::MonoPictureMXF> mxf_B (
- new dcp::MonoPictureMXF (work_dir / "video.mxf")
+ /* Reload the picture asset */
+ shared_ptr<dcp::MonoPictureAsset> asset_B (
+ new dcp::MonoPictureAsset (work_dir / "video.mxf")
);
BOOST_CHECK (!kdm_B.keys().empty ());
- mxf_B->set_key (kdm_B.keys().front().key());
+ asset_B->set_key (kdm_B.keys().front().key());
- shared_ptr<dcp::XYZImage> xyz_A = mxf_A->get_frame(0)->xyz_image ();
- shared_ptr<dcp::XYZImage> xyz_B = mxf_B->get_frame(0)->xyz_image ();
+ shared_ptr<dcp::XYZImage> xyz_A = asset_A->get_frame(0)->xyz_image ();
+ shared_ptr<dcp::XYZImage> xyz_B = asset_B->get_frame(0)->xyz_image ();
scoped_array<uint8_t> frame_A (new uint8_t[xyz_A->size().width * xyz_A->size().height * 4]);
dcp::xyz_to_rgba (xyz_A, dcp::ColourConversion::srgb_to_xyz(), frame_A.get());