X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Futil.h;h=6cb818b3976ad81db3ea366b6e2ecf078475b97d;hb=14b8b29e6660f5a7fb21135fb5f90b4c1ce51a4b;hp=bdf2480fcd5ae08bd9108f730421835a89072931;hpb=9da0bac018e0e7dcad0c1aafaa7f6be6d434da96;p=dcpomatic.git diff --git a/src/lib/util.h b/src/lib/util.h index bdf2480fc..6cb818b39 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -29,9 +29,11 @@ #include "dcpomatic_time.h" #include "audio_mapping.h" #include +#include #include #include #include +#include #include #include #include @@ -67,6 +69,7 @@ extern bool is_batch_converter; struct AVSubtitle; class AudioBuffers; +class TextDecoder; extern std::string seconds_to_hms (int); extern std::string time_to_hmsf (DCPTime time, Frame rate); @@ -100,9 +103,23 @@ extern boost::shared_ptr remap (boost::shared_ptr decoder); #ifdef DCPOMATIC_VARIANT_SWAROOP extern boost::shared_ptr read_swaroop_chain (boost::filesystem::path path); extern void write_swaroop_chain (boost::shared_ptr chain, boost::filesystem::path output); #endif +template +std::list +vector_to_list (std::vector v) +{ + std::list l; + BOOST_FOREACH (T& i, v) { + l.push_back (i); + } + return l; +} + #endif