diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-25 17:18:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-25 17:18:11 +0100 |
| commit | a5901718e3a0ee692d745fd3a6d8f5a49d422a26 (patch) | |
| tree | c211b207f911b12ed4313519956e2d616ef773f1 /src/picture_asset.cc | |
| parent | 5384418af0299194ecf3e27fd2e443e7d882a713 (diff) | |
Tweak interop / SMPTE to pass dcp_inspect.
Diffstat (limited to 'src/picture_asset.cc')
| -rw-r--r-- | src/picture_asset.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/picture_asset.cc b/src/picture_asset.cc index c3a67430..e1c1f86c 100644 --- a/src/picture_asset.cc +++ b/src/picture_asset.cc @@ -92,7 +92,7 @@ StereoPictureAsset::edit_rate_factor () const } void -PictureAsset::write_to_cpl (xmlpp::Node* node) const +PictureAsset::write_to_cpl (xmlpp::Node* node, bool interop) const { MXFAsset::write_to_cpl (node); @@ -105,7 +105,11 @@ PictureAsset::write_to_cpl (xmlpp::Node* node) const assert (i != c.end ()); (*i)->add_child ("FrameRate")->add_child_text (lexical_cast<string> (_edit_rate * edit_rate_factor ()) + " 1"); - (*i)->add_child ("ScreenAspectRatio")->add_child_text (lexical_cast<string> (_size.width) + " " + lexical_cast<string> (_size.height)); + if (interop) { + (*i)->add_child ("ScreenAspectRatio")->add_child_text (lexical_cast<string> (float (_size.width) / _size.height)); + } else { + (*i)->add_child ("ScreenAspectRatio")->add_child_text (lexical_cast<string> (_size.width) + " " + lexical_cast<string> (_size.height)); + } } bool |
