diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-05-03 11:17:34 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-03 20:18:04 +0200 |
| commit | 689fa55d1529ad88449ca464e9107c4dcc54d1cb (patch) | |
| tree | edd1264941263f2fa25a98d61f98c87876c5b667 /src/lib/atmos_mxf_decoder.cc | |
| parent | 0aabe4060ea4bad7c7caac633aef0737fccff8c2 (diff) | |
C++11 tidying.
Diffstat (limited to 'src/lib/atmos_mxf_decoder.cc')
| -rw-r--r-- | src/lib/atmos_mxf_decoder.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/atmos_mxf_decoder.cc b/src/lib/atmos_mxf_decoder.cc index 6c7cda61a..9fcd9d2a6 100644 --- a/src/lib/atmos_mxf_decoder.cc +++ b/src/lib/atmos_mxf_decoder.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington <cth@carlh.net> + Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,6 +18,7 @@ */ + #include "atmos_content.h" #include "atmos_decoder.h" #include "atmos_mxf_content.h" @@ -26,15 +27,18 @@ #include <dcp/atmos_asset.h> #include <dcp/atmos_asset_reader.h> + +using std::make_shared; using std::shared_ptr; + AtmosMXFDecoder::AtmosMXFDecoder (std::shared_ptr<const Film> film, std::shared_ptr<const AtmosMXFContent> content) : Decoder (film) , _content (content) { - atmos.reset (new AtmosDecoder(this, content)); + atmos = make_shared<AtmosDecoder>(this, content); - shared_ptr<dcp::AtmosAsset> asset (new dcp::AtmosAsset(_content->path(0))); + auto asset = make_shared<dcp::AtmosAsset>(_content->path(0)); _reader = asset->start_read (); _metadata = AtmosMetadata (asset); } @@ -43,8 +47,8 @@ AtmosMXFDecoder::AtmosMXFDecoder (std::shared_ptr<const Film> film, std::shared_ bool AtmosMXFDecoder::pass () { - double const vfr = _content->active_video_frame_rate (film()); - int64_t const frame = _next.frames_round (vfr); + auto const vfr = _content->active_video_frame_rate (film()); + auto const frame = _next.frames_round (vfr); if (frame >= _content->atmos->length()) { return true; |
