Display only required tabs, including subs / ccap.
[dcpomatic.git] / src / lib / types.cc
index 97373b24ee52a481f803f35e44e28863b3f46258..5474b609adfc2fdd2f43e18ad9d471465155eac4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -25,6 +25,8 @@
 #include <libxml++/libxml++.h>
 #include <libcxml/cxml.h>
 
+#include "i18n.h"
+
 using std::max;
 using std::min;
 using std::string;
@@ -116,6 +118,19 @@ caption_type_to_string (CaptionType t)
        }
 }
 
+string
+caption_type_to_name (CaptionType t)
+{
+       switch (t) {
+       case CAPTION_OPEN:
+               return _("Subtitles");
+       case CAPTION_CLOSED:
+               return _("Closed captions");
+       default:
+               DCPOMATIC_ASSERT (false);
+       }
+}
+
 string
 video_frame_type_to_string (VideoFrameType t)
 {