X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Ftypes.h;h=42e2e3eecd2c8d6801e3b6563ecdcf53a5b116d4;hb=4fe1a062eb31d680b8b4ac0191b9e2fc2d6aaec3;hp=ed3746f45ae5c99e76cbaea0461130273cccec0f;hpb=c6871fe8617b3de03662b7630355059393bf8043;p=dcpomatic.git diff --git a/src/lib/types.h b/src/lib/types.h index ed3746f45..42e2e3eec 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -31,7 +31,7 @@ class Content; class VideoContent; class AudioContent; -class SubtitleContent; +class TextContent; class FFmpegContent; namespace cxml { @@ -80,6 +80,8 @@ namespace xmlpp { #define BATCH_SERVER_PRESENCE_PORT (Config::instance()->server_port_base()+3) /** Port on which batch converter listens for job requests */ #define BATCH_JOB_PORT (Config::instance()->server_port_base()+4) +/** Port on which player listens for play requests */ +#define PLAYER_PLAY_PORT (Config::instance()->server_port_base()+5) typedef std::vector > ContentList; typedef std::vector > FFmpegContentList; @@ -127,6 +129,31 @@ enum ReelType REELTYPE_BY_LENGTH }; +/** Type of captions. + * + * The generally accepted definitions seem to be: + * - subtitles: text for an audience who doesn't speak the film's language + * - captions: text for a hearing-impaired audience + * - open: on-screen + * - closed: only visible by some audience members + * + * At the moment DoM supports open subtitles and closed captions. + * + * There is some use of the word `subtitle' in the code which may mean + * caption in some contexts. + */ +enum TextType +{ + TEXT_UNKNOWN, + TEXT_OPEN_SUBTITLE, + TEXT_CLOSED_CAPTION, + TEXT_COUNT +}; + +extern std::string text_type_to_string (TextType t); +extern std::string text_type_to_name (TextType t); +extern TextType string_to_text_type (std::string s); + /** @struct Crop * @brief A description of the crop of an image or video. */