2007-06-05 01:10:54 +03:00
|
|
|
/*
|
|
|
|
* Matroska constants
|
2016-04-27 19:45:23 +02:00
|
|
|
* Copyright (c) 2003-2004 The FFmpeg project
|
2007-06-05 01:10:54 +03:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#ifndef AVFORMAT_MATROSKA_H
|
|
|
|
#define AVFORMAT_MATROSKA_H
|
2007-06-05 01:10:54 +03:00
|
|
|
|
2021-05-21 19:56:46 +02:00
|
|
|
#include "libavcodec/codec_id.h"
|
2009-03-01 02:12:08 +02:00
|
|
|
#include "metadata.h"
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* EBML version supported */
|
|
|
|
#define EBML_VERSION 1
|
|
|
|
|
|
|
|
/* top-level master-IDs */
|
|
|
|
#define EBML_ID_HEADER 0x1A45DFA3
|
|
|
|
|
|
|
|
/* IDs in the HEADER master */
|
|
|
|
#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
|
|
|
|
|
|
|
|
/* general EBML types */
|
|
|
|
#define EBML_ID_VOID 0xEC
|
2008-08-14 00:15:15 +03:00
|
|
|
#define EBML_ID_CRC32 0xBF
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/*
|
2008-08-06 00:46:10 +03:00
|
|
|
* Matroska element IDs, max. 32 bits
|
2007-06-05 01:10:54 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* toplevel segment */
|
|
|
|
#define MATROSKA_ID_SEGMENT 0x18538067
|
|
|
|
|
2008-08-05 11:28:57 +03:00
|
|
|
/* Matroska top-level master IDs */
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_INFO 0x1549A966
|
|
|
|
#define MATROSKA_ID_TRACKS 0x1654AE6B
|
|
|
|
#define MATROSKA_ID_CUES 0x1C53BB6B
|
|
|
|
#define MATROSKA_ID_TAGS 0x1254C367
|
|
|
|
#define MATROSKA_ID_SEEKHEAD 0x114D9B74
|
2008-01-27 17:43:17 +02:00
|
|
|
#define MATROSKA_ID_ATTACHMENTS 0x1941A469
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_CLUSTER 0x1F43B675
|
2008-05-23 01:07:09 +03:00
|
|
|
#define MATROSKA_ID_CHAPTERS 0x1043A770
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* IDs in the info master */
|
|
|
|
#define MATROSKA_ID_TIMECODESCALE 0x2AD7B1
|
|
|
|
#define MATROSKA_ID_DURATION 0x4489
|
|
|
|
#define MATROSKA_ID_TITLE 0x7BA9
|
|
|
|
#define MATROSKA_ID_WRITINGAPP 0x5741
|
|
|
|
#define MATROSKA_ID_MUXINGAPP 0x4D80
|
|
|
|
#define MATROSKA_ID_DATEUTC 0x4461
|
2007-07-28 09:33:05 +03:00
|
|
|
#define MATROSKA_ID_SEGMENTUID 0x73A4
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* ID in the tracks master */
|
|
|
|
#define MATROSKA_ID_TRACKENTRY 0xAE
|
|
|
|
|
|
|
|
/* IDs in the trackentry master */
|
|
|
|
#define MATROSKA_ID_TRACKNUMBER 0xD7
|
|
|
|
#define MATROSKA_ID_TRACKUID 0x73C5
|
|
|
|
#define MATROSKA_ID_TRACKTYPE 0x83
|
2011-05-21 18:08:53 +03:00
|
|
|
#define MATROSKA_ID_TRACKVIDEO 0xE0
|
|
|
|
#define MATROSKA_ID_TRACKAUDIO 0xE1
|
2011-05-21 18:14:14 +03:00
|
|
|
#define MATROSKA_ID_TRACKOPERATION 0xE2
|
|
|
|
#define MATROSKA_ID_TRACKCOMBINEPLANES 0xE3
|
|
|
|
#define MATROSKA_ID_TRACKPLANE 0xE4
|
|
|
|
#define MATROSKA_ID_TRACKPLANEUID 0xE5
|
|
|
|
#define MATROSKA_ID_TRACKPLANETYPE 0xE6
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_CODECID 0x86
|
|
|
|
#define MATROSKA_ID_CODECPRIVATE 0x63A2
|
|
|
|
#define MATROSKA_ID_CODECNAME 0x258688
|
|
|
|
#define MATROSKA_ID_CODECINFOURL 0x3B4040
|
|
|
|
#define MATROSKA_ID_CODECDOWNLOADURL 0x26B240
|
2008-06-01 16:39:54 +03:00
|
|
|
#define MATROSKA_ID_CODECDECODEALL 0xAA
|
2013-08-30 20:52:36 +03:00
|
|
|
#define MATROSKA_ID_CODECDELAY 0x56AA
|
2013-08-16 21:08:06 +03:00
|
|
|
#define MATROSKA_ID_SEEKPREROLL 0x56BB
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_TRACKNAME 0x536E
|
|
|
|
#define MATROSKA_ID_TRACKLANGUAGE 0x22B59C
|
|
|
|
#define MATROSKA_ID_TRACKFLAGENABLED 0xB9
|
|
|
|
#define MATROSKA_ID_TRACKFLAGDEFAULT 0x88
|
2008-06-01 16:39:54 +03:00
|
|
|
#define MATROSKA_ID_TRACKFLAGFORCED 0x55AA
|
2021-02-16 20:08:51 +02:00
|
|
|
#define MATROSKA_ID_TRACKFLAGHEARINGIMPAIRED 0x55AB
|
|
|
|
#define MATROSKA_ID_TRACKFLAGVISUALIMPAIRED 0x55AC
|
2021-02-16 20:38:19 +02:00
|
|
|
#define MATROSKA_ID_TRACKFLAGTEXTDESCRIPTIONS 0x55AD
|
2021-02-16 19:41:30 +02:00
|
|
|
#define MATROSKA_ID_TRACKFLAGORIGINAL 0x55AE
|
2021-02-16 19:23:59 +02:00
|
|
|
#define MATROSKA_ID_TRACKFLAGCOMMENTARY 0x55AF
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_TRACKFLAGLACING 0x9C
|
|
|
|
#define MATROSKA_ID_TRACKMINCACHE 0x6DE7
|
|
|
|
#define MATROSKA_ID_TRACKMAXCACHE 0x6DF8
|
|
|
|
#define MATROSKA_ID_TRACKDEFAULTDURATION 0x23E383
|
2008-05-09 00:47:31 +03:00
|
|
|
#define MATROSKA_ID_TRACKCONTENTENCODINGS 0x6D80
|
|
|
|
#define MATROSKA_ID_TRACKCONTENTENCODING 0x6240
|
2008-06-01 16:54:11 +03:00
|
|
|
#define MATROSKA_ID_TRACKTIMECODESCALE 0x23314F
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_TRACKMAXBLKADDID 0x55EE
|
2022-01-01 18:51:50 +02:00
|
|
|
#define MATROSKA_ID_TRACKBLKADDMAPPING 0x41E4
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* IDs in the trackvideo master */
|
|
|
|
#define MATROSKA_ID_VIDEOFRAMERATE 0x2383E3
|
|
|
|
#define MATROSKA_ID_VIDEODISPLAYWIDTH 0x54B0
|
|
|
|
#define MATROSKA_ID_VIDEODISPLAYHEIGHT 0x54BA
|
|
|
|
#define MATROSKA_ID_VIDEOPIXELWIDTH 0xB0
|
|
|
|
#define MATROSKA_ID_VIDEOPIXELHEIGHT 0xBA
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_VIDEOPIXELCROPB 0x54AA
|
|
|
|
#define MATROSKA_ID_VIDEOPIXELCROPT 0x54BB
|
|
|
|
#define MATROSKA_ID_VIDEOPIXELCROPL 0x54CC
|
|
|
|
#define MATROSKA_ID_VIDEOPIXELCROPR 0x54DD
|
|
|
|
#define MATROSKA_ID_VIDEODISPLAYUNIT 0x54B2
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_VIDEOFLAGINTERLACED 0x9A
|
2016-03-28 20:29:54 +02:00
|
|
|
#define MATROSKA_ID_VIDEOFIELDORDER 0x9D
|
2011-04-24 08:29:13 +03:00
|
|
|
#define MATROSKA_ID_VIDEOSTEREOMODE 0x53B8
|
2013-02-05 02:17:52 +03:00
|
|
|
#define MATROSKA_ID_VIDEOALPHAMODE 0x53C0
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_VIDEOASPECTRATIO 0x54B3
|
2007-12-03 15:33:48 +02:00
|
|
|
#define MATROSKA_ID_VIDEOCOLORSPACE 0x2EB524
|
2016-03-01 02:41:04 +02:00
|
|
|
#define MATROSKA_ID_VIDEOCOLOR 0x55B0
|
|
|
|
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORMATRIXCOEFF 0x55B1
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORBITSPERCHANNEL 0x55B2
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCHROMASUBHORZ 0x55B3
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCHROMASUBVERT 0x55B4
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCBSUBHORZ 0x55B5
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCBSUBVERT 0x55B6
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ 0x55B7
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT 0x55B8
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORRANGE 0x55B9
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS 0x55BA
|
|
|
|
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORPRIMARIES 0x55BB
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORMAXCLL 0x55BC
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORMAXFALL 0x55BD
|
|
|
|
|
|
|
|
#define MATROSKA_ID_VIDEOCOLORMASTERINGMETA 0x55D0
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_RX 0x55D1
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_RY 0x55D2
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_GX 0x55D3
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_GY 0x55D4
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_BX 0x55D5
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_BY 0x55D6
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_WHITEX 0x55D7
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_WHITEY 0x55D8
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX 0x55D9
|
|
|
|
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN 0x55DA
|
2007-06-05 01:10:54 +03:00
|
|
|
|
2016-12-06 19:48:45 +02:00
|
|
|
#define MATROSKA_ID_VIDEOPROJECTION 0x7670
|
|
|
|
#define MATROSKA_ID_VIDEOPROJECTIONTYPE 0x7671
|
|
|
|
#define MATROSKA_ID_VIDEOPROJECTIONPRIVATE 0x7672
|
|
|
|
#define MATROSKA_ID_VIDEOPROJECTIONPOSEYAW 0x7673
|
|
|
|
#define MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH 0x7674
|
|
|
|
#define MATROSKA_ID_VIDEOPROJECTIONPOSEROLL 0x7675
|
|
|
|
|
2007-06-05 01:10:54 +03:00
|
|
|
/* IDs in the trackaudio master */
|
|
|
|
#define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5
|
|
|
|
#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ 0x78B5
|
|
|
|
|
|
|
|
#define MATROSKA_ID_AUDIOBITDEPTH 0x6264
|
|
|
|
#define MATROSKA_ID_AUDIOCHANNELS 0x9F
|
|
|
|
|
2008-05-09 00:47:31 +03:00
|
|
|
/* IDs in the content encoding master */
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_ENCODINGORDER 0x5031
|
2008-05-09 00:47:31 +03:00
|
|
|
#define MATROSKA_ID_ENCODINGSCOPE 0x5032
|
|
|
|
#define MATROSKA_ID_ENCODINGTYPE 0x5033
|
|
|
|
#define MATROSKA_ID_ENCODINGCOMPRESSION 0x5034
|
|
|
|
#define MATROSKA_ID_ENCODINGCOMPALGO 0x4254
|
|
|
|
#define MATROSKA_ID_ENCODINGCOMPSETTINGS 0x4255
|
|
|
|
|
2013-03-07 19:11:38 +03:00
|
|
|
#define MATROSKA_ID_ENCODINGENCRYPTION 0x5035
|
|
|
|
#define MATROSKA_ID_ENCODINGENCAESSETTINGS 0x47E7
|
|
|
|
#define MATROSKA_ID_ENCODINGENCALGO 0x47E1
|
|
|
|
#define MATROSKA_ID_ENCODINGENCKEYID 0x47E2
|
|
|
|
#define MATROSKA_ID_ENCODINGSIGALGO 0x47E5
|
|
|
|
#define MATROSKA_ID_ENCODINGSIGHASHALGO 0x47E6
|
|
|
|
#define MATROSKA_ID_ENCODINGSIGKEYID 0x47E4
|
|
|
|
#define MATROSKA_ID_ENCODINGSIGNATURE 0x47E3
|
|
|
|
|
2022-01-01 18:51:50 +02:00
|
|
|
/* IDs in the block addition mapping master */
|
|
|
|
#define MATROSKA_ID_BLKADDIDVALUE 0x41F0
|
|
|
|
#define MATROSKA_ID_BLKADDIDNAME 0x41A4
|
|
|
|
#define MATROSKA_ID_BLKADDIDTYPE 0x41E7
|
|
|
|
#define MATROSKA_ID_BLKADDIDEXTRADATA 0x41ED
|
|
|
|
|
2007-06-05 01:10:54 +03:00
|
|
|
/* ID in the cues master */
|
|
|
|
#define MATROSKA_ID_POINTENTRY 0xBB
|
|
|
|
|
|
|
|
/* IDs in the pointentry master */
|
|
|
|
#define MATROSKA_ID_CUETIME 0xB3
|
|
|
|
#define MATROSKA_ID_CUETRACKPOSITION 0xB7
|
|
|
|
|
|
|
|
/* IDs in the cuetrackposition master */
|
|
|
|
#define MATROSKA_ID_CUETRACK 0xF7
|
|
|
|
#define MATROSKA_ID_CUECLUSTERPOSITION 0xF1
|
2013-07-23 10:52:08 +03:00
|
|
|
#define MATROSKA_ID_CUERELATIVEPOSITION 0xF0
|
2013-09-21 04:15:49 +03:00
|
|
|
#define MATROSKA_ID_CUEDURATION 0xB2
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_CUEBLOCKNUMBER 0x5378
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* IDs in the tags master */
|
2008-08-09 02:50:38 +03:00
|
|
|
#define MATROSKA_ID_TAG 0x7373
|
|
|
|
#define MATROSKA_ID_SIMPLETAG 0x67C8
|
|
|
|
#define MATROSKA_ID_TAGNAME 0x45A3
|
|
|
|
#define MATROSKA_ID_TAGSTRING 0x4487
|
|
|
|
#define MATROSKA_ID_TAGLANG 0x447A
|
2010-06-08 22:28:22 +03:00
|
|
|
#define MATROSKA_ID_TAGDEFAULT 0x4484
|
|
|
|
#define MATROSKA_ID_TAGDEFAULT_BUG 0x44B4
|
2008-08-09 02:50:38 +03:00
|
|
|
#define MATROSKA_ID_TAGTARGETS 0x63C0
|
2009-02-15 18:00:58 +02:00
|
|
|
#define MATROSKA_ID_TAGTARGETS_TYPE 0x63CA
|
|
|
|
#define MATROSKA_ID_TAGTARGETS_TYPEVALUE 0x68CA
|
|
|
|
#define MATROSKA_ID_TAGTARGETS_TRACKUID 0x63C5
|
|
|
|
#define MATROSKA_ID_TAGTARGETS_CHAPTERUID 0x63C4
|
|
|
|
#define MATROSKA_ID_TAGTARGETS_ATTACHUID 0x63C6
|
2007-06-05 01:10:54 +03:00
|
|
|
|
|
|
|
/* IDs in the seekhead master */
|
|
|
|
#define MATROSKA_ID_SEEKENTRY 0x4DBB
|
|
|
|
|
|
|
|
/* IDs in the seekpoint master */
|
|
|
|
#define MATROSKA_ID_SEEKID 0x53AB
|
|
|
|
#define MATROSKA_ID_SEEKPOSITION 0x53AC
|
|
|
|
|
|
|
|
/* IDs in the cluster master */
|
|
|
|
#define MATROSKA_ID_CLUSTERTIMECODE 0xE7
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_CLUSTERPOSITION 0xA7
|
|
|
|
#define MATROSKA_ID_CLUSTERPREVSIZE 0xAB
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_BLOCKGROUP 0xA0
|
2013-02-14 00:51:48 +03:00
|
|
|
#define MATROSKA_ID_BLOCKADDITIONS 0x75A1
|
|
|
|
#define MATROSKA_ID_BLOCKMORE 0xA6
|
|
|
|
#define MATROSKA_ID_BLOCKADDID 0xEE
|
|
|
|
#define MATROSKA_ID_BLOCKADDITIONAL 0xA5
|
2007-06-05 01:10:54 +03:00
|
|
|
#define MATROSKA_ID_SIMPLEBLOCK 0xA3
|
|
|
|
|
|
|
|
/* IDs in the blockgroup master */
|
|
|
|
#define MATROSKA_ID_BLOCK 0xA1
|
|
|
|
#define MATROSKA_ID_BLOCKDURATION 0x9B
|
|
|
|
#define MATROSKA_ID_BLOCKREFERENCE 0xFB
|
2013-05-15 16:48:15 +03:00
|
|
|
#define MATROSKA_ID_CODECSTATE 0xA4
|
2013-08-30 21:26:37 +03:00
|
|
|
#define MATROSKA_ID_DISCARDPADDING 0x75A2
|
2007-06-05 01:10:54 +03:00
|
|
|
|
2008-01-27 17:43:17 +02:00
|
|
|
/* IDs in the attachments master */
|
|
|
|
#define MATROSKA_ID_ATTACHEDFILE 0x61A7
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_FILEDESC 0x467E
|
2008-01-27 17:43:17 +02:00
|
|
|
#define MATROSKA_ID_FILENAME 0x466E
|
|
|
|
#define MATROSKA_ID_FILEMIMETYPE 0x4660
|
|
|
|
#define MATROSKA_ID_FILEDATA 0x465C
|
|
|
|
#define MATROSKA_ID_FILEUID 0x46AE
|
|
|
|
|
2008-05-23 01:07:09 +03:00
|
|
|
/* IDs in the chapters master */
|
|
|
|
#define MATROSKA_ID_EDITIONENTRY 0x45B9
|
|
|
|
#define MATROSKA_ID_CHAPTERATOM 0xB6
|
|
|
|
#define MATROSKA_ID_CHAPTERTIMESTART 0x91
|
|
|
|
#define MATROSKA_ID_CHAPTERTIMEEND 0x92
|
|
|
|
#define MATROSKA_ID_CHAPTERDISPLAY 0x80
|
|
|
|
#define MATROSKA_ID_CHAPSTRING 0x85
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_CHAPLANG 0x437C
|
2015-09-20 16:34:05 +02:00
|
|
|
#define MATROSKA_ID_CHAPCOUNTRY 0x437E
|
2008-05-23 01:07:09 +03:00
|
|
|
#define MATROSKA_ID_EDITIONUID 0x45BC
|
|
|
|
#define MATROSKA_ID_EDITIONFLAGHIDDEN 0x45BD
|
2008-06-01 16:39:54 +03:00
|
|
|
#define MATROSKA_ID_EDITIONFLAGDEFAULT 0x45DB
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_EDITIONFLAGORDERED 0x45DD
|
2008-05-23 01:07:09 +03:00
|
|
|
#define MATROSKA_ID_CHAPTERUID 0x73C4
|
|
|
|
#define MATROSKA_ID_CHAPTERFLAGHIDDEN 0x98
|
2008-08-14 00:15:15 +03:00
|
|
|
#define MATROSKA_ID_CHAPTERFLAGENABLED 0x4598
|
|
|
|
#define MATROSKA_ID_CHAPTERPHYSEQUIV 0x63C3
|
2008-05-23 01:07:09 +03:00
|
|
|
|
2007-06-05 01:10:54 +03:00
|
|
|
typedef enum {
|
2008-05-13 18:42:27 +03:00
|
|
|
MATROSKA_TRACK_TYPE_NONE = 0x0,
|
2007-06-05 01:10:54 +03:00
|
|
|
MATROSKA_TRACK_TYPE_VIDEO = 0x1,
|
|
|
|
MATROSKA_TRACK_TYPE_AUDIO = 0x2,
|
|
|
|
MATROSKA_TRACK_TYPE_COMPLEX = 0x3,
|
|
|
|
MATROSKA_TRACK_TYPE_LOGO = 0x10,
|
|
|
|
MATROSKA_TRACK_TYPE_SUBTITLE = 0x11,
|
2020-03-22 10:59:20 +02:00
|
|
|
MATROSKA_TRACK_TYPE_BUTTONS = 0x12,
|
2007-06-05 01:10:54 +03:00
|
|
|
MATROSKA_TRACK_TYPE_CONTROL = 0x20,
|
2013-07-09 02:25:30 +03:00
|
|
|
MATROSKA_TRACK_TYPE_METADATA = 0x21,
|
2007-06-05 01:10:54 +03:00
|
|
|
} MatroskaTrackType;
|
|
|
|
|
2008-05-09 00:47:31 +03:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_TRACK_ENCODING_COMP_ZLIB = 0,
|
|
|
|
MATROSKA_TRACK_ENCODING_COMP_BZLIB = 1,
|
|
|
|
MATROSKA_TRACK_ENCODING_COMP_LZO = 2,
|
|
|
|
MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP = 3,
|
|
|
|
} MatroskaTrackEncodingCompAlgo;
|
|
|
|
|
2016-03-28 20:29:54 +02:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_VIDEO_INTERLACE_FLAG_UNDETERMINED = 0,
|
|
|
|
MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED = 1,
|
2020-03-22 10:59:21 +02:00
|
|
|
MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE = 2,
|
2016-03-28 20:29:54 +02:00
|
|
|
} MatroskaVideoInterlaceFlag;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
MATROSKA_VIDEO_FIELDORDER_PROGRESSIVE = 0,
|
|
|
|
MATROSKA_VIDEO_FIELDORDER_TT = 1,
|
2020-03-22 10:59:21 +02:00
|
|
|
MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
|
2016-03-28 20:29:54 +02:00
|
|
|
MATROSKA_VIDEO_FIELDORDER_BB = 6,
|
2016-10-12 21:51:39 +02:00
|
|
|
MATROSKA_VIDEO_FIELDORDER_TB = 9,
|
|
|
|
MATROSKA_VIDEO_FIELDORDER_BT = 14,
|
2016-03-28 20:29:54 +02:00
|
|
|
} MatroskaVideoFieldOrder;
|
|
|
|
|
2011-05-28 09:12:22 +03:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_MONO = 0,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_LEFT_RIGHT = 1,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTTOM_TOP = 2,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM = 3,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_RL = 4,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_LR = 5,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_RL = 6,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_LR = 7,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_RL = 8,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_LR = 9,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_CYAN_RED = 10,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT = 11,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_GREEN_MAG = 12,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_LR = 13,
|
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL = 14,
|
2014-08-13 00:28:49 +03:00
|
|
|
MATROSKA_VIDEO_STEREOMODE_TYPE_NB,
|
2011-05-28 09:12:22 +03:00
|
|
|
} MatroskaVideoStereoModeType;
|
|
|
|
|
2016-10-15 23:01:50 +02:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_VIDEO_DISPLAYUNIT_PIXELS = 0,
|
|
|
|
MATROSKA_VIDEO_DISPLAYUNIT_CENTIMETERS = 1,
|
|
|
|
MATROSKA_VIDEO_DISPLAYUNIT_INCHES = 2,
|
|
|
|
MATROSKA_VIDEO_DISPLAYUNIT_DAR = 3,
|
|
|
|
MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN = 4,
|
|
|
|
} MatroskaVideoDisplayUnit;
|
|
|
|
|
2016-10-18 04:50:14 +02:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGHORZ_UNDETERMINED = 0,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGHORZ_LEFT = 1,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGHORZ_HALF = 2,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGHORZ_NB
|
|
|
|
} MatroskaColourChromaSitingHorz;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGVERT_UNDETERMINED = 0,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGVERT_TOP = 1,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGVERT_HALF = 2,
|
|
|
|
MATROSKA_COLOUR_CHROMASITINGVERT_NB
|
|
|
|
} MatroskaColourChromaSitingVert;
|
|
|
|
|
2016-12-06 19:48:45 +02:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_VIDEO_PROJECTION_TYPE_RECTANGULAR = 0,
|
|
|
|
MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR = 1,
|
|
|
|
MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP = 2,
|
|
|
|
MATROSKA_VIDEO_PROJECTION_TYPE_MESH = 3,
|
|
|
|
} MatroskaVideoProjectionType;
|
|
|
|
|
2023-03-19 16:51:24 +02:00
|
|
|
typedef enum {
|
|
|
|
MATROSKA_BLOCK_ADD_ID_TYPE_DEFAULT = 0,
|
2023-03-12 21:23:56 +02:00
|
|
|
MATROSKA_BLOCK_ADD_ID_TYPE_OPAQUE = 1,
|
2023-03-12 20:48:10 +02:00
|
|
|
MATROSKA_BLOCK_ADD_ID_TYPE_ITU_T_T35 = 4,
|
2023-03-12 21:23:56 +02:00
|
|
|
MATROSKA_BLOCK_ADD_ID_TYPE_DVCC = 0x64766343, // MKBETAG('d','v','c','C')
|
|
|
|
MATROSKA_BLOCK_ADD_ID_TYPE_DVVC = 0x64767643, // MKBETAG('d','v','v','C')
|
2023-03-19 16:51:24 +02:00
|
|
|
} MatroskaBlockAddIDType;
|
|
|
|
|
2023-03-12 21:23:56 +02:00
|
|
|
#define MATROSKA_BLOCK_ADD_ID_OPAQUE 1
|
2023-03-12 20:48:10 +02:00
|
|
|
#define MATROSKA_BLOCK_ADD_ID_ITU_T_T35 4
|
|
|
|
|
2007-06-05 01:10:54 +03:00
|
|
|
/*
|
2008-08-05 11:28:57 +03:00
|
|
|
* Matroska Codec IDs, strings
|
2007-06-05 01:10:54 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct CodecTags{
|
2013-08-09 01:40:03 +03:00
|
|
|
char str[22];
|
2012-08-05 12:11:04 +03:00
|
|
|
enum AVCodecID id;
|
2007-06-05 01:10:54 +03:00
|
|
|
}CodecTags;
|
|
|
|
|
|
|
|
/* max. depth in the EBML tree structure */
|
|
|
|
#define EBML_MAX_DEPTH 16
|
|
|
|
|
2011-05-25 00:34:24 +03:00
|
|
|
#define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3
|
|
|
|
|
2007-12-02 23:52:43 +02:00
|
|
|
extern const CodecTags ff_mkv_codec_tags[];
|
2018-09-21 17:52:13 +02:00
|
|
|
extern const CodecTags ff_webm_codec_tags[];
|
2009-03-01 02:12:08 +02:00
|
|
|
extern const AVMetadataConv ff_mkv_metadata_conv[];
|
2023-08-11 02:48:58 +02:00
|
|
|
|
|
|
|
/* The following macro contains all the information about which
|
|
|
|
* MATROSKA_VIDEO_STEREOMODE_TYPE_* correspond to which AVStereo3D
|
|
|
|
* structures and also the relevant horizontal/vertical divisors
|
|
|
|
* as well as WebM compatibility.
|
|
|
|
*
|
|
|
|
* MAP and MKV_ONLY are macros to be provided by the user.
|
|
|
|
* MAP(MatroskaVideoStereoModeType, AVStereo3DType, AV_STEREO3D_FLAG_*,
|
|
|
|
* HALF_WIDTH, HALF_HEIGHT, WebM-compatibility)
|
|
|
|
* is for the stereo modes that have a Stereo3D counterpart.
|
|
|
|
* MKV_ONLY(MatroskaVideoStereoModeType, HALF_WIDTH, HALF_HEIGHT, WebM)
|
|
|
|
* is for those that don't have a Stereo3D counterpart.
|
|
|
|
* */
|
|
|
|
#define STEREOMODE_STEREO3D_MAPPING(MAP, MKV_ONLY) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_MONO, AV_STEREO3D_2D, 0, 0, 0, 1) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_LEFT_RIGHT, AV_STEREO3D_SIDEBYSIDE, 0, 1, 0, 1) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_BOTTOM_TOP, AV_STEREO3D_TOPBOTTOM, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 0, 1, 1) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM, AV_STEREO3D_TOPBOTTOM, 0, 0, 1, 1) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_RL, AV_STEREO3D_CHECKERBOARD, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 0, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_LR, AV_STEREO3D_CHECKERBOARD, 0, 0, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_RL, AV_STEREO3D_LINES, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 0, 1, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_LR, AV_STEREO3D_LINES, 0, 0, 1, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_RL, AV_STEREO3D_COLUMNS, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 1, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_LR, AV_STEREO3D_COLUMNS, 0, 1, 0, 0) \
|
|
|
|
MKV_ONLY(MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_CYAN_RED, 0, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT, AV_STEREO3D_SIDEBYSIDE, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 1, 0, 1) \
|
|
|
|
MKV_ONLY(MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_GREEN_MAG, 0, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_LR, AV_STEREO3D_FRAMESEQUENCE, \
|
|
|
|
0, 0, 0, 0) \
|
|
|
|
MAP(MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL, AV_STEREO3D_FRAMESEQUENCE, \
|
|
|
|
AV_STEREO3D_FLAG_INVERT, 0, 0, 0)
|
|
|
|
|
2014-08-29 02:26:52 +03:00
|
|
|
extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB];
|
2007-06-05 01:10:54 +03:00
|
|
|
|
2014-07-07 22:52:37 +03:00
|
|
|
/* AVStream Metadata tag keys for WebM Dash Manifest */
|
|
|
|
#define INITIALIZATION_RANGE "webm_dash_manifest_initialization_range"
|
|
|
|
#define CUES_START "webm_dash_manifest_cues_start"
|
|
|
|
#define CUES_END "webm_dash_manifest_cues_end"
|
|
|
|
#define FILENAME "webm_dash_manifest_file_name"
|
|
|
|
#define BANDWIDTH "webm_dash_manifest_bandwidth"
|
|
|
|
#define DURATION "webm_dash_manifest_duration"
|
|
|
|
#define CLUSTER_KEYFRAME "webm_dash_manifest_cluster_keyframe"
|
|
|
|
#define CUE_TIMESTAMPS "webm_dash_manifest_cue_timestamps"
|
|
|
|
#define TRACK_NUMBER "webm_dash_manifest_track_number"
|
|
|
|
#define CODEC_PRIVATE_SIZE "webm_dash_manifest_codec_priv_size"
|
|
|
|
|
2022-01-01 18:51:50 +02:00
|
|
|
#define DVCC_DVVC_BLOCK_TYPE_NAME "Dolby Vision configuration"
|
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#endif /* AVFORMAT_MATROSKA_H */
|