diff --git a/spectool/schema_2_lavf_h.xsl b/spectool/schema_2_lavf_h.xsl
new file mode 100644
index 00000000..dff91c3f
--- /dev/null
+++ b/spectool/schema_2_lavf_h.xsl
@@ -0,0 +1,745 @@
+
+
+
+
+
+
+/*
+ * Matroska Semantic constants
+ * Copyright (c) 2003-2022 The FFmpeg Project
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFORMAT_MATROSKA_IDS_H
+#define AVFORMAT_MATROSKA_IDS_H
+
+/*
+ * Matroska element IDs, max. 32 bits
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif /* AVFORMAT_MATROSKA_IDS_H */
+
+
+
+
+
+
+
+ Missing TagDefault_Bug!
+
+
+
+
+
+
+
+
+
+
+
+
+
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+ y
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* toplevel segment */
+#define MATROSKA_ID_SEGMENT 0x18538067
+
+/* Matroska top-level master IDs */
+
+
+
+ /* IDs in the
+
+
+ PointEntry
+ TrackAudio
+ TrackVideo
+ SeekPoint
+ Content Encoding
+ block addition mapping
+ cuetrackposition
+
+
+
+
+
+ master */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FileDesc
+ ChapLang
+ BlockReference
+ ClusterPosition
+ ClusterPrevSize
+ ClusterTimecode
+ PointEntry
+ CueTrackPosition
+ TimecodeScale
+ SeekEntry
+ TagLang
+ TagTargets
+ TagTargets_AttachUID
+ TagTargets_ChapterUID
+ TagTargets_TrackUID
+ TagTargets_Type
+ TagTargets_TypeValue
+ ChapterPhysEquiv
+ AudioOutSamplingFreq
+ AudioSamplingFreq
+ TrackContentEncodings
+ TrackContentEncoding
+ EncodingCompression
+ EncodingCompAlgo
+ EncodingCompSettings
+ EncodingOrder
+ EncodingScope
+ EncodingType
+ EncodingEncryption
+ EncodingEncAESSettings
+ EncodingEncAlgo
+ EncodingEncKeyId
+ EncodingSigAlgo
+ EncodingSignature
+ EncodingSigKeyId
+ EncodingSigHashAlgo
+ TrackMaxBlkAddID
+ TrackBlkAddMapping
+ BlkAddIDValue
+ BlkAddIDName
+ BlkAddIDType
+ BlkAddIDExtraData
+ SeekPreRoll
+ TrackTimecodeScale
+ VideoAspectRatio
+ VideoColor
+ VideoColorSpace
+ VideoColorChromaSubHorz
+ VideoColorChromaSubVert
+ VideoColorCbSubHorz
+ VideoColorCbSubVert
+ VideoColorMasteringMeta
+ VideoColorMatrixCoeff
+ Audio
+ VideoPixelCrop
+
+ VideoColor_
+
+
+ VideoColor_WHITE
+
+ VideoColor_
+ VideoColor
+ Video
+ Track
+
+
+
+
+
+
+
+ #define MATROSKA_ID_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A
+ B
+ C
+ D
+ E
+ F
+ A
+
+
+
+
+
+
+
+
+ 0x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRACK_ENCODING_COMP
+ TRACK_TYPE
+ VIDEO_PROJECTION_TYPE
+ VIDEO_INTERLACE_FLAG
+ VIDEO_STEREOMODE_TYPE
+ COLOUR_
+ VIDEO_
+
+
+
+
+
+
+ 12
+ 9
+ 19
+ 13
+ 19
+ 12
+ 13
+ 17
+
+
+ typedef enum {
+
+
+ MATROSKA_TRACK_TYPE_NONE = 0x0,
+
+
+
+ MATROSKA_
+
+ _
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
+ MATROSKA_COLOUR_CHROMASITINGHORZ_NB
+ MATROSKA_COLOUR_CHROMASITINGVERT_NB
+ MATROSKA_VIDEO_STEREOMODE_TYPE_NB,
+
+
+ } Matroska
+
+ TrackEncodingCompAlgo
+ ColourChromaSitingHorz
+ ColourChromaSitingVert
+ VideoInterlaceFlag
+ VideoStereoModeType
+ Video
+
+
+ ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spectool/schema_2_lavf_sem_c.xsl b/spectool/schema_2_lavf_sem_c.xsl
new file mode 100644
index 00000000..a867fabf
--- /dev/null
+++ b/spectool/schema_2_lavf_sem_c.xsl
@@ -0,0 +1,1219 @@
+
+
+
+
+
+ /*
+ * Matroska file semantic definition
+ * Copyright (c) 2003-2022 The FFmpeg Project
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Matroska file semantic element definitions
+ * @author Ronald Bultje <rbultje@ronald.bitfreak.net>
+ * @author with a little help from Moritz Bunkus <moritz@bunkus.org>
+ * @author totally reworked by Aurelien Jacobs <aurel@gnuage.org>
+ * @author Split from decoder by Steve Lhomme <slhomme@matroska.org>
+ * @see specs available on the Matroska project page: http://www.matroska.org/
+ */
+
+#include "config.h"
+
+#include <inttypes.h>
+
+#include "matroskasem.h"
+
+#define CHILD_OF(parent) { .def = { .n = parent } }
+
+// The following forward declarations need their size because
+// a tentative definition with internal linkage must not be an
+// incomplete type (6.7.2 in C90, 6.9.2 in C99).
+// Removing the sizes breaks MSVC.
+
+
+
+
+static EbmlSyntax ebml_header[] = {
+ { EBML_ID_EBMLREADVERSION, EBML_UINT, 0, 0, offsetof(Ebml, version), { .u = EBML_VERSION } },
+ { EBML_ID_EBMLMAXSIZELENGTH, EBML_UINT, 0, 0, offsetof(Ebml, max_size), { .u = 8 } },
+ { EBML_ID_EBMLMAXIDLENGTH, EBML_UINT, 0, 0, offsetof(Ebml, id_length), { .u = 4 } },
+ { EBML_ID_DOCTYPE, EBML_STR, 0, 0, offsetof(Ebml, doctype), { .s = "(none)" } },
+ { EBML_ID_DOCTYPEREADVERSION, EBML_UINT, 0, 0, offsetof(Ebml, doctype_version), { .u = 1 } },
+ { EBML_ID_EBMLVERSION, EBML_NONE },
+ { EBML_ID_DOCTYPEVERSION, EBML_NONE },
+ CHILD_OF(ebml_syntax)
+};
+
+EbmlSyntax ebml_syntax[] = {
+ { EBML_ID_HEADER, EBML_NEST, 0, 0, 0, { .n = ebml_header } },
+ { MATROSKA_ID_SEGMENT, EBML_STOP },
+ { 0 }
+};
+
+
+
+
+
+
+
+
+EbmlSyntax matroska_segments[] = {
+ { MATROSKA_ID_SEGMENT, EBML_NEST, 0, 0, 0, { .n = matroska_segment } },
+ { 0 }
+};
+
+EbmlSyntax matroska_cluster_enter[] = {
+ { MATROSKA_ID_CLUSTER, EBML_NEST, 0, 0, 0, { .n = &matroska_cluster_parsing[2] } },
+ { 0 }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //
+
+ static EbmlSyntax matroska_
+
+
+
+ [
+
+
+
+
+
+
+
+
+
+
+
+
+ ];
+
+
+
+
+
+
+
+
+ Missing TagDefault_Bug!
+
+
+
+
+
+
+
+ y
+ y
+ y
+
+
+
+
+
+
+
+
+
+
+
// The following array contains SimpleBlock and BlockGroup twice
+
// in order to reuse the other values for matroska_cluster_enter.
+
+
+
+
+
+
+
+
+
+
+
+
+ static
+
+ EbmlSyntax matroska_
+
+
+
+ [] = {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { MATROSKA_ID_SIMPLEBLOCK, EBML_STOP },
+ { MATROSKA_ID_BLOCKGROUP, EBML_STOP },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { 1, EBML_UINT, 0, 0, offsetof(MatroskaBlock, non_simple), { .u = 1 } },
+
+
+
+
+ { 0 } /* We don't want to go back to level 0, so don't add the parent. */
+
+
+ CHILD_OF(matroska_
+
+
+
+
+
+
+
+
+ )
+
+
+ };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ y
+
+
+
+
+
+
+
+
+
+ y
+
+
+
+
+
+
+
+
+
+ date_utc
+ duration
+ muxingapp
+ title
+ STOP
+ time_scale
+ tracks
+ num
+ name
+ uid
+ type
+ codec_id
+ flag_default
+ flag_forced
+ flag_hearingimpaired
+ flag_visualimpaired
+ flag_textdescriptions
+ flag_original
+ flag_comment
+ codec_delay
+ codec_priv
+ seek_preroll
+ video
+ audio
+ operation
+ name
+ max_block_additional_id
+ language
+ time_scale
+ default_duration
+ encodings
+ scope
+ type
+ compression
+ encryption
+ algo
+ settings
+ algo
+ key_id
+ combine_planes
+ uid
+ type
+ interlaced
+ field_order
+ pixel_width
+ pixel_height
+ stereo_mode
+ alpha_mode
+ display_width
+ display_height
+ display_unit
+ color
+ projection
+ frame_rate
+ color_space
+ matrix_coefficients
+ bits_per_channel
+ chroma_sub_horz
+ chroma_sub_vert
+ cb_sub_horz
+ cb_sub_vert
+ chroma_siting_horz
+ chroma_siting_vert
+ range
+ transfer_characteristics
+ primaries
+ max_cll
+ max_fall
+ mastering_meta
+ r_x
+ r_y
+ g_x
+ g_y
+ b_x
+ b_y
+ white_x
+ white_y
+ max_luminance
+ min_luminance
+ type
+ private
+ yaw
+ pitch
+ roll
+ channels
+ samplerate
+ out_samplerate
+ bitdepth
+ index
+ time
+ pos
+ time
+ pos
+ track
+ target
+ block_addition_mappings
+ value
+ name
+ type
+ extradata
+
+
+ sub
+ tag
+
+
+ attachments
+ bin
+ mime
+ description
+ filename
+ uid
+ bin
+ timecode
+ duration
+ bin
+ reference
+ discard_padding
+ tags
+ chapteruid
+ trackuid
+ attachuid
+ type
+ typevalue
+ seekhead
+ id
+ pos
+
+
+
+ chapters
+
+
+ additional
+ additional_id
+ start
+ end
+ uid
+ title
+ lang
+ def
+ def
+ string
+ name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MatroskaTrack
+ MatroskaTrackEncoding
+ MatroskaTrackPlane
+ MatroskaTrackVideoColor
+ MatroskaIndex
+ MatroskaIndexPos
+ MatroskaAttachment
+ MatroskaSeekhead
+ MatroskaTags
+ MatroskaTag
+ MatroskaBlockAdditionMapping
+ MatroskaChapter
+
+
+
+
+
+
+
+
+
+
+
+
+ MatroskaDemuxContext
+ MatroskaDemuxContext
+ MatroskaDemuxContext
+ MatroskaDemuxContext
+ MatroskaDemuxContext
+ MatroskaDemuxContext
+ MatroskaTrackOperation
+ MatroskaTrackEncryption
+ MatroskaTrackCompression
+ MatroskaTrack
+ MatroskaTrackVideo
+ MatroskaTrackAudio
+ MatroskaMasteringMeta
+ MatroskaTrackVideoProjection
+ MatroskaCluster
+ MatroskaBlock
+ MatroskaTagTarget
+ MatroskaBlock
+ MatroskaDemuxContext
+ MatroskaChapter
+ MatroskaBlockAdditionMapping
+
+
+
+
+
+
+
+
+
+ track
+ index
+ index_entry
+ track_audio
+ track_video
+ track_operation
+ seekhead_entry
+ track_encodings
+ track_encoding
+ track_encoding_compression
+ track_encoding_encryption
+ track_combine_planes
+ track_plane
+ track_video_color
+ track_video_projection
+ mastering_meta
+ index_pos
+ tagtargets
+ attachment
+ chapter
+ cluster_parsing
+ chapter_entry
+ chapter_display
+ block_addition_mapping
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FileDesc
+ ChapLang
+ BlockReference
+ ClusterPosition
+ ClusterPrevSize
+ ClusterTimecode
+ PointEntry
+ CueTrackPosition
+ TimecodeScale
+ SeekEntry
+ TagLang
+ TagTargets
+ TagTargets_AttachUID
+ TagTargets_ChapterUID
+ TagTargets_TrackUID
+ TagTargets_Type
+ TagTargets_TypeValue
+ ChapterPhysEquiv
+ AudioOutSamplingFreq
+ AudioSamplingFreq
+ TrackContentEncodings
+ TrackContentEncoding
+ EncodingCompression
+ EncodingCompAlgo
+ EncodingCompSettings
+ EncodingOrder
+ EncodingScope
+ EncodingType
+ EncodingEncryption
+ EncodingEncAESSettings
+ EncodingEncAlgo
+ EncodingEncKeyId
+ EncodingSigAlgo
+ EncodingSignature
+ EncodingSigKeyId
+ EncodingSigHashAlgo
+ TrackMaxBlkAddID
+ TrackBlkAddMapping
+ BlkAddIDValue
+ BlkAddIDName
+ BlkAddIDType
+ BlkAddIDExtraData
+ SeekPreRoll
+ TrackTimecodeScale
+ VideoAspectRatio
+ VideoColor
+ VideoColorSpace
+ VideoColorChromaSubHorz
+ VideoColorChromaSubVert
+ VideoColorCbSubHorz
+ VideoColorCbSubVert
+ VideoColorMasteringMeta
+ VideoColorMatrixCoeff
+ Audio
+ VideoPixelCrop
+
+ VideoColor_
+
+
+ VideoColor_WHITE
+
+ VideoColor_
+ VideoColor
+ Video
+ Track
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ matroska_
+
+
+
+
+
+
+
+ MATROSKA_VIDEO_INTERLACE_FLAG_UNDETERMINED
+ MATROSKA_VIDEO_FIELDORDER_UNDETERMINED
+ MATROSKA_VIDEO_STEREOMODE_TYPE_NB
+ MATROSKA_VIDEO_PROJECTION_TYPE_RECTANGULAR
+ AVCOL_SPC_UNSPECIFIED
+ AVCOL_PRI_UNSPECIFIED
+ AVCOL_TRC_UNSPECIFIED
+ AVCOL_RANGE_UNSPECIFIED
+ MATROSKA_COLOUR_CHROMASITINGHORZ_UNDETERMINED
+ MATROSKA_COLOUR_CHROMASITINGVERT_UNDETERMINED
+ -1
+ -1
+ MATROSKA_VIDEO_DISPLAYUNIT_PIXELS
+
+ AV_NOPTS_VALUE
+ AV_NOPTS_VALUE
+ -1
+ MATROSKA_TRACK_ENCODING_COMP_ZLIB
+ 1.0
+ 0.0
+ 8000.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { MATROSKA_ID_
+
+
+
+
+
+ ,
+
+
+
+
+
+
+
+
+ EBML_STOP
+
+
+
+ EBML_UINT
+
+
+
+
+ EBML_LEVEL1
+
+
+ EBML_NONE
+
+
+
+
+
+
+
+
+
+ EBML_NONE
+ EBML_NEST
+
+
+
+
+
+ EBML_NONE
+
+
+ EBML_UINT
+
+
+ EBML_SINT
+
+
+ EBML_UTF8
+
+
+ EBML_STR
+
+
+ EBML_BIN
+
+
+ EBML_BIN
+
+
+ EBML_FLOAT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1,
+ 1,
+ 1,
+
+ 0,
+
+
+
+
+ 0,
+
+
+
+
+ 0,
+
+
+
+
+
+
+
+
+
+
+ 0,
+
+
+
+
+ 0,
+
+
+
+
+ sizeof(
+
+ ),
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MatroskaBlock
+
+
+
+
+
+
+
+
+
+
+ offsetof(
+
+ ,
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ , {
+
+
+ .u =
+
+
+ .i =
+
+
+ .f =
+
+
+ .s = "
+
+
+ .s = "
+
+
+ .n =
+
+
+
+
+
+ "
+
+
+ "
+
+
+ }
+
+
+
+ },
+
+
+
+