diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-22 18:57:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-22 18:57:05 +0100 |
| commit | 0251d3f2986bf70d4721b7127ca6ddcc9da3b256 (patch) | |
| tree | 5b8bee96ae9bd53c7e78c264cdf08993f3a28e41 /src/picture_asset.cc | |
| parent | 422c8a63d2368a2e63aee4c391207e3332d1d4c7 (diff) | |
Add basic example; tweak bits and pieces.
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 3fbc0947..abc902d4 100644 --- a/src/picture_asset.cc +++ b/src/picture_asset.cc @@ -280,6 +280,8 @@ MonoPictureAsset::construct (sigc::slot<string, int> get_path) for (int i = 0; i < _length; ++i) { string const path = get_path (i); + + cout << "reading " << path << "\n"; if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.c_str(), frame_buffer))) { throw FileError ("could not open JPEG2000 file for reading", path); @@ -289,8 +291,10 @@ MonoPictureAsset::construct (sigc::slot<string, int> get_path) if (ASDCP_FAILURE (mxf_writer.WriteFrame (frame_buffer, 0, 0))) { throw MiscError ("error in writing video MXF"); } - - (*_progress) (0.5 * float (i) / _length); + + if (_progress) { + (*_progress) (0.5 * float (i) / _length); + } } if (ASDCP_FAILURE (mxf_writer.Finalize())) { |
