From 2f2643b6ddc36d6efcf4d41913ec4f711750e9c4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Jan 2021 21:52:21 +0100 Subject: Rename ReelMXF -> ReelFileAsset. --- src/cpl.cc | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) (limited to 'src/cpl.cc') diff --git a/src/cpl.cc b/src/cpl.cc index 5f8d8955..c528af31 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -491,55 +491,43 @@ CPL::maybe_write_composition_metadata_asset (xmlpp::Element* node) const } -vector> -CPL::reel_mxfs () +template +void +add_file_assets (vector>& assets, vector> reels) { - vector> c; - - for (auto i: _reels) { + for (auto i: reels) { if (i->main_picture ()) { - c.push_back (i->main_picture()); + assets.push_back (i->main_picture()); } if (i->main_sound ()) { - c.push_back (i->main_sound()); + assets.push_back (i->main_sound()); } if (i->main_subtitle ()) { - c.push_back (i->main_subtitle()); + assets.push_back (i->main_subtitle()); } for (auto j: i->closed_captions()) { - c.push_back (j); + assets.push_back (j); } if (i->atmos ()) { - c.push_back (i->atmos()); + assets.push_back (i->atmos()); } } +} + +vector> +CPL::reel_file_assets () +{ + vector> c; + add_file_assets (c, _reels); return c; } -vector> -CPL::reel_mxfs () const +vector> +CPL::reel_file_assets () const { - vector> c; - - for (auto i: _reels) { - if (i->main_picture ()) { - c.push_back (i->main_picture()); - } - if (i->main_sound ()) { - c.push_back (i->main_sound()); - } - if (i->main_subtitle ()) { - c.push_back (i->main_subtitle()); - } - for (auto j: i->closed_captions()) { - c.push_back (j); - } - if (i->atmos ()) { - c.push_back (i->atmos()); - } - } - + vector> c; + add_file_assets (c, _reels); return c; } -- cgit v1.2.3