// Generated by TOOLS/matroska.py, do not edit manually

#define EBML_ID_EBML                             0x1a45dfa3
#define EBML_ID_EBMLVERSION                      0x4286
#define EBML_ID_EBMLREADVERSION                  0x42f7
#define EBML_ID_EBMLMAXIDLENGTH                  0x42f2
#define EBML_ID_EBMLMAXSIZELENGTH                0x42f3
#define EBML_ID_DOCTYPE                          0x4282
#define EBML_ID_DOCTYPEVERSION                   0x4287
#define EBML_ID_DOCTYPEREADVERSION               0x4285
#define EBML_ID_CRC32                            0xbf
#define EBML_ID_VOID                             0xec
#define MATROSKA_ID_SEGMENT                      0x18538067
#define MATROSKA_ID_SEEKHEAD                     0x114d9b74
#define MATROSKA_ID_SEEK                         0x4dbb
#define MATROSKA_ID_SEEKID                       0x53ab
#define MATROSKA_ID_SEEKPOSITION                 0x53ac
#define MATROSKA_ID_INFO                         0x1549a966
#define MATROSKA_ID_SEGMENTUID                   0x73a4
#define MATROSKA_ID_PREVUID                      0x3cb923
#define MATROSKA_ID_NEXTUID                      0x3eb923
#define MATROSKA_ID_TIMECODESCALE                0x2ad7b1
#define MATROSKA_ID_DATEUTC                      0x4461
#define MATROSKA_ID_TITLE                        0x7ba9
#define MATROSKA_ID_MUXINGAPP                    0x4d80
#define MATROSKA_ID_WRITINGAPP                   0x5741
#define MATROSKA_ID_DURATION                     0x4489
#define MATROSKA_ID_CLUSTER                      0x1f43b675
#define MATROSKA_ID_TIMECODE                     0xe7
#define MATROSKA_ID_BLOCKGROUP                   0xa0
#define MATROSKA_ID_BLOCK                        0xa1
#define MATROSKA_ID_BLOCKDURATION                0x9b
#define MATROSKA_ID_REFERENCEBLOCK               0xfb
#define MATROSKA_ID_SIMPLEBLOCK                  0xa3
#define MATROSKA_ID_TRACKS                       0x1654ae6b
#define MATROSKA_ID_TRACKENTRY                   0xae
#define MATROSKA_ID_TRACKNUMBER                  0xd7
#define MATROSKA_ID_TRACKUID                     0x73c5
#define MATROSKA_ID_TRACKTYPE                    0x83
#define MATROSKA_ID_FLAGENABLED                  0xb9
#define MATROSKA_ID_FLAGDEFAULT                  0x88
#define MATROSKA_ID_FLAGFORCED                   0x55aa
#define MATROSKA_ID_FLAGLACING                   0x9c
#define MATROSKA_ID_MINCACHE                     0x6de7
#define MATROSKA_ID_MAXCACHE                     0x6df8
#define MATROSKA_ID_DEFAULTDURATION              0x23e383
#define MATROSKA_ID_TRACKTIMECODESCALE           0x23314f
#define MATROSKA_ID_MAXBLOCKADDITIONID           0x55ee
#define MATROSKA_ID_NAME                         0x536e
#define MATROSKA_ID_LANGUAGE                     0x22b59c
#define MATROSKA_ID_CODECID                      0x86
#define MATROSKA_ID_CODECPRIVATE                 0x63a2
#define MATROSKA_ID_CODECDECODEALL               0xaa
#define MATROSKA_ID_VIDEO                        0xe0
#define MATROSKA_ID_FLAGINTERLACED               0x9a
#define MATROSKA_ID_PIXELWIDTH                   0xb0
#define MATROSKA_ID_PIXELHEIGHT                  0xba
#define MATROSKA_ID_DISPLAYWIDTH                 0x54b0
#define MATROSKA_ID_DISPLAYHEIGHT                0x54ba
#define MATROSKA_ID_DISPLAYUNIT                  0x54b2
#define MATROSKA_ID_FRAMERATE                    0x2383e3
#define MATROSKA_ID_AUDIO                        0xe1
#define MATROSKA_ID_SAMPLINGFREQUENCY            0xb5
#define MATROSKA_ID_OUTPUTSAMPLINGFREQUENCY      0x78b5
#define MATROSKA_ID_CHANNELS                     0x9f
#define MATROSKA_ID_BITDEPTH                     0x6264
#define MATROSKA_ID_CONTENTENCODINGS             0x6d80
#define MATROSKA_ID_CONTENTENCODING              0x6240
#define MATROSKA_ID_CONTENTENCODINGORDER         0x5031
#define MATROSKA_ID_CONTENTENCODINGSCOPE         0x5032
#define MATROSKA_ID_CONTENTENCODINGTYPE          0x5033
#define MATROSKA_ID_CONTENTCOMPRESSION           0x5034
#define MATROSKA_ID_CONTENTCOMPALGO              0x4254
#define MATROSKA_ID_CONTENTCOMPSETTINGS          0x4255
#define MATROSKA_ID_CUES                         0x1c53bb6b
#define MATROSKA_ID_CUEPOINT                     0xbb
#define MATROSKA_ID_CUETIME                      0xb3
#define MATROSKA_ID_CUETRACKPOSITIONS            0xb7
#define MATROSKA_ID_CUETRACK                     0xf7
#define MATROSKA_ID_CUECLUSTERPOSITION           0xf1
#define MATROSKA_ID_ATTACHMENTS                  0x1941a469
#define MATROSKA_ID_ATTACHEDFILE                 0x61a7
#define MATROSKA_ID_FILEDESCRIPTION              0x467e
#define MATROSKA_ID_FILENAME                     0x466e
#define MATROSKA_ID_FILEMIMETYPE                 0x4660
#define MATROSKA_ID_FILEDATA                     0x465c
#define MATROSKA_ID_FILEUID                      0x46ae
#define MATROSKA_ID_CHAPTERS                     0x1043a770
#define MATROSKA_ID_EDITIONENTRY                 0x45b9
#define MATROSKA_ID_EDITIONUID                   0x45bc
#define MATROSKA_ID_EDITIONFLAGHIDDEN            0x45bd
#define MATROSKA_ID_EDITIONFLAGDEFAULT           0x45db
#define MATROSKA_ID_EDITIONFLAGORDERED           0x45dd
#define MATROSKA_ID_CHAPTERATOM                  0xb6
#define MATROSKA_ID_CHAPTERUID                   0x73c4
#define MATROSKA_ID_CHAPTERTIMESTART             0x91
#define MATROSKA_ID_CHAPTERTIMEEND               0x92
#define MATROSKA_ID_CHAPTERFLAGHIDDEN            0x98
#define MATROSKA_ID_CHAPTERFLAGENABLED           0x4598
#define MATROSKA_ID_CHAPTERSEGMENTUID            0x6e67
#define MATROSKA_ID_CHAPTERSEGMENTEDITIONUID     0x6ebc
#define MATROSKA_ID_CHAPTERDISPLAY               0x80
#define MATROSKA_ID_CHAPSTRING                   0x85
#define MATROSKA_ID_CHAPLANGUAGE                 0x437c
#define MATROSKA_ID_CHAPCOUNTRY                  0x437e
#define MATROSKA_ID_TAGS                         0x1254c367
#define MATROSKA_ID_TAG                          0x7373
#define MATROSKA_ID_TARGETS                      0x63c0
#define MATROSKA_ID_TARGETTYPEVALUE              0x68ca
#define MATROSKA_ID_TARGETTRACKUID               0x63c5
#define MATROSKA_ID_TARGETEDITIONUID             0x63c9
#define MATROSKA_ID_TARGETCHAPTERUID             0x63c4
#define MATROSKA_ID_TARGETATTACHMENTUID          0x63c6
#define MATROSKA_ID_SIMPLETAG                    0x67c8
#define MATROSKA_ID_TAGNAME                      0x45a3
#define MATROSKA_ID_TAGLANGUAGE                  0x447a
#define MATROSKA_ID_TAGSTRING                    0x4487


struct ebml_simple_tag {
    struct bstr   tag_name;
    struct bstr   tag_language;
    struct bstr   tag_string;

    int  n_tag_name;
    int  n_tag_language;
    int  n_tag_string;
};

struct ebml_targets {
    uint64_t   target_type_value;
    uint64_t   target_track_uid;
    uint64_t   target_edition_uid;
    uint64_t   target_chapter_uid;
    uint64_t   target_attachment_uid;

    int  n_target_type_value;
    int  n_target_track_uid;
    int  n_target_edition_uid;
    int  n_target_chapter_uid;
    int  n_target_attachment_uid;
};

struct ebml_tag {
    struct ebml_targets      targets;
    struct ebml_simple_tag  *simple_tag;

    int  n_targets;
    int  n_simple_tag;
};

struct ebml_tags {
    struct ebml_tag  *tag;

    int  n_tag;
};

struct ebml_chapter_display {
    struct bstr   chap_string;
    struct bstr  *chap_language;
    struct bstr  *chap_country;

    int  n_chap_string;
    int  n_chap_language;
    int  n_chap_country;
};

struct ebml_chapter_atom {
    uint64_t                      chapter_uid;
    uint64_t                      chapter_time_start;
    uint64_t                      chapter_time_end;
    uint64_t                      chapter_flag_hidden;
    uint64_t                      chapter_flag_enabled;
    struct bstr                   chapter_segment_uid;
    uint64_t                      chapter_segment_edition_uid;
    struct ebml_chapter_display  *chapter_display;

    int  n_chapter_uid;
    int  n_chapter_time_start;
    int  n_chapter_time_end;
    int  n_chapter_flag_hidden;
    int  n_chapter_flag_enabled;
    int  n_chapter_segment_uid;
    int  n_chapter_segment_edition_uid;
    int  n_chapter_display;
};

struct ebml_edition_entry {
    uint64_t                   edition_uid;
    uint64_t                   edition_flag_hidden;
    uint64_t                   edition_flag_default;
    uint64_t                   edition_flag_ordered;
    struct ebml_chapter_atom  *chapter_atom;

    int  n_edition_uid;
    int  n_edition_flag_hidden;
    int  n_edition_flag_default;
    int  n_edition_flag_ordered;
    int  n_chapter_atom;
};

struct ebml_chapters {
    struct ebml_edition_entry  *edition_entry;

    int  n_edition_entry;
};

struct ebml_attached_file {
    struct bstr   file_description;
    struct bstr   file_name;
    struct bstr   file_mime_type;
    struct bstr   file_data;
    uint64_t      file_uid;

    int  n_file_description;
    int  n_file_name;
    int  n_file_mime_type;
    int  n_file_data;
    int  n_file_uid;
};

struct ebml_attachments {
    struct ebml_attached_file  *attached_file;

    int  n_attached_file;
};

struct ebml_cue_track_positions {
    uint64_t   cue_track;
    uint64_t   cue_cluster_position;

    int  n_cue_track;
    int  n_cue_cluster_position;
};

struct ebml_cue_point {
    uint64_t                          cue_time;
    struct ebml_cue_track_positions  *cue_track_positions;

    int  n_cue_time;
    int  n_cue_track_positions;
};

struct ebml_cues {
    struct ebml_cue_point  *cue_point;

    int  n_cue_point;
};

struct ebml_content_compression {
    uint64_t      content_comp_algo;
    struct bstr   content_comp_settings;

    int  n_content_comp_algo;
    int  n_content_comp_settings;
};

struct ebml_content_encoding {
    uint64_t                          content_encoding_order;
    uint64_t                          content_encoding_scope;
    uint64_t                          content_encoding_type;
    struct ebml_content_compression   content_compression;

    int  n_content_encoding_order;
    int  n_content_encoding_scope;
    int  n_content_encoding_type;
    int  n_content_compression;
};

struct ebml_content_encodings {
    struct ebml_content_encoding  *content_encoding;

    int  n_content_encoding;
};

struct ebml_audio {
    double     sampling_frequency;
    double     output_sampling_frequency;
    uint64_t   channels;
    uint64_t   bit_depth;

    int  n_sampling_frequency;
    int  n_output_sampling_frequency;
    int  n_channels;
    int  n_bit_depth;
};

struct ebml_video {
    uint64_t   flag_interlaced;
    uint64_t   pixel_width;
    uint64_t   pixel_height;
    uint64_t   display_width;
    uint64_t   display_height;
    uint64_t   display_unit;
    double     frame_rate;

    int  n_flag_interlaced;
    int  n_pixel_width;
    int  n_pixel_height;
    int  n_display_width;
    int  n_display_height;
    int  n_display_unit;
    int  n_frame_rate;
};

struct ebml_track_entry {
    uint64_t                        track_number;
    uint64_t                        track_uid;
    uint64_t                        track_type;
    uint64_t                        flag_enabled;
    uint64_t                        flag_default;
    uint64_t                        flag_forced;
    uint64_t                        flag_lacing;
    uint64_t                        min_cache;
    uint64_t                        max_cache;
    uint64_t                        default_duration;
    double                          track_timecode_scale;
    uint64_t                        max_block_addition_id;
    struct bstr                     name;
    struct bstr                     language;
    struct bstr                     codec_id;
    struct bstr                     codec_private;
    uint64_t                        codec_decode_all;
    struct ebml_video               video;
    struct ebml_audio               audio;
    struct ebml_content_encodings   content_encodings;

    int  n_track_number;
    int  n_track_uid;
    int  n_track_type;
    int  n_flag_enabled;
    int  n_flag_default;
    int  n_flag_forced;
    int  n_flag_lacing;
    int  n_min_cache;
    int  n_max_cache;
    int  n_default_duration;
    int  n_track_timecode_scale;
    int  n_max_block_addition_id;
    int  n_name;
    int  n_language;
    int  n_codec_id;
    int  n_codec_private;
    int  n_codec_decode_all;
    int  n_video;
    int  n_audio;
    int  n_content_encodings;
};

struct ebml_tracks {
    struct ebml_track_entry  *track_entry;

    int  n_track_entry;
};

struct ebml_block_group {
    struct bstr   block;
    uint64_t      block_duration;
    int64_t      *reference_block;

    int  n_block;
    int  n_block_duration;
    int  n_reference_block;
};

struct ebml_cluster {
    uint64_t                  timecode;
    struct ebml_block_group  *block_group;
    struct bstr              *simple_block;

    int  n_timecode;
    int  n_block_group;
    int  n_simple_block;
};

struct ebml_info {
    struct bstr   segment_uid;
    struct bstr   prev_uid;
    struct bstr   next_uid;
    uint64_t      timecode_scale;
    int64_t       date_utc;
    struct bstr   title;
    struct bstr   muxing_app;
    struct bstr   writing_app;
    double        duration;

    int  n_segment_uid;
    int  n_prev_uid;
    int  n_next_uid;
    int  n_timecode_scale;
    int  n_date_utc;
    int  n_title;
    int  n_muxing_app;
    int  n_writing_app;
    int  n_duration;
};

struct ebml_seek {
    uint32_t   seek_id;
    uint64_t   seek_position;

    int  n_seek_id;
    int  n_seek_position;
};

struct ebml_seek_head {
    struct ebml_seek  *seek;

    int  n_seek;
};

struct ebml_segment {
    struct ebml_seek_head    *seek_head;
    struct ebml_info         *info;
    struct ebml_cluster      *cluster;
    struct ebml_tracks       *tracks;
    struct ebml_cues          cues;
    struct ebml_attachments   attachments;
    struct ebml_chapters      chapters;
    struct ebml_tags         *tags;

    int  n_seek_head;
    int  n_info;
    int  n_cluster;
    int  n_tracks;
    int  n_cues;
    int  n_attachments;
    int  n_chapters;
    int  n_tags;
};

struct ebml_ebml {
    uint64_t      ebml_version;
    uint64_t      ebml_read_version;
    uint64_t      ebml_max_id_length;
    uint64_t      ebml_max_size_length;
    struct bstr   doc_type;
    uint64_t      doc_type_version;
    uint64_t      doc_type_read_version;

    int  n_ebml_version;
    int  n_ebml_read_version;
    int  n_ebml_max_id_length;
    int  n_ebml_max_size_length;
    int  n_doc_type;
    int  n_doc_type_version;
    int  n_doc_type_read_version;
};
extern const struct ebml_elem_desc ebml_ebml_desc;
extern const struct ebml_elem_desc ebml_segment_desc;
extern const struct ebml_elem_desc ebml_seek_head_desc;
extern const struct ebml_elem_desc ebml_seek_desc;
extern const struct ebml_elem_desc ebml_info_desc;
extern const struct ebml_elem_desc ebml_cluster_desc;
extern const struct ebml_elem_desc ebml_block_group_desc;
extern const struct ebml_elem_desc ebml_tracks_desc;
extern const struct ebml_elem_desc ebml_track_entry_desc;
extern const struct ebml_elem_desc ebml_video_desc;
extern const struct ebml_elem_desc ebml_audio_desc;
extern const struct ebml_elem_desc ebml_content_encodings_desc;
extern const struct ebml_elem_desc ebml_content_encoding_desc;
extern const struct ebml_elem_desc ebml_content_compression_desc;
extern const struct ebml_elem_desc ebml_cues_desc;
extern const struct ebml_elem_desc ebml_cue_point_desc;
extern const struct ebml_elem_desc ebml_cue_track_positions_desc;
extern const struct ebml_elem_desc ebml_attachments_desc;
extern const struct ebml_elem_desc ebml_attached_file_desc;
extern const struct ebml_elem_desc ebml_chapters_desc;
extern const struct ebml_elem_desc ebml_edition_entry_desc;
extern const struct ebml_elem_desc ebml_chapter_atom_desc;
extern const struct ebml_elem_desc ebml_chapter_display_desc;
extern const struct ebml_elem_desc ebml_tags_desc;
extern const struct ebml_elem_desc ebml_tag_desc;
extern const struct ebml_elem_desc ebml_targets_desc;
extern const struct ebml_elem_desc ebml_simple_tag_desc;

#define MAX_EBML_SUBELEMENTS 20
