FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions | Variables
matroskadec.c File Reference

Matroska file demuxer. More...

#include "config.h"
#include <inttypes.h>
#include <stdio.h>
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/dict.h"
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/lzo.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/time_internal.h"
#include "libavutil/spherical.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/flac.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "isom.h"
#include "matroska.h"
#include "oggdec.h"
#include "riff.h"
#include "rmsipr.h"
#include "qtpalette.h"

Go to the source code of this file.

Data Structures

struct  EbmlSyntax
 
struct  EbmlList
 
struct  EbmlBin
 
struct  Ebml
 
struct  MatroskaTrackCompression
 
struct  MatroskaTrackEncryption
 
struct  MatroskaTrackEncoding
 
struct  MatroskaMasteringMeta
 
struct  MatroskaTrackVideoColor
 
struct  MatroskaTrackVideoProjection
 
struct  MatroskaTrackVideo
 
struct  MatroskaTrackAudio
 
struct  MatroskaTrackPlane
 
struct  MatroskaTrackOperation
 
struct  MatroskaTrack
 
struct  MatroskaAttachment
 
struct  MatroskaChapter
 
struct  MatroskaIndexPos
 
struct  MatroskaIndex
 
struct  MatroskaTag
 
struct  MatroskaTagTarget
 
struct  MatroskaTags
 
struct  MatroskaSeekhead
 
struct  MatroskaLevel
 
struct  MatroskaCluster
 
struct  MatroskaLevel1Element
 
struct  MatroskaDemuxContext
 
struct  MatroskaBlock
 
struct  CueDesc
 

Macros

#define OFFSET(x)   offsetof(MatroskaDemuxContext, x)
 

Enumerations

enum  EbmlType {
  EBML_NONE, EBML_UINT, EBML_FLOAT, EBML_STR,
  EBML_UTF8, EBML_BIN, EBML_NEST, EBML_LEVEL1,
  EBML_PASS, EBML_STOP, EBML_SINT, EBML_TYPE_COUNT
}
 

Functions

static int matroska_read_close (AVFormatContext *s)
 
static int matroska_resync (MatroskaDemuxContext *matroska, int64_t last_pos)
 
static int ebml_level_end (MatroskaDemuxContext *matroska)
 
static int ebml_read_num (MatroskaDemuxContext *matroska, AVIOContext *pb, int max_size, uint64_t *number)
 
static int ebml_read_length (MatroskaDemuxContext *matroska, AVIOContext *pb, uint64_t *number)
 Read a EBML length value. More...
 
static int ebml_read_uint (AVIOContext *pb, int size, uint64_t *num)
 
static int ebml_read_sint (AVIOContext *pb, int size, int64_t *num)
 
static int ebml_read_float (AVIOContext *pb, int size, double *num)
 
static int ebml_read_ascii (AVIOContext *pb, int size, char **str)
 
static int ebml_read_binary (AVIOContext *pb, int length, EbmlBin *bin)
 
static int ebml_read_master (MatroskaDemuxContext *matroska, uint64_t length)
 
static int matroska_ebmlnum_uint (MatroskaDemuxContext *matroska, uint8_t *data, uint32_t size, uint64_t *num)
 
static int matroska_ebmlnum_sint (MatroskaDemuxContext *matroska, uint8_t *data, uint32_t size, int64_t *num)
 
static int ebml_parse_elem (MatroskaDemuxContext *matroska, EbmlSyntax *syntax, void *data)
 
static int ebml_parse_id (MatroskaDemuxContext *matroska, EbmlSyntax *syntax, uint32_t id, void *data)
 
static int ebml_parse (MatroskaDemuxContext *matroska, EbmlSyntax *syntax, void *data)
 
static int ebml_parse_nest (MatroskaDemuxContext *matroska, EbmlSyntax *syntax, void *data)
 
static int is_ebml_id_valid (uint32_t id)
 
static MatroskaLevel1Elementmatroska_find_level1_elem (MatroskaDemuxContext *matroska, uint32_t id)
 
static void ebml_free (EbmlSyntax *syntax, void *data)
 
static int matroska_probe (AVProbeData *p)
 
static MatroskaTrackmatroska_find_track_by_num (MatroskaDemuxContext *matroska, int num)
 
static int matroska_decode_buffer (uint8_t **buf, int *buf_size, MatroskaTrack *track)
 
static void matroska_convert_tag (AVFormatContext *s, EbmlList *list, AVDictionary **metadata, char *prefix)
 
static void matroska_convert_tags (AVFormatContext *s)
 
static int matroska_parse_seekhead_entry (MatroskaDemuxContext *matroska, uint64_t pos)
 
static void matroska_execute_seekhead (MatroskaDemuxContext *matroska)
 
static void matroska_add_index_entries (MatroskaDemuxContext *matroska)
 
static void matroska_parse_cues (MatroskaDemuxContext *matroska)
 
static int matroska_aac_profile (char *codec_id)
 
static int matroska_aac_sri (int samplerate)
 
static void matroska_metadata_creation_time (AVDictionary **metadata, int64_t date_utc)
 
static int matroska_parse_flac (AVFormatContext *s, MatroskaTrack *track, int *offset)
 
static int mkv_field_order (MatroskaDemuxContext *matroska, int64_t field_order)
 
static void mkv_stereo_mode_display_mul (int stereo_mode, int *h_width, int *h_height)
 
static int mkv_parse_video_color (AVStream *st, const MatroskaTrack *track)
 
static int mkv_parse_video_projection (AVStream *st, const MatroskaTrack *track)
 
static int get_qt_codec (MatroskaTrack *track, uint32_t *fourcc, enum AVCodecID *codec_id)
 
static int matroska_parse_tracks (AVFormatContext *s)
 
static int matroska_read_header (AVFormatContext *s)
 
static int matroska_deliver_packet (MatroskaDemuxContext *matroska, AVPacket *pkt)
 
static void matroska_clear_queue (MatroskaDemuxContext *matroska)
 
static int matroska_parse_laces (MatroskaDemuxContext *matroska, uint8_t **buf, int *buf_size, int type, uint32_t **lace_buf, int *laces)
 
static int matroska_parse_rm_audio (MatroskaDemuxContext *matroska, MatroskaTrack *track, AVStream *st, uint8_t *data, int size, uint64_t timecode, int64_t pos)
 
static int matroska_parse_wavpack (MatroskaTrack *track, uint8_t *src, uint8_t **pdst, int *size)
 
static int matroska_parse_prores (MatroskaTrack *track, uint8_t *src, uint8_t **pdst, int *size)
 
static int matroska_parse_webvtt (MatroskaDemuxContext *matroska, MatroskaTrack *track, AVStream *st, uint8_t *data, int data_len, uint64_t timecode, uint64_t duration, int64_t pos)
 
static int matroska_parse_frame (MatroskaDemuxContext *matroska, MatroskaTrack *track, AVStream *st, AVBufferRef *buf, uint8_t *data, int pkt_size, uint64_t timecode, uint64_t lace_duration, int64_t pos, int is_keyframe, uint8_t *additional, uint64_t additional_id, int additional_size, int64_t discard_padding)
 
static int matroska_parse_block (MatroskaDemuxContext *matroska, AVBufferRef *buf, uint8_t *data, int size, int64_t pos, uint64_t cluster_time, uint64_t block_duration, int is_keyframe, uint8_t *additional, uint64_t additional_id, int additional_size, int64_t cluster_pos, int64_t discard_padding)
 
static int matroska_parse_cluster_incremental (MatroskaDemuxContext *matroska)
 
static int matroska_parse_cluster (MatroskaDemuxContext *matroska)
 
static int matroska_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int matroska_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
static CueDesc get_cue_desc (AVFormatContext *s, int64_t ts, int64_t cues_start)
 
static int webm_clusters_start_with_keyframe (AVFormatContext *s)
 
static int buffer_size_after_time_downloaded (int64_t time_ns, double search_sec, int64_t bps, double min_buffer, double *buffer, double *sec_to_download, AVFormatContext *s, int64_t cues_start)
 
static int64_t webm_dash_manifest_compute_bandwidth (AVFormatContext *s, int64_t cues_start)
 
static int webm_dash_manifest_cues (AVFormatContext *s, int64_t init_range)
 
static int webm_dash_manifest_read_header (AVFormatContext *s)
 
static int webm_dash_manifest_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const EbmlSyntax ebml_header []
 
static const EbmlSyntax ebml_syntax []
 
static const EbmlSyntax matroska_info []
 
static const EbmlSyntax matroska_mastering_meta []
 
static const EbmlSyntax matroska_track_video_color []
 
static const EbmlSyntax matroska_track_video_projection []
 
static const EbmlSyntax matroska_track_video []
 
static const EbmlSyntax matroska_track_audio []
 
static const EbmlSyntax matroska_track_encoding_compression []
 
static const EbmlSyntax matroska_track_encoding_encryption []
 
static const EbmlSyntax matroska_track_encoding []
 
static const EbmlSyntax matroska_track_encodings []
 
static const EbmlSyntax matroska_track_plane []
 
static const EbmlSyntax matroska_track_combine_planes []
 
static const EbmlSyntax matroska_track_operation []
 
static const EbmlSyntax matroska_track []
 
static const EbmlSyntax matroska_tracks []
 
static const EbmlSyntax matroska_attachment []
 
static const EbmlSyntax matroska_attachments []
 
static const EbmlSyntax matroska_chapter_display []
 
static const EbmlSyntax matroska_chapter_entry []
 
static const EbmlSyntax matroska_chapter []
 
static const EbmlSyntax matroska_chapters []
 
static const EbmlSyntax matroska_index_pos []
 
static const EbmlSyntax matroska_index_entry []
 
static const EbmlSyntax matroska_index []
 
static const EbmlSyntax matroska_simpletag []
 
static const EbmlSyntax matroska_tagtargets []
 
static const EbmlSyntax matroska_tag []
 
static const EbmlSyntax matroska_tags []
 
static const EbmlSyntax matroska_seekhead_entry []
 
static const EbmlSyntax matroska_seekhead []
 
static const EbmlSyntax matroska_segment []
 
static const EbmlSyntax matroska_segments []
 
static const EbmlSyntax matroska_blockmore []
 
static const EbmlSyntax matroska_blockadditions []
 
static const EbmlSyntax matroska_blockgroup []
 
static const EbmlSyntax matroska_cluster []
 
static const EbmlSyntax matroska_clusters []
 
static const EbmlSyntax matroska_cluster_incremental_parsing []
 
static const EbmlSyntax matroska_cluster_incremental []
 
static const EbmlSyntax matroska_clusters_incremental []
 
static const char *const matroska_doctypes [] = { "matroska", "webm" }
 
static const AVOption options []
 
static const AVClass webm_dash_class
 
AVInputFormat ff_matroska_demuxer
 
AVInputFormat ff_webm_dash_manifest_demuxer
 

Detailed Description

Matroska file demuxer.

Author
Ronald Bultje rbult.nosp@m.je@r.nosp@m.onald.nosp@m..bit.nosp@m.freak.nosp@m..net
with a little help from Moritz Bunkus morit.nosp@m.z@bu.nosp@m.nkus..nosp@m.org
totally reworked by Aurelien Jacobs aurel.nosp@m.@gnu.nosp@m.age.o.nosp@m.rg
See also
specs available on the Matroska project page: http://www.matroska.org/

Definition in file matroskadec.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(MatroskaDemuxContext, x)

Definition at line 4012 of file matroskadec.c.

Enumeration Type Documentation

◆ EbmlType

enum EbmlType
Enumerator
EBML_NONE 
EBML_UINT 
EBML_FLOAT 
EBML_STR 
EBML_UTF8 
EBML_BIN 
EBML_NEST 
EBML_LEVEL1 
EBML_PASS 
EBML_STOP 
EBML_SINT 
EBML_TYPE_COUNT 

Definition at line 71 of file matroskadec.c.

Function Documentation

◆ matroska_read_close()

static int matroska_read_close ( AVFormatContext s)
static

Definition at line 3611 of file matroskadec.c.

Referenced by matroska_read_header(), and webm_dash_manifest_read_header().

◆ matroska_resync()

static int matroska_resync ( MatroskaDemuxContext matroska,
int64_t  last_pos 
)
static

Definition at line 763 of file matroskadec.c.

Referenced by matroska_read_header(), and matroska_read_packet().

◆ ebml_level_end()

static int ebml_level_end ( MatroskaDemuxContext matroska)
static

Definition at line 798 of file matroskadec.c.

Referenced by ebml_parse_nest(), and matroska_parse_cluster_incremental().

◆ ebml_read_num()

static int ebml_read_num ( MatroskaDemuxContext matroska,
AVIOContext pb,
int  max_size,
uint64_t *  number 
)
static

◆ ebml_read_length()

static int ebml_read_length ( MatroskaDemuxContext matroska,
AVIOContext pb,
uint64_t *  number 
)
static

Read a EBML length value.

This needs special handling for the "unknown length" case which has multiple encodings.

Definition at line 867 of file matroskadec.c.

Referenced by ebml_parse_elem(), webm_clusters_start_with_keyframe(), and webm_dash_manifest_cues().

◆ ebml_read_uint()

static int ebml_read_uint ( AVIOContext pb,
int  size,
uint64_t *  num 
)
static

Definition at line 880 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ ebml_read_sint()

static int ebml_read_sint ( AVIOContext pb,
int  size,
int64_t *  num 
)
static

Definition at line 899 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ ebml_read_float()

static int ebml_read_float ( AVIOContext pb,
int  size,
double *  num 
)
static

Definition at line 923 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ ebml_read_ascii()

static int ebml_read_ascii ( AVIOContext pb,
int  size,
char **  str 
)
static

Definition at line 941 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ ebml_read_binary()

static int ebml_read_binary ( AVIOContext pb,
int  length,
EbmlBin bin 
)
static

Definition at line 964 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ ebml_read_master()

static int ebml_read_master ( MatroskaDemuxContext matroska,
uint64_t  length 
)
static

Definition at line 991 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ matroska_ebmlnum_uint()

static int matroska_ebmlnum_uint ( MatroskaDemuxContext matroska,
uint8_t data,
uint32_t  size,
uint64_t *  num 
)
static

◆ matroska_ebmlnum_sint()

static int matroska_ebmlnum_sint ( MatroskaDemuxContext matroska,
uint8_t data,
uint32_t  size,
int64_t *  num 
)
static

Definition at line 1024 of file matroskadec.c.

Referenced by matroska_parse_laces().

◆ ebml_parse_elem()

static int ebml_parse_elem ( MatroskaDemuxContext matroska,
EbmlSyntax syntax,
void data 
)
static

Definition at line 1158 of file matroskadec.c.

Referenced by ebml_parse_id(), and matroska_ebmlnum_sint().

◆ ebml_parse_id()

static int ebml_parse_id ( MatroskaDemuxContext matroska,
EbmlSyntax syntax,
uint32_t  id,
void data 
)
static

Definition at line 1043 of file matroskadec.c.

Referenced by ebml_parse(), and ebml_parse_elem().

◆ ebml_parse()

static int ebml_parse ( MatroskaDemuxContext matroska,
EbmlSyntax syntax,
void data 
)
static

◆ ebml_parse_nest()

static int ebml_parse_nest ( MatroskaDemuxContext matroska,
EbmlSyntax syntax,
void data 
)
static

Definition at line 1076 of file matroskadec.c.

Referenced by ebml_parse_elem().

◆ is_ebml_id_valid()

static int is_ebml_id_valid ( uint32_t  id)
static

Definition at line 1110 of file matroskadec.c.

Referenced by matroska_find_level1_elem().

◆ matroska_find_level1_elem()

static MatroskaLevel1Element* matroska_find_level1_elem ( MatroskaDemuxContext matroska,
uint32_t  id 
)
static

Definition at line 1123 of file matroskadec.c.

Referenced by ebml_parse_elem(), and matroska_execute_seekhead().

◆ ebml_free()

static void ebml_free ( EbmlSyntax syntax,
void data 
)
static

◆ matroska_probe()

static int matroska_probe ( AVProbeData p)
static

Definition at line 1284 of file matroskadec.c.

◆ matroska_find_track_by_num()

static MatroskaTrack* matroska_find_track_by_num ( MatroskaDemuxContext matroska,
int  num 
)
static

Definition at line 1326 of file matroskadec.c.

Referenced by matroska_add_index_entries(), and matroska_parse_block().

◆ matroska_decode_buffer()

static int matroska_decode_buffer ( uint8_t **  buf,
int buf_size,
MatroskaTrack track 
)
static

Definition at line 1340 of file matroskadec.c.

Referenced by matroska_parse_frame(), and matroska_parse_tracks().

◆ matroska_convert_tag()

static void matroska_convert_tag ( AVFormatContext s,
EbmlList list,
AVDictionary **  metadata,
char *  prefix 
)
static

Definition at line 1479 of file matroskadec.c.

Referenced by matroska_convert_tags().

◆ matroska_convert_tags()

static void matroska_convert_tags ( AVFormatContext s)
static

Definition at line 1514 of file matroskadec.c.

Referenced by matroska_read_header().

◆ matroska_parse_seekhead_entry()

static int matroska_parse_seekhead_entry ( MatroskaDemuxContext matroska,
uint64_t  pos 
)
static

Definition at line 1579 of file matroskadec.c.

Referenced by matroska_execute_seekhead(), and matroska_parse_cues().

◆ matroska_execute_seekhead()

static void matroska_execute_seekhead ( MatroskaDemuxContext matroska)
static

Definition at line 1624 of file matroskadec.c.

Referenced by matroska_read_header().

◆ matroska_add_index_entries()

static void matroska_add_index_entries ( MatroskaDemuxContext matroska)
static

Definition at line 1658 of file matroskadec.c.

Referenced by matroska_parse_cues(), and matroska_read_header().

◆ matroska_parse_cues()

static void matroska_parse_cues ( MatroskaDemuxContext matroska)
static

Definition at line 1691 of file matroskadec.c.

Referenced by matroska_read_seek(), and webm_dash_manifest_cues().

◆ matroska_aac_profile()

static int matroska_aac_profile ( char *  codec_id)
static

Definition at line 1710 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ matroska_aac_sri()

static int matroska_aac_sri ( int  samplerate)
static

Definition at line 1721 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ matroska_metadata_creation_time()

static void matroska_metadata_creation_time ( AVDictionary **  metadata,
int64_t  date_utc 
)
static

Definition at line 1731 of file matroskadec.c.

Referenced by matroska_read_header().

◆ matroska_parse_flac()

static int matroska_parse_flac ( AVFormatContext s,
MatroskaTrack track,
int offset 
)
static

Definition at line 1737 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ mkv_field_order()

static int mkv_field_order ( MatroskaDemuxContext matroska,
int64_t  field_order 
)
static

Definition at line 1792 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ mkv_stereo_mode_display_mul()

static void mkv_stereo_mode_display_mul ( int  stereo_mode,
int h_width,
int h_height 
)
static

Definition at line 1819 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ mkv_parse_video_color()

static int mkv_parse_video_color ( AVStream st,
const MatroskaTrack track 
)
static

Definition at line 1844 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ mkv_parse_video_projection()

static int mkv_parse_video_projection ( AVStream st,
const MatroskaTrack track 
)
static

Definition at line 1938 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ get_qt_codec()

static int get_qt_codec ( MatroskaTrack track,
uint32_t *  fourcc,
enum AVCodecID codec_id 
)
static

Definition at line 2037 of file matroskadec.c.

Referenced by matroska_parse_tracks().

◆ matroska_parse_tracks()

static int matroska_parse_tracks ( AVFormatContext s)
static

Definition at line 2065 of file matroskadec.c.

Referenced by matroska_read_header().

◆ matroska_read_header()

static int matroska_read_header ( AVFormatContext s)
static

Definition at line 2585 of file matroskadec.c.

Referenced by webm_dash_manifest_read_header().

◆ matroska_deliver_packet()

static int matroska_deliver_packet ( MatroskaDemuxContext matroska,
AVPacket pkt 
)
static

Definition at line 2742 of file matroskadec.c.

Referenced by matroska_read_packet().

◆ matroska_clear_queue()

static void matroska_clear_queue ( MatroskaDemuxContext matroska)
static

◆ matroska_parse_laces()

static int matroska_parse_laces ( MatroskaDemuxContext matroska,
uint8_t **  buf,
int buf_size,
int  type,
uint32_t **  lace_buf,
int laces 
)
static

Definition at line 2774 of file matroskadec.c.

Referenced by matroska_parse_block().

◆ matroska_parse_rm_audio()

static int matroska_parse_rm_audio ( MatroskaDemuxContext matroska,
MatroskaTrack track,
AVStream st,
uint8_t data,
int  size,
uint64_t  timecode,
int64_t  pos 
)
static

Definition at line 2883 of file matroskadec.c.

Referenced by matroska_parse_block().

◆ matroska_parse_wavpack()

static int matroska_parse_wavpack ( MatroskaTrack track,
uint8_t src,
uint8_t **  pdst,
int size 
)
static

Definition at line 2961 of file matroskadec.c.

Referenced by matroska_parse_frame().

◆ matroska_parse_prores()

static int matroska_parse_prores ( MatroskaTrack track,
uint8_t src,
uint8_t **  pdst,
int size 
)
static

Definition at line 3043 of file matroskadec.c.

Referenced by matroska_parse_frame().

◆ matroska_parse_webvtt()

static int matroska_parse_webvtt ( MatroskaDemuxContext matroska,
MatroskaTrack track,
AVStream st,
uint8_t data,
int  data_len,
uint64_t  timecode,
uint64_t  duration,
int64_t  pos 
)
static

Definition at line 3067 of file matroskadec.c.

Referenced by matroska_parse_block().

◆ matroska_parse_frame()

static int matroska_parse_frame ( MatroskaDemuxContext matroska,
MatroskaTrack track,
AVStream st,
AVBufferRef buf,
uint8_t data,
int  pkt_size,
uint64_t  timecode,
uint64_t  lace_duration,
int64_t  pos,
int  is_keyframe,
uint8_t additional,
uint64_t  additional_id,
int  additional_size,
int64_t  discard_padding 
)
static

Definition at line 3182 of file matroskadec.c.

Referenced by matroska_parse_block().

◆ matroska_parse_block()

static int matroska_parse_block ( MatroskaDemuxContext matroska,
AVBufferRef buf,
uint8_t data,
int  size,
int64_t  pos,
uint64_t  cluster_time,
uint64_t  block_duration,
int  is_keyframe,
uint8_t additional,
uint64_t  additional_id,
int  additional_size,
int64_t  cluster_pos,
int64_t  discard_padding 
)
static

Definition at line 3303 of file matroskadec.c.

Referenced by matroska_parse_cluster(), and matroska_parse_cluster_incremental().

◆ matroska_parse_cluster_incremental()

static int matroska_parse_cluster_incremental ( MatroskaDemuxContext matroska)
static

Definition at line 3441 of file matroskadec.c.

Referenced by matroska_parse_cluster().

◆ matroska_parse_cluster()

static int matroska_parse_cluster ( MatroskaDemuxContext matroska)
static

◆ matroska_read_packet()

static int matroska_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 3527 of file matroskadec.c.

◆ matroska_read_seek()

static int matroska_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 3543 of file matroskadec.c.

◆ get_cue_desc()

static CueDesc get_cue_desc ( AVFormatContext s,
int64_t  ts,
int64_t  cues_start 
)
static

◆ webm_clusters_start_with_keyframe()

static int webm_clusters_start_with_keyframe ( AVFormatContext s)
static

Definition at line 3668 of file matroskadec.c.

Referenced by webm_dash_manifest_cues().

◆ buffer_size_after_time_downloaded()

static int buffer_size_after_time_downloaded ( int64_t  time_ns,
double  search_sec,
int64_t  bps,
double  min_buffer,
double *  buffer,
double *  sec_to_download,
AVFormatContext s,
int64_t  cues_start 
)
static

Definition at line 3707 of file matroskadec.c.

Referenced by webm_dash_manifest_compute_bandwidth().

◆ webm_dash_manifest_compute_bandwidth()

static int64_t webm_dash_manifest_compute_bandwidth ( AVFormatContext s,
int64_t  cues_start 
)
static

Definition at line 3788 of file matroskadec.c.

Referenced by webm_dash_manifest_cues().

◆ webm_dash_manifest_cues()

static int webm_dash_manifest_cues ( AVFormatContext s,
int64_t  init_range 
)
static

Definition at line 3875 of file matroskadec.c.

Referenced by webm_dash_manifest_read_header().

◆ webm_dash_manifest_read_header()

static int webm_dash_manifest_read_header ( AVFormatContext s)
static

Definition at line 3953 of file matroskadec.c.

◆ webm_dash_manifest_read_packet()

static int webm_dash_manifest_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 4007 of file matroskadec.c.

Variable Documentation

◆ ebml_header

const EbmlSyntax ebml_header[]
static
Initial value:
= {
{ EBML_ID_EBMLMAXSIZELENGTH, EBML_UINT, 0, 0x42, { .u = 8 } },
{ EBML_ID_EBMLMAXIDLENGTH, EBML_UINT, 0, 0x42, { .u = 4 } },
{ EBML_ID_DOCTYPE, EBML_STR, 0, 0x42, { .s = "(none)" } },
{ EBML_ID_DOCTYPEREADVERSION, EBML_UINT, 0, 0x42, { .u = 1 } },
{ EBML_ID_DOCTYPEVERSION, EBML_NONE },
{ 0 }
}
#define EBML_ID_DOCTYPEREADVERSION
Definition: matroska.h:42
#define EBML_ID_DOCTYPE
Definition: matroska.h:40
#define EBML_VERSION
Definition: matroska.h:30
#define EBML_ID_EBMLREADVERSION
Definition: matroska.h:37
#define EBML_ID_EBMLMAXIDLENGTH
Definition: matroska.h:38
#define EBML_ID_EBMLVERSION
Definition: matroska.h:36
#define EBML_ID_EBMLMAXSIZELENGTH
Definition: matroska.h:39
#define EBML_ID_DOCTYPEVERSION
Definition: matroska.h:41

Definition at line 382 of file matroskadec.c.

Referenced by mkv_write_header().

◆ ebml_syntax

const EbmlSyntax ebml_syntax[]
static
Initial value:
= {
{ EBML_ID_HEADER, EBML_NEST, 0, 0, { .n = ebml_header } },
{ 0 }
}
static const EbmlSyntax ebml_header[]
Definition: matroskadec.c:382
#define EBML_ID_HEADER
Definition: matroska.h:33

Definition at line 393 of file matroskadec.c.

◆ matroska_info

const EbmlSyntax matroska_info[]
static
Initial value:
= {
{ MATROSKA_ID_TIMECODESCALE, EBML_UINT, 0, 0x42, { .u = 1000000 } },
{ MATROSKA_ID_SEGMENTUID, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_DATEUTC
Definition: matroska.h:71
#define MATROSKA_ID_MUXINGAPP
Definition: matroska.h:70
#define MATROSKA_ID_TIMECODESCALE
Definition: matroska.h:66
#define MATROSKA_ID_SEGMENTUID
Definition: matroska.h:72
#define MATROSKA_ID_WRITINGAPP
Definition: matroska.h:69
#define MATROSKA_ID_TITLE
Definition: matroska.h:68
#define MATROSKA_ID_DURATION
Definition: matroska.h:67

Definition at line 398 of file matroskadec.c.

◆ matroska_mastering_meta

const EbmlSyntax matroska_mastering_meta[]
static
Initial value:
= {
{ MATROSKA_ID_VIDEOCOLOR_RX, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_RY, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_GX, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_GY, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_BX, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_BY, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_WHITEX, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ MATROSKA_ID_VIDEOCOLOR_WHITEY, EBML_FLOAT, 0, 0x42, { .f=-1 } },
{ 0 }
}
#define MATROSKA_ID_VIDEOCOLOR_GX
Definition: matroska.h:147
#define MATROSKA_ID_VIDEOCOLOR_RX
Definition: matroska.h:145
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX
Definition: matroska.h:153
#define MATROSKA_ID_VIDEOCOLOR_BX
Definition: matroska.h:149
#define MATROSKA_ID_VIDEOCOLOR_WHITEY
Definition: matroska.h:152
#define MATROSKA_ID_VIDEOCOLOR_BY
Definition: matroska.h:150
#define MATROSKA_ID_VIDEOCOLOR_WHITEX
Definition: matroska.h:151
#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN
Definition: matroska.h:154
#define MATROSKA_ID_VIDEOCOLOR_GY
Definition: matroska.h:148
#define MATROSKA_ID_VIDEOCOLOR_RY
Definition: matroska.h:146

Definition at line 409 of file matroskadec.c.

◆ matroska_track_video_color

const EbmlSyntax matroska_track_video_color[]
static
Initial value:
= {
{ MATROSKA_ID_VIDEOCOLORCBSUBHORZ, EBML_UINT, 0, 0x42, { .u=0 } },
{ MATROSKA_ID_VIDEOCOLORCBSUBVERT, EBML_UINT, 0, 0x42, { .u=0 } },
{ MATROSKA_ID_VIDEOCOLORMAXCLL, EBML_UINT, 0, 0x42, { .u=0 } },
{ MATROSKA_ID_VIDEOCOLORMAXFALL, EBML_UINT, 0, 0x42, { .u=0 } },
{ 0 }
}
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ
Definition: matroska.h:135
#define MATROSKA_ID_VIDEOCOLORCBSUBVERT
Definition: matroska.h:134
#define MATROSKA_ID_VIDEOCOLORMAXCLL
Definition: matroska.h:141
#define MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT
Definition: matroska.h:136
static const EbmlSyntax matroska_mastering_meta[]
Definition: matroskadec.c:409
#define MATROSKA_ID_VIDEOCOLORBITSPERCHANNEL
Definition: matroska.h:130
#define MATROSKA_ID_VIDEOCOLORCHROMASUBVERT
Definition: matroska.h:132
#define MATROSKA_ID_VIDEOCOLORMATRIXCOEFF
Definition: matroska.h:129
#define MATROSKA_ID_VIDEOCOLORPRIMARIES
Definition: matroska.h:140
#define MATROSKA_ID_VIDEOCOLORCHROMASUBHORZ
Definition: matroska.h:131
#define MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS
Definition: matroska.h:138
#define MATROSKA_ID_VIDEOCOLORMASTERINGMETA
Definition: matroska.h:144
#define MATROSKA_ID_VIDEOCOLORRANGE
Definition: matroska.h:137
#define MATROSKA_ID_VIDEOCOLORMAXFALL
Definition: matroska.h:142
#define MATROSKA_ID_VIDEOCOLORCBSUBHORZ
Definition: matroska.h:133

Definition at line 423 of file matroskadec.c.

◆ matroska_track_video_projection

const EbmlSyntax matroska_track_video_projection[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_VIDEOPROJECTIONPOSEYAW
Definition: matroska.h:159
#define MATROSKA_ID_VIDEOPROJECTIONPOSEROLL
Definition: matroska.h:161
#define MATROSKA_ID_VIDEOPROJECTIONTYPE
Definition: matroska.h:157
#define MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH
Definition: matroska.h:160
#define MATROSKA_ID_VIDEOPROJECTIONPRIVATE
Definition: matroska.h:158

Definition at line 441 of file matroskadec.c.

◆ matroska_track_video

const EbmlSyntax matroska_track_video[]
static
Initial value:
= {
{ MATROSKA_ID_VIDEODISPLAYWIDTH, EBML_UINT, 0, 0x42, { .u=-1 } },
{ MATROSKA_ID_VIDEODISPLAYHEIGHT, EBML_UINT, 0, 0x42, { .u=-1 } },
{ 0 }
}
#define MATROSKA_ID_VIDEOFLAGINTERLACED
Definition: matroska.h:121
#define MATROSKA_ID_VIDEODISPLAYHEIGHT
Definition: matroska.h:113
#define MATROSKA_ID_VIDEOASPECTRATIO
Definition: matroska.h:125
static const EbmlSyntax matroska_track_video_projection[]
Definition: matroskadec.c:441
#define MATROSKA_ID_VIDEOPIXELCROPT
Definition: matroska.h:117
static const EbmlSyntax matroska_track_video_color[]
Definition: matroskadec.c:423
#define MATROSKA_ID_VIDEOCOLOR
Definition: matroska.h:127
#define MATROSKA_ID_VIDEODISPLAYWIDTH
Definition: matroska.h:112
#define MATROSKA_ID_VIDEOSTEREOMODE
Definition: matroska.h:123
#define MATROSKA_ID_VIDEOPIXELCROPR
Definition: matroska.h:119
#define MATROSKA_ID_VIDEOCOLORSPACE
Definition: matroska.h:126
#define MATROSKA_ID_VIDEOPIXELCROPB
Definition: matroska.h:116
#define MATROSKA_ID_VIDEOPIXELHEIGHT
Definition: matroska.h:115
#define MATROSKA_ID_VIDEOPROJECTION
Definition: matroska.h:156
#define MATROSKA_ID_VIDEOFRAMERATE
Definition: matroska.h:111
#define MATROSKA_ID_VIDEOFIELDORDER
Definition: matroska.h:122
#define MATROSKA_ID_VIDEOALPHAMODE
Definition: matroska.h:124
#define MATROSKA_ID_VIDEOPIXELCROPL
Definition: matroska.h:118
#define MATROSKA_ID_VIDEODISPLAYUNIT
Definition: matroska.h:120
#define MATROSKA_ID_VIDEOPIXELWIDTH
Definition: matroska.h:114

Definition at line 450 of file matroskadec.c.

◆ matroska_track_audio

const EbmlSyntax matroska_track_audio[]
static
Initial value:
= {
{ MATROSKA_ID_AUDIOSAMPLINGFREQ, EBML_FLOAT, 0, 0x42, { .f = 8000.0 } },
{ MATROSKA_ID_AUDIOCHANNELS, EBML_UINT, 0, 0x42, { .u = 1 } },
{ 0 }
}
#define MATROSKA_ID_AUDIOBITDEPTH
Definition: matroska.h:167
#define MATROSKA_ID_AUDIOCHANNELS
Definition: matroska.h:168
#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ
Definition: matroska.h:165
#define MATROSKA_ID_AUDIOSAMPLINGFREQ
Definition: matroska.h:164

Definition at line 472 of file matroskadec.c.

◆ matroska_track_encoding_compression

const EbmlSyntax matroska_track_encoding_compression[]
static
Initial value:
= {
{ MATROSKA_ID_ENCODINGCOMPALGO, EBML_UINT, 0, 0x42, { .u = 0 } },
{ 0 }
}
#define MATROSKA_ID_ENCODINGCOMPSETTINGS
Definition: matroska.h:176
#define MATROSKA_ID_ENCODINGCOMPALGO
Definition: matroska.h:175

Definition at line 480 of file matroskadec.c.

◆ matroska_track_encoding_encryption

const EbmlSyntax matroska_track_encoding_encryption[]
static
Initial value:
= {
{ MATROSKA_ID_ENCODINGENCALGO, EBML_UINT, 0, 0x42, {.u = 0} },
{ 0 }
}
#define MATROSKA_ID_ENCODINGENCALGO
Definition: matroska.h:180
#define MATROSKA_ID_ENCODINGSIGHASHALGO
Definition: matroska.h:183
#define MATROSKA_ID_ENCODINGSIGALGO
Definition: matroska.h:182
#define MATROSKA_ID_ENCODINGSIGKEYID
Definition: matroska.h:184
#define MATROSKA_ID_ENCODINGENCAESSETTINGS
Definition: matroska.h:179
#define MATROSKA_ID_ENCODINGSIGNATURE
Definition: matroska.h:185
#define MATROSKA_ID_ENCODINGENCKEYID
Definition: matroska.h:181

Definition at line 486 of file matroskadec.c.

◆ matroska_track_encoding

const EbmlSyntax matroska_track_encoding[]
static
Initial value:
= {
{ MATROSKA_ID_ENCODINGSCOPE, EBML_UINT, 0, 0x42, { .u = 1 } },
{ MATROSKA_ID_ENCODINGTYPE, EBML_UINT, 0, 0x42, { .u = 0 } },
{ 0 }
}
#define MATROSKA_ID_ENCODINGTYPE
Definition: matroska.h:173
#define MATROSKA_ID_ENCODINGENCRYPTION
Definition: matroska.h:178
#define MATROSKA_ID_ENCODINGORDER
Definition: matroska.h:171
static const EbmlSyntax matroska_track_encoding_compression[]
Definition: matroskadec.c:480
#define MATROSKA_ID_ENCODINGCOMPRESSION
Definition: matroska.h:174
static const EbmlSyntax matroska_track_encoding_encryption[]
Definition: matroskadec.c:486
#define MATROSKA_ID_ENCODINGSCOPE
Definition: matroska.h:172

Definition at line 496 of file matroskadec.c.

◆ matroska_track_encodings

const EbmlSyntax matroska_track_encodings[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_TRACKCONTENTENCODING
Definition: matroska.h:106
static const EbmlSyntax matroska_track_encoding[]
Definition: matroskadec.c:496

Definition at line 505 of file matroskadec.c.

◆ matroska_track_plane

const EbmlSyntax matroska_track_plane[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_TRACKPLANEUID
Definition: matroska.h:86
#define MATROSKA_ID_TRACKPLANETYPE
Definition: matroska.h:87

Definition at line 510 of file matroskadec.c.

◆ matroska_track_combine_planes

const EbmlSyntax matroska_track_combine_planes[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_track_plane[]
Definition: matroskadec.c:510
#define MATROSKA_ID_TRACKPLANE
Definition: matroska.h:85

Definition at line 516 of file matroskadec.c.

◆ matroska_track_operation

const EbmlSyntax matroska_track_operation[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_track_combine_planes[]
Definition: matroskadec.c:516
#define MATROSKA_ID_TRACKCOMBINEPLANES
Definition: matroska.h:84

Definition at line 521 of file matroskadec.c.

◆ matroska_track

const EbmlSyntax matroska_track[]
static
Initial value:
= {
{ MATROSKA_ID_TRACKLANGUAGE, EBML_UTF8, 0, 0x42, { .s = "eng" } },
{ MATROSKA_ID_TRACKTIMECODESCALE, EBML_FLOAT, 0, 0x42, { .f = 1.0 } },
{ MATROSKA_ID_TRACKFLAGDEFAULT, EBML_UINT, 0, 0x42, { .u = 1 } },
{ MATROSKA_ID_TRACKFLAGFORCED, EBML_UINT, 0, 0x42, { .u = 0 } },
{ MATROSKA_ID_CODECNAME, EBML_NONE },
{ MATROSKA_ID_CODECINFOURL, EBML_NONE },
{ MATROSKA_ID_TRACKMINCACHE, EBML_NONE },
{ MATROSKA_ID_TRACKMAXCACHE, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_SEEKPREROLL
Definition: matroska.h:95
#define MATROSKA_ID_TRACKDEFAULTDURATION
Definition: matroska.h:104
#define MATROSKA_ID_TRACKFLAGLACING
Definition: matroska.h:101
#define MATROSKA_ID_CODECPRIVATE
Definition: matroska.h:89
static const EbmlSyntax matroska_track_video[]
Definition: matroskadec.c:450
#define MATROSKA_ID_TRACKFLAGDEFAULT
Definition: matroska.h:99
#define MATROSKA_ID_TRACKTYPE
Definition: matroska.h:80
static const EbmlSyntax matroska_track_encodings[]
Definition: matroskadec.c:505
#define MATROSKA_ID_TRACKCONTENTENCODINGS
Definition: matroska.h:105
#define MATROSKA_ID_CODECDOWNLOADURL
Definition: matroska.h:92
#define MATROSKA_ID_TRACKLANGUAGE
Definition: matroska.h:97
#define MATROSKA_ID_CODECNAME
Definition: matroska.h:90
#define MATROSKA_ID_CODECDECODEALL
Definition: matroska.h:93
#define MATROSKA_ID_TRACKNUMBER
Definition: matroska.h:78
#define MATROSKA_ID_TRACKUID
Definition: matroska.h:79
#define MATROSKA_ID_TRACKTIMECODESCALE
Definition: matroska.h:107
#define MATROSKA_ID_TRACKMAXCACHE
Definition: matroska.h:103
#define MATROSKA_ID_TRACKMINCACHE
Definition: matroska.h:102
static const EbmlSyntax matroska_track_operation[]
Definition: matroskadec.c:521
#define MATROSKA_ID_TRACKFLAGFORCED
Definition: matroska.h:100
#define MATROSKA_ID_TRACKFLAGENABLED
Definition: matroska.h:98
#define MATROSKA_ID_TRACKNAME
Definition: matroska.h:96
#define MATROSKA_ID_TRACKVIDEO
Definition: matroska.h:81
#define MATROSKA_ID_TRACKOPERATION
Definition: matroska.h:83
static const EbmlSyntax matroska_track_audio[]
Definition: matroskadec.c:472
#define MATROSKA_ID_CODECID
Definition: matroska.h:88
#define MATROSKA_ID_CODECDELAY
Definition: matroska.h:94
#define MATROSKA_ID_TRACKMAXBLKADDID
Definition: matroska.h:108
#define MATROSKA_ID_CODECINFOURL
Definition: matroska.h:91
#define MATROSKA_ID_TRACKAUDIO
Definition: matroska.h:82

Definition at line 526 of file matroskadec.c.

◆ matroska_tracks

const EbmlSyntax matroska_tracks[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_TRACKENTRY
Definition: matroska.h:75
static const EbmlSyntax matroska_track[]
Definition: matroskadec.c:526

Definition at line 556 of file matroskadec.c.

◆ matroska_attachment

const EbmlSyntax matroska_attachment[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_FILEDATA
Definition: matroska.h:246
#define MATROSKA_ID_FILEDESC
Definition: matroska.h:243
#define MATROSKA_ID_FILEMIMETYPE
Definition: matroska.h:245
#define MATROSKA_ID_FILENAME
Definition: matroska.h:244
#define MATROSKA_ID_FILEUID
Definition: matroska.h:247

Definition at line 561 of file matroskadec.c.

◆ matroska_attachments

const EbmlSyntax matroska_attachments[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_attachment[]
Definition: matroskadec.c:561
#define MATROSKA_ID_ATTACHEDFILE
Definition: matroska.h:242

Definition at line 570 of file matroskadec.c.

◆ matroska_chapter_display

const EbmlSyntax matroska_chapter_display[]
static
Initial value:
= {
{ MATROSKA_ID_CHAPCOUNTRY, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_CHAPLANG
Definition: matroska.h:256
#define MATROSKA_ID_CHAPCOUNTRY
Definition: matroska.h:257
#define MATROSKA_ID_CHAPSTRING
Definition: matroska.h:255

Definition at line 575 of file matroskadec.c.

◆ matroska_chapter_entry

const EbmlSyntax matroska_chapter_entry[]
static
Initial value:
= {
{ MATROSKA_ID_CHAPTERATOM, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_CHAPTERTIMEEND
Definition: matroska.h:253
#define MATROSKA_ID_CHAPTERFLAGHIDDEN
Definition: matroska.h:263
#define MATROSKA_ID_CHAPTERFLAGENABLED
Definition: matroska.h:264
#define MATROSKA_ID_CHAPTERPHYSEQUIV
Definition: matroska.h:265
#define MATROSKA_ID_CHAPTERATOM
Definition: matroska.h:251
static const EbmlSyntax matroska_chapter_display[]
Definition: matroskadec.c:575
#define MATROSKA_ID_CHAPTERDISPLAY
Definition: matroska.h:254
#define MATROSKA_ID_CHAPTERTIMESTART
Definition: matroska.h:252
#define MATROSKA_ID_CHAPTERUID
Definition: matroska.h:262
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248

Definition at line 582 of file matroskadec.c.

◆ matroska_chapter

const EbmlSyntax matroska_chapter[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_EDITIONFLAGDEFAULT
Definition: matroska.h:260
#define MATROSKA_ID_EDITIONFLAGORDERED
Definition: matroska.h:261
#define MATROSKA_ID_EDITIONFLAGHIDDEN
Definition: matroska.h:259
#define MATROSKA_ID_EDITIONUID
Definition: matroska.h:258
static const EbmlSyntax matroska_chapter_entry[]
Definition: matroskadec.c:582
#define MATROSKA_ID_CHAPTERATOM
Definition: matroska.h:251

Definition at line 594 of file matroskadec.c.

◆ matroska_chapters

const EbmlSyntax matroska_chapters[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_chapter[]
Definition: matroskadec.c:594
#define MATROSKA_ID_EDITIONENTRY
Definition: matroska.h:250

Definition at line 603 of file matroskadec.c.

◆ matroska_index_pos

const EbmlSyntax matroska_index_pos[]
static
Initial value:
= {
{ MATROSKA_ID_CUEDURATION, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_CUECLUSTERPOSITION
Definition: matroska.h:196
#define MATROSKA_ID_CUERELATIVEPOSITION
Definition: matroska.h:197
#define MATROSKA_ID_CUEBLOCKNUMBER
Definition: matroska.h:199
#define MATROSKA_ID_CUEDURATION
Definition: matroska.h:198
#define MATROSKA_ID_CUETRACK
Definition: matroska.h:195

Definition at line 608 of file matroskadec.c.

◆ matroska_index_entry

const EbmlSyntax matroska_index_entry[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_CUETRACKPOSITION
Definition: matroska.h:192
#define MATROSKA_ID_CUETIME
Definition: matroska.h:191
static const EbmlSyntax matroska_index_pos[]
Definition: matroskadec.c:608

Definition at line 617 of file matroskadec.c.

◆ matroska_index

const EbmlSyntax matroska_index[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_index_entry[]
Definition: matroskadec.c:617
#define MATROSKA_ID_POINTENTRY
Definition: matroska.h:188

Definition at line 623 of file matroskadec.c.

◆ matroska_simpletag

const EbmlSyntax matroska_simpletag[]
static
Initial value:
= {
{ MATROSKA_ID_TAGLANG, EBML_STR, 0, 0x42, { .s = "und" } },
{ 0 }
}
static const EbmlSyntax matroska_simpletag[]
Definition: matroskadec.c:628
#define MATROSKA_ID_TAGDEFAULT_BUG
Definition: matroska.h:208
#define MATROSKA_ID_TAGNAME
Definition: matroska.h:204
#define MATROSKA_ID_SIMPLETAG
Definition: matroska.h:203
#define MATROSKA_ID_TAGDEFAULT
Definition: matroska.h:207
#define MATROSKA_ID_TAGLANG
Definition: matroska.h:206
#define MATROSKA_ID_TAGSTRING
Definition: matroska.h:205

Definition at line 628 of file matroskadec.c.

◆ matroska_tagtargets

const EbmlSyntax matroska_tagtargets[]
static
Initial value:
= {
{ MATROSKA_ID_TAGTARGETS_TYPEVALUE, EBML_UINT, 0, 0x42, { .u = 50 } },
{ 0 }
}
#define MATROSKA_ID_TAGTARGETS_TYPE
Definition: matroska.h:210
#define MATROSKA_ID_TAGTARGETS_ATTACHUID
Definition: matroska.h:214
#define MATROSKA_ID_TAGTARGETS_CHAPTERUID
Definition: matroska.h:213
#define MATROSKA_ID_TAGTARGETS_TYPEVALUE
Definition: matroska.h:211
#define MATROSKA_ID_TAGTARGETS_TRACKUID
Definition: matroska.h:212

Definition at line 638 of file matroskadec.c.

◆ matroska_tag

const EbmlSyntax matroska_tag[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_simpletag[]
Definition: matroskadec.c:628
static const EbmlSyntax matroska_tagtargets[]
Definition: matroskadec.c:638
#define MATROSKA_ID_TAGTARGETS
Definition: matroska.h:209
#define MATROSKA_ID_SIMPLETAG
Definition: matroska.h:203

Definition at line 647 of file matroskadec.c.

◆ matroska_tags

const EbmlSyntax matroska_tags[]
static
Initial value:
= {
{ MATROSKA_ID_TAG, EBML_NEST, sizeof(MatroskaTags), 0x42, { .n = matroska_tag } },
{ 0 }
}
#define MATROSKA_ID_TAG
Definition: matroska.h:202
static const EbmlSyntax matroska_tag[]
Definition: matroskadec.c:647

Definition at line 653 of file matroskadec.c.

◆ matroska_seekhead_entry

const EbmlSyntax matroska_seekhead_entry[]
static
Initial value:
= {
{ MATROSKA_ID_SEEKPOSITION, EBML_UINT, 0, 0x42, { .u = -1 } },
{ 0 }
}
#define MATROSKA_ID_SEEKID
Definition: matroska.h:220
#define MATROSKA_ID_SEEKPOSITION
Definition: matroska.h:221

Definition at line 658 of file matroskadec.c.

◆ matroska_seekhead

const EbmlSyntax matroska_seekhead[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_seekhead_entry[]
Definition: matroskadec.c:658
#define MATROSKA_ID_SEEKENTRY
Definition: matroska.h:217

Definition at line 664 of file matroskadec.c.

◆ matroska_segment

const EbmlSyntax matroska_segment[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_tracks[]
Definition: matroskadec.c:556
static const EbmlSyntax matroska_info[]
Definition: matroskadec.c:398
static const EbmlSyntax matroska_chapters[]
Definition: matroskadec.c:603
static const EbmlSyntax matroska_index[]
Definition: matroskadec.c:623
#define MATROSKA_ID_CUES
Definition: matroska.h:58
#define MATROSKA_ID_CLUSTER
Definition: matroska.h:62
#define MATROSKA_ID_CHAPTERS
Definition: matroska.h:63
static const EbmlSyntax matroska_tags[]
Definition: matroskadec.c:653
#define MATROSKA_ID_TAGS
Definition: matroska.h:59
#define MATROSKA_ID_INFO
Definition: matroska.h:56
#define MATROSKA_ID_TRACKS
Definition: matroska.h:57
static const EbmlSyntax matroska_attachments[]
Definition: matroskadec.c:570
#define MATROSKA_ID_ATTACHMENTS
Definition: matroska.h:61
static const EbmlSyntax matroska_seekhead[]
Definition: matroskadec.c:664
#define MATROSKA_ID_SEEKHEAD
Definition: matroska.h:60

Definition at line 669 of file matroskadec.c.

◆ matroska_segments

const EbmlSyntax matroska_segments[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_segment[]
Definition: matroskadec.c:669
#define MATROSKA_ID_SEGMENT
Definition: matroska.h:53

Definition at line 681 of file matroskadec.c.

◆ matroska_blockmore

const EbmlSyntax matroska_blockmore[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_BLOCKADDID
Definition: matroska.h:230
#define MATROSKA_ID_BLOCKADDITIONAL
Definition: matroska.h:231

Definition at line 686 of file matroskadec.c.

◆ matroska_blockadditions

const EbmlSyntax matroska_blockadditions[]
static
Initial value:
= {
{ 0 }
}
#define MATROSKA_ID_BLOCKMORE
Definition: matroska.h:229
static const EbmlSyntax matroska_blockmore[]
Definition: matroskadec.c:686

Definition at line 692 of file matroskadec.c.

◆ matroska_blockgroup

const EbmlSyntax matroska_blockgroup[]
static
Initial value:
= {
{ MATROSKA_ID_BLOCK, EBML_BIN, 0, 0x42 },
{ MATROSKA_ID_BLOCKREFERENCE, EBML_SINT, 0, 0x42, { .i = INT64_MIN } },
{ 1, EBML_UINT, 0, 0x42, { .u = 1 } },
{ 0 }
}
#define MATROSKA_ID_BLOCKREFERENCE
Definition: matroska.h:237
#define MATROSKA_ID_SIMPLEBLOCK
Definition: matroska.h:232
#define MATROSKA_ID_BLOCKADDITIONS
Definition: matroska.h:228
#define MATROSKA_ID_BLOCKDURATION
Definition: matroska.h:236
#define MATROSKA_ID_BLOCK
Definition: matroska.h:235
static const EbmlSyntax matroska_blockadditions[]
Definition: matroskadec.c:692
#define MATROSKA_ID_CODECSTATE
Definition: matroska.h:238
#define MATROSKA_ID_DISCARDPADDING
Definition: matroska.h:239

Definition at line 697 of file matroskadec.c.

◆ matroska_cluster

const EbmlSyntax matroska_cluster[]
static
Initial value:
= {
{ 0 }
}
static const EbmlSyntax matroska_blockgroup[]
Definition: matroskadec.c:697
#define MATROSKA_ID_CLUSTERPOSITION
Definition: matroska.h:225
#define MATROSKA_ID_CLUSTERTIMECODE
Definition: matroska.h:224
#define MATROSKA_ID_SIMPLEBLOCK
Definition: matroska.h:232
#define MATROSKA_ID_BLOCKGROUP
Definition: matroska.h:227
#define MATROSKA_ID_CLUSTERPREVSIZE
Definition: matroska.h:226

Definition at line 709 of file matroskadec.c.

◆ matroska_clusters

const EbmlSyntax matroska_clusters[]
static
Initial value:
= {
{ MATROSKA_ID_CUES, EBML_NONE },
{ MATROSKA_ID_TAGS, EBML_NONE },
{ MATROSKA_ID_SEEKHEAD, EBML_NONE },
{ 0 }
}
static const EbmlSyntax matroska_cluster[]
Definition: matroskadec.c:709
#define MATROSKA_ID_CUES
Definition: matroska.h:58
#define MATROSKA_ID_CLUSTER
Definition: matroska.h:62
#define MATROSKA_ID_TAGS
Definition: matroska.h:59
#define MATROSKA_ID_INFO
Definition: matroska.h:56
#define MATROSKA_ID_SEEKHEAD
Definition: matroska.h:60

Definition at line 718 of file matroskadec.c.

◆ matroska_cluster_incremental_parsing

const EbmlSyntax matroska_cluster_incremental_parsing[]
static
Initial value:
= {
{ MATROSKA_ID_INFO, EBML_NONE },
{ MATROSKA_ID_CUES, EBML_NONE },
{ MATROSKA_ID_TAGS, EBML_NONE },
{ MATROSKA_ID_SEEKHEAD, EBML_NONE },
{ 0 }
}
static const EbmlSyntax matroska_blockgroup[]
Definition: matroskadec.c:697
#define MATROSKA_ID_CLUSTERPOSITION
Definition: matroska.h:225
#define MATROSKA_ID_CLUSTERTIMECODE
Definition: matroska.h:224
#define MATROSKA_ID_SIMPLEBLOCK
Definition: matroska.h:232
#define MATROSKA_ID_CUES
Definition: matroska.h:58
#define MATROSKA_ID_CLUSTER
Definition: matroska.h:62
#define MATROSKA_ID_TAGS
Definition: matroska.h:59
#define MATROSKA_ID_INFO
Definition: matroska.h:56
#define MATROSKA_ID_BLOCKGROUP
Definition: matroska.h:227
#define MATROSKA_ID_SEEKHEAD
Definition: matroska.h:60
#define MATROSKA_ID_CLUSTERPREVSIZE
Definition: matroska.h:226

Definition at line 727 of file matroskadec.c.

◆ matroska_cluster_incremental

const EbmlSyntax matroska_cluster_incremental[]
static
Initial value:
= {
{ MATROSKA_ID_SIMPLEBLOCK, EBML_STOP },
{ 0 }
}
#define MATROSKA_ID_CLUSTERPOSITION
Definition: matroska.h:225
#define MATROSKA_ID_CLUSTERTIMECODE
Definition: matroska.h:224
#define MATROSKA_ID_SIMPLEBLOCK
Definition: matroska.h:232
#define MATROSKA_ID_BLOCKGROUP
Definition: matroska.h:227
#define MATROSKA_ID_CLUSTERPREVSIZE
Definition: matroska.h:226

Definition at line 741 of file matroskadec.c.

◆ matroska_clusters_incremental

const EbmlSyntax matroska_clusters_incremental[]
static
Initial value:
= {
{ MATROSKA_ID_CUES, EBML_NONE },
{ MATROSKA_ID_TAGS, EBML_NONE },
{ MATROSKA_ID_SEEKHEAD, EBML_NONE },
{ 0 }
}
#define MATROSKA_ID_CUES
Definition: matroska.h:58
#define MATROSKA_ID_CLUSTER
Definition: matroska.h:62
static const EbmlSyntax matroska_cluster_incremental[]
Definition: matroskadec.c:741
#define MATROSKA_ID_TAGS
Definition: matroska.h:59
#define MATROSKA_ID_INFO
Definition: matroska.h:56
#define MATROSKA_ID_SEEKHEAD
Definition: matroska.h:60

Definition at line 750 of file matroskadec.c.

◆ matroska_doctypes

const char* const matroska_doctypes[] = { "matroska", "webm" }
static

Definition at line 759 of file matroskadec.c.

Referenced by matroska_probe(), and matroska_read_header().

◆ options

const AVOption options[]
static
Initial value:
= {
{ "live", "flag indicating that the input is a live file that only has the headers.", OFFSET(is_live), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{ "bandwidth", "bandwidth of this stream to be specified in the DASH manifest.", OFFSET(bandwidth), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: matroskadec.c:4012
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277

Definition at line 4013 of file matroskadec.c.

◆ webm_dash_class

const AVClass webm_dash_class
static
Initial value:
= {
.class_name = "WebM DASH Manifest demuxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: matroskadec.c:4013

Definition at line 4019 of file matroskadec.c.

◆ ff_matroska_demuxer

AVInputFormat ff_matroska_demuxer
Initial value:
= {
.name = "matroska,webm",
.long_name = NULL_IF_CONFIG_SMALL("Matroska / WebM"),
.extensions = "mkv,mk3d,mka,mks",
.priv_data_size = sizeof(MatroskaDemuxContext),
.mime_type = "audio/webm,audio/x-matroska,video/webm,video/x-matroska"
}
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int matroska_read_header(AVFormatContext *s)
Definition: matroskadec.c:2585
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int matroska_read_close(AVFormatContext *s)
Definition: matroskadec.c:3611
static int matroska_probe(AVProbeData *p)
Definition: matroskadec.c:1284
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int matroska_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: matroskadec.c:3543
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: matroskadec.c:3527

Definition at line 4026 of file matroskadec.c.

◆ ff_webm_dash_manifest_demuxer

AVInputFormat ff_webm_dash_manifest_demuxer
Initial value:
= {
.name = "webm_dash_manifest",
.long_name = NULL_IF_CONFIG_SMALL("WebM DASH Manifest"),
.priv_data_size = sizeof(MatroskaDemuxContext),
.priv_class = &webm_dash_class,
}
static int webm_dash_manifest_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: matroskadec.c:4007
static int webm_dash_manifest_read_header(AVFormatContext *s)
Definition: matroskadec.c:3953
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int matroska_read_close(AVFormatContext *s)
Definition: matroskadec.c:3611
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static const AVClass webm_dash_class
Definition: matroskadec.c:4019

Definition at line 4039 of file matroskadec.c.