X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=dabef62bb24b230a46aeea506d06a29b14fb166b;hb=960c69dcaef94e0e4fbbaa9721d5ea6a4a744726;hp=daa88282d755cfd8b6e9f3d3b4c9f576de9ee5da;hpb=919220417db76c90e417144dbc8c31493561da11;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index daa88282d..dabef62bb 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -815,6 +815,22 @@ Film::subtitle_languages () const } +vector +Film::closed_caption_languages() const +{ + vector result; + for (auto i: content()) { + for (auto text: i->text) { + if (text->use() && text->type() == TextType::CLOSED_CAPTION && text->dcp_track() && text->dcp_track()->language) { + result.push_back(*text->dcp_track()->language); + } + } + } + + return result; +} + + /** @return a ISDCF-compliant name for a DCP of this film */ string Film::isdcf_name (bool if_created_now) const