summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-08-30 16:09:32 +0100
committerCarl Hetherington <cth@carlh.net>2013-08-30 16:09:32 +0100
commita38a20cb7ada1a17231c7bdedab79618d5390736 (patch)
treec69f6efdbfb9a4edcfefc4023329fbff4c35ace1 /src/cpl.cc
parent29b507d5ed965367c2daa8c68316a1b336edd614 (diff)
Remove fps/length from CPL.
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 561cc989..25112d4d 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -44,12 +44,10 @@ using boost::lexical_cast;
using boost::optional;
using namespace libdcp;
-CPL::CPL (string directory, string name, ContentKind content_kind, int length, int frames_per_second)
+CPL::CPL (string directory, string name, ContentKind content_kind)
: _directory (directory)
, _name (name)
, _content_kind (content_kind)
- , _length (length)
- , _fps (frames_per_second)
{
_id = make_uuid ();
}
@@ -63,8 +61,6 @@ CPL::CPL (string directory, string name, ContentKind content_kind, int length, i
CPL::CPL (string directory, string file, list<PathAssetMap> asset_maps, bool require_mxfs)
: _directory (directory)
, _content_kind (FEATURE)
- , _length (0)
- , _fps (0)
{
/* Read the XML */
shared_ptr<parse::CPL> cpl;
@@ -91,9 +87,6 @@ CPL::CPL (string directory, string file, list<PathAssetMap> asset_maps, bool req
} else {
p = (*i)->asset_list->main_stereoscopic_picture;
}
-
- _fps = p->edit_rate.numerator;
- _length += p->duration;
shared_ptr<PictureAsset> picture;
shared_ptr<SoundAsset> sound;
@@ -135,7 +128,7 @@ CPL::CPL (string directory, string file, list<PathAssetMap> asset_maps, bool req
picture.reset (new StereoPictureAsset (
asset.first,
asset.second->chunks.front()->path,
- _fps,
+ p->edit_rate.numerator,
p->duration
)
);
@@ -253,7 +246,7 @@ CPL::write_xml (bool interop, XMLMetadata const & metadata, shared_ptr<Encryptio
doc.write_to_file_formatted (p.string (), "UTF-8");
_digest = make_digest (p.string (), 0);
- _length = boost::filesystem::file_size (p.string ());
+ _length = boost::filesystem::file_size (p);
}
void
@@ -315,16 +308,6 @@ CPL::equals (CPL const & other, EqualityOptions opt, boost::function<void (NoteT
return false;
}
- if (_fps != other._fps) {
- note (ERROR, String::compose ("frames per second differ (%1 vs %2)", _fps, other._fps));
- return false;
- }
-
- if (_length != other._length) {
- stringstream s;
- note (ERROR, String::compose ("lengths differ (%1 vs %2)", _length, other._length));
- }
-
if (_reels.size() != other._reels.size()) {
note (ERROR, String::compose ("reel counts differ (%1 vs %2)", _reels.size(), other._reels.size()));
return false;