From cdc8bc6a7da0b4f8c3dbfcf560fea61473cf1ca3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 6 Sep 2020 20:10:13 +0200 Subject: Support MCA sound channel tags in MXF/CPL. --- src/types.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index 9a4b3e13..ed0b7b84 100644 --- a/src/types.h +++ b/src/types.h @@ -39,6 +39,7 @@ #define LIBDCP_TYPES_H #include +#include #include #include #include @@ -98,6 +99,20 @@ enum Channel { CHANNEL_COUNT = 16 }; + +enum MCASoundField +{ + FIVE_POINT_ONE, + SEVEN_POINT_ONE +}; + + +extern std::string channel_to_mca_id (Channel c, MCASoundField field); +extern Channel mca_id_to_channel (std::string); +extern std::string channel_to_mca_name (Channel c, MCASoundField field); +extern ASDCP::UL channel_to_mca_universal_label (Channel c, MCASoundField field, ASDCP::Dictionary const* dict); + + enum ContentKind { FEATURE, @@ -402,15 +417,10 @@ bool operator== (Luminance const& a, Luminance const& b); class MainSoundConfiguration { public: - enum Field { - FIVE_POINT_ONE, - SEVEN_POINT_ONE, - }; - MainSoundConfiguration (std::string); - MainSoundConfiguration (Field field_, int channels); + MainSoundConfiguration (MCASoundField field_, int channels); - Field field () const { + MCASoundField field () const { return _field; } @@ -424,7 +434,7 @@ public: std::string to_string () const; private: - Field _field; + MCASoundField _field; std::vector > _channels; }; -- cgit v1.2.3