chromium/third_party/ffmpeg/libavformat/matroska.h

/*
 * Matroska constants
 * Copyright (c) 2003-2004 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_H
#define AVFORMAT_MATROSKA_H

#include "libavcodec/codec_id.h"
#include "metadata.h"

/* EBML version supported */
#define EBML_VERSION

/* top-level master-IDs */
#define EBML_ID_HEADER

/* IDs in the HEADER master */
#define EBML_ID_EBMLVERSION
#define EBML_ID_EBMLREADVERSION
#define EBML_ID_EBMLMAXIDLENGTH
#define EBML_ID_EBMLMAXSIZELENGTH
#define EBML_ID_DOCTYPE
#define EBML_ID_DOCTYPEVERSION
#define EBML_ID_DOCTYPEREADVERSION

/* general EBML types */
#define EBML_ID_VOID
#define EBML_ID_CRC32

/*
 * Matroska element IDs, max. 32 bits
 */

/* toplevel segment */
#define MATROSKA_ID_SEGMENT

/* Matroska top-level master IDs */
#define MATROSKA_ID_INFO
#define MATROSKA_ID_TRACKS
#define MATROSKA_ID_CUES
#define MATROSKA_ID_TAGS
#define MATROSKA_ID_SEEKHEAD
#define MATROSKA_ID_ATTACHMENTS
#define MATROSKA_ID_CLUSTER
#define MATROSKA_ID_CHAPTERS

/* IDs in the info master */
#define MATROSKA_ID_TIMECODESCALE
#define MATROSKA_ID_DURATION
#define MATROSKA_ID_TITLE
#define MATROSKA_ID_WRITINGAPP
#define MATROSKA_ID_MUXINGAPP
#define MATROSKA_ID_DATEUTC
#define MATROSKA_ID_SEGMENTUID

/* ID in the tracks master */
#define MATROSKA_ID_TRACKENTRY

/* IDs in the trackentry master */
#define MATROSKA_ID_TRACKNUMBER
#define MATROSKA_ID_TRACKUID
#define MATROSKA_ID_TRACKTYPE
#define MATROSKA_ID_TRACKVIDEO
#define MATROSKA_ID_TRACKAUDIO
#define MATROSKA_ID_TRACKOPERATION
#define MATROSKA_ID_TRACKCOMBINEPLANES
#define MATROSKA_ID_TRACKPLANE
#define MATROSKA_ID_TRACKPLANEUID
#define MATROSKA_ID_TRACKPLANETYPE
#define MATROSKA_ID_CODECID
#define MATROSKA_ID_CODECPRIVATE
#define MATROSKA_ID_CODECNAME
#define MATROSKA_ID_CODECINFOURL
#define MATROSKA_ID_CODECDOWNLOADURL
#define MATROSKA_ID_CODECDECODEALL
#define MATROSKA_ID_CODECDELAY
#define MATROSKA_ID_SEEKPREROLL
#define MATROSKA_ID_TRACKNAME
#define MATROSKA_ID_TRACKLANGUAGE
#define MATROSKA_ID_TRACKFLAGENABLED
#define MATROSKA_ID_TRACKFLAGDEFAULT
#define MATROSKA_ID_TRACKFLAGFORCED
#define MATROSKA_ID_TRACKFLAGHEARINGIMPAIRED
#define MATROSKA_ID_TRACKFLAGVISUALIMPAIRED
#define MATROSKA_ID_TRACKFLAGTEXTDESCRIPTIONS
#define MATROSKA_ID_TRACKFLAGORIGINAL
#define MATROSKA_ID_TRACKFLAGCOMMENTARY
#define MATROSKA_ID_TRACKFLAGLACING
#define MATROSKA_ID_TRACKMINCACHE
#define MATROSKA_ID_TRACKMAXCACHE
#define MATROSKA_ID_TRACKDEFAULTDURATION
#define MATROSKA_ID_TRACKCONTENTENCODINGS
#define MATROSKA_ID_TRACKCONTENTENCODING
#define MATROSKA_ID_TRACKTIMECODESCALE
#define MATROSKA_ID_TRACKMAXBLKADDID
#define MATROSKA_ID_TRACKBLKADDMAPPING

/* IDs in the trackvideo master */
#define MATROSKA_ID_VIDEOFRAMERATE
#define MATROSKA_ID_VIDEODISPLAYWIDTH
#define MATROSKA_ID_VIDEODISPLAYHEIGHT
#define MATROSKA_ID_VIDEOPIXELWIDTH
#define MATROSKA_ID_VIDEOPIXELHEIGHT
#define MATROSKA_ID_VIDEOPIXELCROPB
#define MATROSKA_ID_VIDEOPIXELCROPT
#define MATROSKA_ID_VIDEOPIXELCROPL
#define MATROSKA_ID_VIDEOPIXELCROPR
#define MATROSKA_ID_VIDEODISPLAYUNIT
#define MATROSKA_ID_VIDEOFLAGINTERLACED
#define MATROSKA_ID_VIDEOFIELDORDER
#define MATROSKA_ID_VIDEOSTEREOMODE
#define MATROSKA_ID_VIDEOALPHAMODE
#define MATROSKA_ID_VIDEOASPECTRATIO
#define MATROSKA_ID_VIDEOCOLORSPACE
#define MATROSKA_ID_VIDEOCOLOR

#define MATROSKA_ID_VIDEOCOLORMATRIXCOEFF
#define MATROSKA_ID_VIDEOCOLORBITSPERCHANNEL
#define MATROSKA_ID_VIDEOCOLORCHROMASUBHORZ
#define MATROSKA_ID_VIDEOCOLORCHROMASUBVERT
#define MATROSKA_ID_VIDEOCOLORCBSUBHORZ
#define MATROSKA_ID_VIDEOCOLORCBSUBVERT
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT
#define MATROSKA_ID_VIDEOCOLORRANGE
#define MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS

#define MATROSKA_ID_VIDEOCOLORPRIMARIES
#define MATROSKA_ID_VIDEOCOLORMAXCLL
#define MATROSKA_ID_VIDEOCOLORMAXFALL

#define MATROSKA_ID_VIDEOCOLORMASTERINGMETA
#define MATROSKA_ID_VIDEOCOLOR_RX
#define MATROSKA_ID_VIDEOCOLOR_RY
#define MATROSKA_ID_VIDEOCOLOR_GX
#define MATROSKA_ID_VIDEOCOLOR_GY
#define MATROSKA_ID_VIDEOCOLOR_BX
#define MATROSKA_ID_VIDEOCOLOR_BY
#define MATROSKA_ID_VIDEOCOLOR_WHITEX
#define MATROSKA_ID_VIDEOCOLOR_WHITEY
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN

#define MATROSKA_ID_VIDEOPROJECTION
#define MATROSKA_ID_VIDEOPROJECTIONTYPE
#define MATROSKA_ID_VIDEOPROJECTIONPRIVATE
#define MATROSKA_ID_VIDEOPROJECTIONPOSEYAW
#define MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH
#define MATROSKA_ID_VIDEOPROJECTIONPOSEROLL

/* IDs in the trackaudio master */
#define MATROSKA_ID_AUDIOSAMPLINGFREQ
#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ

#define MATROSKA_ID_AUDIOBITDEPTH
#define MATROSKA_ID_AUDIOCHANNELS

/* IDs in the content encoding master */
#define MATROSKA_ID_ENCODINGORDER
#define MATROSKA_ID_ENCODINGSCOPE
#define MATROSKA_ID_ENCODINGTYPE
#define MATROSKA_ID_ENCODINGCOMPRESSION
#define MATROSKA_ID_ENCODINGCOMPALGO
#define MATROSKA_ID_ENCODINGCOMPSETTINGS

#define MATROSKA_ID_ENCODINGENCRYPTION
#define MATROSKA_ID_ENCODINGENCAESSETTINGS
#define MATROSKA_ID_ENCODINGENCALGO
#define MATROSKA_ID_ENCODINGENCKEYID
#define MATROSKA_ID_ENCODINGSIGALGO
#define MATROSKA_ID_ENCODINGSIGHASHALGO
#define MATROSKA_ID_ENCODINGSIGKEYID
#define MATROSKA_ID_ENCODINGSIGNATURE

/* IDs in the block addition mapping master */
#define MATROSKA_ID_BLKADDIDVALUE
#define MATROSKA_ID_BLKADDIDNAME
#define MATROSKA_ID_BLKADDIDTYPE
#define MATROSKA_ID_BLKADDIDEXTRADATA

/* ID in the cues master */
#define MATROSKA_ID_POINTENTRY

/* IDs in the pointentry master */
#define MATROSKA_ID_CUETIME
#define MATROSKA_ID_CUETRACKPOSITION

/* IDs in the cuetrackposition master */
#define MATROSKA_ID_CUETRACK
#define MATROSKA_ID_CUECLUSTERPOSITION
#define MATROSKA_ID_CUERELATIVEPOSITION
#define MATROSKA_ID_CUEDURATION
#define MATROSKA_ID_CUEBLOCKNUMBER

/* IDs in the tags master */
#define MATROSKA_ID_TAG
#define MATROSKA_ID_SIMPLETAG
#define MATROSKA_ID_TAGNAME
#define MATROSKA_ID_TAGSTRING
#define MATROSKA_ID_TAGLANG
#define MATROSKA_ID_TAGDEFAULT
#define MATROSKA_ID_TAGDEFAULT_BUG
#define MATROSKA_ID_TAGTARGETS
#define MATROSKA_ID_TAGTARGETS_TYPE
#define MATROSKA_ID_TAGTARGETS_TYPEVALUE
#define MATROSKA_ID_TAGTARGETS_TRACKUID
#define MATROSKA_ID_TAGTARGETS_CHAPTERUID
#define MATROSKA_ID_TAGTARGETS_ATTACHUID

/* IDs in the seekhead master */
#define MATROSKA_ID_SEEKENTRY

/* IDs in the seekpoint master */
#define MATROSKA_ID_SEEKID
#define MATROSKA_ID_SEEKPOSITION

/* IDs in the cluster master */
#define MATROSKA_ID_CLUSTERTIMECODE
#define MATROSKA_ID_CLUSTERPOSITION
#define MATROSKA_ID_CLUSTERPREVSIZE
#define MATROSKA_ID_BLOCKGROUP
#define MATROSKA_ID_BLOCKADDITIONS
#define MATROSKA_ID_BLOCKMORE
#define MATROSKA_ID_BLOCKADDID
#define MATROSKA_ID_BLOCKADDITIONAL
#define MATROSKA_ID_SIMPLEBLOCK

/* IDs in the blockgroup master */
#define MATROSKA_ID_BLOCK
#define MATROSKA_ID_BLOCKDURATION
#define MATROSKA_ID_BLOCKREFERENCE
#define MATROSKA_ID_CODECSTATE
#define MATROSKA_ID_DISCARDPADDING

/* IDs in the attachments master */
#define MATROSKA_ID_ATTACHEDFILE
#define MATROSKA_ID_FILEDESC
#define MATROSKA_ID_FILENAME
#define MATROSKA_ID_FILEMIMETYPE
#define MATROSKA_ID_FILEDATA
#define MATROSKA_ID_FILEUID

/* IDs in the chapters master */
#define MATROSKA_ID_EDITIONENTRY
#define MATROSKA_ID_CHAPTERATOM
#define MATROSKA_ID_CHAPTERTIMESTART
#define MATROSKA_ID_CHAPTERTIMEEND
#define MATROSKA_ID_CHAPTERDISPLAY
#define MATROSKA_ID_CHAPSTRING
#define MATROSKA_ID_CHAPLANG
#define MATROSKA_ID_CHAPCOUNTRY
#define MATROSKA_ID_EDITIONUID
#define MATROSKA_ID_EDITIONFLAGHIDDEN
#define MATROSKA_ID_EDITIONFLAGDEFAULT
#define MATROSKA_ID_EDITIONFLAGORDERED
#define MATROSKA_ID_CHAPTERUID
#define MATROSKA_ID_CHAPTERFLAGHIDDEN
#define MATROSKA_ID_CHAPTERFLAGENABLED
#define MATROSKA_ID_CHAPTERPHYSEQUIV

MatroskaTrackType;

MatroskaTrackEncodingCompAlgo;

MatroskaVideoInterlaceFlag;

MatroskaVideoFieldOrder;

MatroskaVideoStereoModeType;

MatroskaVideoDisplayUnit;

MatroskaColourChromaSitingHorz;

MatroskaColourChromaSitingVert;

MatroskaVideoProjectionType;

MatroskaBlockAddIDType;

#define MATROSKA_BLOCK_ADD_ID_OPAQUE
#define MATROSKA_BLOCK_ADD_ID_ITU_T_T35

/*
 * Matroska Codec IDs, strings
 */

CodecTags;

/* max. depth in the EBML tree structure */
#define EBML_MAX_DEPTH

#define MATROSKA_VIDEO_STEREO_PLANE_COUNT

extern const CodecTags ff_mkv_codec_tags[];
extern const CodecTags ff_webm_codec_tags[];
extern const AVMetadataConv ff_mkv_metadata_conv[];

/* 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)

extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB];

/* AVStream Metadata tag keys for WebM Dash Manifest */
#define INITIALIZATION_RANGE
#define CUES_START
#define CUES_END
#define FILENAME
#define BANDWIDTH
#define DURATION
#define CLUSTER_KEYFRAME
#define CUE_TIMESTAMPS
#define TRACK_NUMBER
#define CODEC_PRIVATE_SIZE

#define DVCC_DVVC_BLOCK_TYPE_NAME

#endif /* AVFORMAT_MATROSKA_H */