Expand Player to support main and sign language video types.
[dcpomatic.git] / src / lib / util.cc
index 086a99f243784439f6877065e8c89953f0114b20..652b5d83f1ca6f676ad366fb8e992a43cd09ec6f 100644 (file)
@@ -815,16 +815,6 @@ remap (shared_ptr<const AudioBuffers> input, int output_channels, AudioMapping m
        return mapped;
 }
 
-Eyes
-increment_eyes (Eyes e)
-{
-       if (e == Eyes::LEFT) {
-               return Eyes::RIGHT;
-       }
-
-       return Eyes::LEFT;
-}
-
 
 size_t
 utf8_strlen (string s)
@@ -1053,3 +1043,15 @@ contains_assetmap(boost::filesystem::path dir)
        return boost::filesystem::is_regular_file(dir / "ASSETMAP") || boost::filesystem::is_regular_file(dir / "ASSETMAP.xml");
 }
 
+
+bool
+contains_sign_language(ContentList const& content)
+{
+       return std::any_of(
+               content.begin(),
+               content.end(),
+               [](shared_ptr<const Content> c) {
+                       return c->video && c->video->type() == VideoType::SIGN_LANGUAGE;
+               });
+}
+