#include "element_info.h"

// !! ATTENTION ATTENTION ATTENTION !!
// This file is auto-generated by the "dev:update-element-info" rake target.
// !! ATTENTION ATTENTION ATTENTION !!

std::map<uint32_t, std::string> g_element_names;

void
init_element_names() {
  g_element_names[0x47e8]     = "AESSettingsCipherMode";
  g_element_names[0x61a7]     = "AttachedFile";
  g_element_names[0x1941a469] = "Attachments";
  g_element_names[0x6264]     = "AudioBitDepth";
  g_element_names[0x9f]       = "AudioChannels";
  g_element_names[0x78b5]     = "AudioOutputSamplingFreq";
  g_element_names[0x7d7b]     = "AudioPosition";
  g_element_names[0xb5]       = "AudioSamplingFreq";
  g_element_names[0xa1]       = "Block";
  g_element_names[0xee]       = "BlockAddID";
  g_element_names[0x41ed]     = "BlockAddIDExtraData";
  g_element_names[0x41a4]     = "BlockAddIDName";
  g_element_names[0x41e7]     = "BlockAddIDType";
  g_element_names[0x41f0]     = "BlockAddIDValue";
  g_element_names[0xa5]       = "BlockAdditional";
  g_element_names[0x41e4]     = "BlockAdditionMapping";
  g_element_names[0x75a1]     = "BlockAdditions";
  g_element_names[0x9b]       = "BlockDuration";
  g_element_names[0xa0]       = "BlockGroup";
  g_element_names[0xa6]       = "BlockMore";
  g_element_names[0xa2]       = "BlockVirtual";
  g_element_names[0x437d]     = "ChapLanguageIETF";
  g_element_names[0xb6]       = "ChapterAtom";
  g_element_names[0x437e]     = "ChapterCountry";
  g_element_names[0x80]       = "ChapterDisplay";
  g_element_names[0x4598]     = "ChapterFlagEnabled";
  g_element_names[0x98]       = "ChapterFlagHidden";
  g_element_names[0x437c]     = "ChapterLanguage";
  g_element_names[0x63c3]     = "ChapterPhysicalEquiv";
  g_element_names[0x6944]     = "ChapterProcess";
  g_element_names[0x6955]     = "ChapterProcessCodecID";
  g_element_names[0x6911]     = "ChapterProcessCommand";
  g_element_names[0x6933]     = "ChapterProcessData";
  g_element_names[0x450d]     = "ChapterProcessPrivate";
  g_element_names[0x6922]     = "ChapterProcessTime";
  g_element_names[0x1043a770] = "Chapters";
  g_element_names[0x6ebc]     = "ChapterSegmentEditionUID";
  g_element_names[0x6e67]     = "ChapterSegmentUID";
  g_element_names[0x4588]     = "ChapterSkipType";
  g_element_names[0x85]       = "ChapterString";
  g_element_names[0x5654]     = "ChapterStringUID";
  g_element_names[0x92]       = "ChapterTimeEnd";
  g_element_names[0x91]       = "ChapterTimeStart";
  g_element_names[0x8f]       = "ChapterTrack";
  g_element_names[0x89]       = "ChapterTrackNumber";
  g_element_names[0x6924]     = "ChapterTranslate";
  g_element_names[0x69bf]     = "ChapterTranslateCodec";
  g_element_names[0x69fc]     = "ChapterTranslateEditionUID";
  g_element_names[0x69a5]     = "ChapterTranslateID";
  g_element_names[0x73c4]     = "ChapterUID";
  g_element_names[0x1f43b675] = "Cluster";
  g_element_names[0xa7]       = "ClusterPosition";
  g_element_names[0xab]       = "ClusterPrevSize";
  g_element_names[0x58d7]     = "ClusterSilentTrackNumber";
  g_element_names[0x5854]     = "ClusterSilentTracks";
  g_element_names[0xe7]       = "ClusterTimecode";
  g_element_names[0xaa]       = "CodecDecodeAll";
  g_element_names[0x56aa]     = "CodecDelay";
  g_element_names[0x26b240]   = "CodecDownloadURL";
  g_element_names[0x86]       = "CodecID";
  g_element_names[0x3b4040]   = "CodecInfoURL";
  g_element_names[0x258688]   = "CodecName";
  g_element_names[0x63a2]     = "CodecPrivate";
  g_element_names[0x3a9697]   = "CodecSettings";
  g_element_names[0xa4]       = "CodecState";
  g_element_names[0x4254]     = "ContentCompAlgo";
  g_element_names[0x5034]     = "ContentCompression";
  g_element_names[0x4255]     = "ContentCompSettings";
  g_element_names[0x47e7]     = "ContentEncAESSettings";
  g_element_names[0x47e1]     = "ContentEncAlgo";
  g_element_names[0x47e2]     = "ContentEncKeyID";
  g_element_names[0x6240]     = "ContentEncoding";
  g_element_names[0x5031]     = "ContentEncodingOrder";
  g_element_names[0x6d80]     = "ContentEncodings";
  g_element_names[0x5032]     = "ContentEncodingScope";
  g_element_names[0x5033]     = "ContentEncodingType";
  g_element_names[0x5035]     = "ContentEncryption";
  g_element_names[0x47e5]     = "ContentSigAlgo";
  g_element_names[0x47e6]     = "ContentSigHashAlgo";
  g_element_names[0x47e4]     = "ContentSigKeyID";
  g_element_names[0x47e3]     = "ContentSignature";
  g_element_names[0x5378]     = "CueBlockNumber";
  g_element_names[0xf1]       = "CueClusterPosition";
  g_element_names[0xea]       = "CueCodecState";
  g_element_names[0xb2]       = "CueDuration";
  g_element_names[0xbb]       = "CuePoint";
  g_element_names[0x97]       = "CueRefCluster";
  g_element_names[0xeb]       = "CueRefCodecState";
  g_element_names[0xdb]       = "CueReference";
  g_element_names[0x535f]     = "CueRefNumber";
  g_element_names[0x96]       = "CueRefTime";
  g_element_names[0xf0]       = "CueRelativePosition";
  g_element_names[0x1c53bb6b] = "Cues";
  g_element_names[0xb3]       = "CueTime";
  g_element_names[0xf7]       = "CueTrack";
  g_element_names[0xb7]       = "CueTrackPositions";
  g_element_names[0x4461]     = "DateUTC";
  g_element_names[0x75a2]     = "DiscardPadding";
  g_element_names[0xff]       = "DummyElement";
  g_element_names[0x4489]     = "Duration";
  g_element_names[0xbf]       = "EBMLCrc32";
  g_element_names[0x4282]     = "EBMLDocType";
  g_element_names[0x4285]     = "EBMLDocTypeReadVersion";
  g_element_names[0x4287]     = "EBMLDocTypeVersion";
  g_element_names[0x1a45dfa3] = "EBMLHead";
  g_element_names[0x42f2]     = "EBMLMaxIdLength";
  g_element_names[0x42f3]     = "EBMLMaxSizeLength";
  g_element_names[0x42f7]     = "EBMLReadVersion";
  g_element_names[0x4286]     = "EBMLVersion";
  g_element_names[0xec]       = "EBMLVoid";
  g_element_names[0x4520]     = "EditionDisplay";
  g_element_names[0x45b9]     = "EditionEntry";
  g_element_names[0x45db]     = "EditionFlagDefault";
  g_element_names[0x45bd]     = "EditionFlagHidden";
  g_element_names[0x45dd]     = "EditionFlagOrdered";
  g_element_names[0x45e4]     = "EditionLanguageIETF";
  g_element_names[0x4521]     = "EditionString";
  g_element_names[0x45bc]     = "EditionUID";
  g_element_names[0x52f1]     = "Emphasis";
  g_element_names[0xaf]       = "EncryptedBlock";
  g_element_names[0x465c]     = "FileData";
  g_element_names[0x467e]     = "FileDescription";
  g_element_names[0x4660]     = "FileMimeType";
  g_element_names[0x466e]     = "FileName";
  g_element_names[0x4675]     = "FileReferral";
  g_element_names[0x46ae]     = "FileUID";
  g_element_names[0x4662]     = "FileUsedEndTime";
  g_element_names[0x4661]     = "FileUsedStartTime";
  g_element_names[0x55af]     = "FlagCommentary";
  g_element_names[0x55ab]     = "FlagHearingImpaired";
  g_element_names[0x55ae]     = "FlagOriginal";
  g_element_names[0xfa]       = "FlagReferenced";
  g_element_names[0x55ad]     = "FlagTextDescriptions";
  g_element_names[0x55ac]     = "FlagVisualImpaired";
  g_element_names[0x1549a966] = "Info";
  g_element_names[0x22b59d]   = "LanguageIETF";
  g_element_names[0x55ee]     = "MaxBlockAdditionID";
  g_element_names[0x4d80]     = "MuxingApp";
  g_element_names[0x3e83bb]   = "NextFilename";
  g_element_names[0x3eb923]   = "NextUID";
  g_element_names[0x53b9]     = "OldStereoMode";
  g_element_names[0x3c83ab]   = "PrevFilename";
  g_element_names[0x3cb923]   = "PrevUID";
  g_element_names[0xfb]       = "ReferenceBlock";
  g_element_names[0xc8]       = "ReferenceFrame";
  g_element_names[0xc9]       = "ReferenceOffset";
  g_element_names[0xca]       = "ReferenceTimeCode";
  g_element_names[0xfd]       = "ReferenceVirtual";
  g_element_names[0x114d9b74] = "SeekHeader";
  g_element_names[0x53ab]     = "SeekID";
  g_element_names[0x4dbb]     = "SeekPoint";
  g_element_names[0x53ac]     = "SeekPosition";
  g_element_names[0x56bb]     = "SeekPreRoll";
  g_element_names[0x18538067] = "Segment";
  g_element_names[0x4444]     = "SegmentFamily";
  g_element_names[0x7384]     = "SegmentFilename";
  g_element_names[0x73a4]     = "SegmentUID";
  g_element_names[0xa3]       = "SimpleBlock";
  g_element_names[0xcb]       = "SliceBlockAddID";
  g_element_names[0xce]       = "SliceDelay";
  g_element_names[0xcf]       = "SliceDuration";
  g_element_names[0xcd]       = "SliceFrameNumber";
  g_element_names[0xcc]       = "SliceLaceNumber";
  g_element_names[0x8e]       = "Slices";
  g_element_names[0x7373]     = "Tag";
  g_element_names[0x63c6]     = "TagAttachmentUID";
  g_element_names[0x4485]     = "TagBinary";
  g_element_names[0x63c4]     = "TagChapterUID";
  g_element_names[0x4484]     = "TagDefault";
  g_element_names[0x44b4]     = "TagDefaultBogus";
  g_element_names[0x63c9]     = "TagEditionUID";
  g_element_names[0x447a]     = "TagLanguage";
  g_element_names[0x447b]     = "TagLanguageIETF";
  g_element_names[0x45a3]     = "TagName";
  g_element_names[0x1254c367] = "Tags";
  g_element_names[0x67c8]     = "TagSimple";
  g_element_names[0x4487]     = "TagString";
  g_element_names[0x63c0]     = "TagTargets";
  g_element_names[0x63ca]     = "TagTargetType";
  g_element_names[0x68ca]     = "TagTargetTypeValue";
  g_element_names[0x63c5]     = "TagTrackUID";
  g_element_names[0x2ad7b1]   = "TimecodeScale";
  g_element_names[0xe8]       = "TimeSlice";
  g_element_names[0x7ba9]     = "Title";
  g_element_names[0x7446]     = "TrackAttachmentLink";
  g_element_names[0xe1]       = "TrackAudio";
  g_element_names[0xe3]       = "TrackCombinePlanes";
  g_element_names[0x234e7a]   = "TrackDefaultDecodedFieldDuration";
  g_element_names[0x23e383]   = "TrackDefaultDuration";
  g_element_names[0xae]       = "TrackEntry";
  g_element_names[0x88]       = "TrackFlagDefault";
  g_element_names[0xb9]       = "TrackFlagEnabled";
  g_element_names[0x55aa]     = "TrackFlagForced";
  g_element_names[0x9c]       = "TrackFlagLacing";
  g_element_names[0xe9]       = "TrackJoinBlocks";
  g_element_names[0xed]       = "TrackJoinUID";
  g_element_names[0x22b59c]   = "TrackLanguage";
  g_element_names[0x6df8]     = "TrackMaxCache";
  g_element_names[0x6de7]     = "TrackMinCache";
  g_element_names[0x536e]     = "TrackName";
  g_element_names[0xd7]       = "TrackNumber";
  g_element_names[0x537f]     = "TrackOffset";
  g_element_names[0xe2]       = "TrackOperation";
  g_element_names[0x6fab]     = "TrackOverlay";
  g_element_names[0xe4]       = "TrackPlane";
  g_element_names[0xe6]       = "TrackPlaneType";
  g_element_names[0xe5]       = "TrackPlaneUID";
  g_element_names[0x1654ae6b] = "Tracks";
  g_element_names[0x23314f]   = "TrackTimecodeScale";
  g_element_names[0x6624]     = "TrackTranslate";
  g_element_names[0x66bf]     = "TrackTranslateCodec";
  g_element_names[0x66fc]     = "TrackTranslateEditionUID";
  g_element_names[0x66a5]     = "TrackTranslateTrackID";
  g_element_names[0x83]       = "TrackType";
  g_element_names[0x73c5]     = "TrackUID";
  g_element_names[0xe0]       = "TrackVideo";
  g_element_names[0xc4]       = "TrickMasterTrackSegmentUID";
  g_element_names[0xc7]       = "TrickMasterTrackUID";
  g_element_names[0xc6]       = "TrickTrackFlag";
  g_element_names[0xc1]       = "TrickTrackSegmentUID";
  g_element_names[0xc0]       = "TrickTrackUID";
  g_element_names[0x53c0]     = "VideoAlphaMode";
  g_element_names[0x54b3]     = "VideoAspectRatio";
  g_element_names[0x55d5]     = "VideoBChromaX";
  g_element_names[0x55d6]     = "VideoBChromaY";
  g_element_names[0x55b2]     = "VideoBitsPerChannel";
  g_element_names[0x55b5]     = "VideoCbSubsampHorz";
  g_element_names[0x55b6]     = "VideoCbSubsampVert";
  g_element_names[0x55b7]     = "VideoChromaSitHorz";
  g_element_names[0x55b8]     = "VideoChromaSitVert";
  g_element_names[0x55b3]     = "VideoChromaSubsampHorz";
  g_element_names[0x55b4]     = "VideoChromaSubsampVert";
  g_element_names[0x55b0]     = "VideoColour";
  g_element_names[0x55d0]     = "VideoColourMasterMeta";
  g_element_names[0x55b1]     = "VideoColourMatrix";
  g_element_names[0x55bc]     = "VideoColourMaxCLL";
  g_element_names[0x55bd]     = "VideoColourMaxFALL";
  g_element_names[0x55bb]     = "VideoColourPrimaries";
  g_element_names[0x55b9]     = "VideoColourRange";
  g_element_names[0x2eb524]   = "VideoColourSpace";
  g_element_names[0x55ba]     = "VideoColourTransferCharacter";
  g_element_names[0x54ba]     = "VideoDisplayHeight";
  g_element_names[0x54b2]     = "VideoDisplayUnit";
  g_element_names[0x54b0]     = "VideoDisplayWidth";
  g_element_names[0x9d]       = "VideoFieldOrder";
  g_element_names[0x9a]       = "VideoFlagInterlaced";
  g_element_names[0x2383e3]   = "VideoFrameRate";
  g_element_names[0x2fb523]   = "VideoGamma";
  g_element_names[0x55d3]     = "VideoGChromaX";
  g_element_names[0x55d4]     = "VideoGChromaY";
  g_element_names[0x55d9]     = "VideoLuminanceMax";
  g_element_names[0x55da]     = "VideoLuminanceMin";
  g_element_names[0x54aa]     = "VideoPixelCropBottom";
  g_element_names[0x54cc]     = "VideoPixelCropLeft";
  g_element_names[0x54dd]     = "VideoPixelCropRight";
  g_element_names[0x54bb]     = "VideoPixelCropTop";
  g_element_names[0xba]       = "VideoPixelHeight";
  g_element_names[0xb0]       = "VideoPixelWidth";
  g_element_names[0x7670]     = "VideoProjection";
  g_element_names[0x7674]     = "VideoProjectionPosePitch";
  g_element_names[0x7675]     = "VideoProjectionPoseRoll";
  g_element_names[0x7673]     = "VideoProjectionPoseYaw";
  g_element_names[0x7672]     = "VideoProjectionPrivate";
  g_element_names[0x7671]     = "VideoProjectionType";
  g_element_names[0x55d1]     = "VideoRChromaX";
  g_element_names[0x55d2]     = "VideoRChromaY";
  g_element_names[0x53b8]     = "VideoStereoMode";
  g_element_names[0x55d7]     = "VideoWhitePointChromaX";
  g_element_names[0x55d8]     = "VideoWhitePointChromaY";
  g_element_names[0x5741]     = "WritingApp";
}

uint32_t
element_name_to_id(const std::string &name) {
  std::map<uint32_t, std::string>::const_iterator i;
  for (i = g_element_names.begin(); g_element_names.end() != i; ++i)
    if (i->second == name)
      return i->first;

  return 0;
}

std::map<uint32_t, bool> g_master_information;

void
init_master_information() {
  const char *s_master_names[] = {
    "AttachedFile",
    "Attachments",
    "BlockAdditionMapping",
    "BlockAdditions",
    "BlockGroup",
    "BlockMore",
    "ChapterAtom",
    "ChapterDisplay",
    "ChapterProcess",
    "ChapterProcessCommand",
    "Chapters",
    "ChapterTrack",
    "ChapterTranslate",
    "Cluster",
    "ClusterSilentTracks",
    "ContentCompression",
    "ContentEncAESSettings",
    "ContentEncoding",
    "ContentEncodings",
    "ContentEncryption",
    "CuePoint",
    "CueReference",
    "Cues",
    "CueTrackPositions",
    "EBMLHead",
    "EditionDisplay",
    "EditionEntry",
    "Info",
    "ReferenceFrame",
    "SeekHeader",
    "SeekPoint",
    "Segment",
    "Slices",
    "Tag",
    "Tags",
    "TagSimple",
    "TagTargets",
    "TimeSlice",
    "TrackAudio",
    "TrackCombinePlanes",
    "TrackEntry",
    "TrackJoinBlocks",
    "TrackOperation",
    "TrackPlane",
    "Tracks",
    "TrackTranslate",
    "TrackVideo",
    "VideoColour",
    "VideoColourMasterMeta",
    "VideoProjection",
    nullptr
  };

  int i;
  for (i = 0; s_master_names[i]; ++i) {
    uint32_t id = element_name_to_id(s_master_names[i]);
    if (0 != id)
      g_master_information[id] = true;
  }
}
