FFmpeg
Data Structures | Functions | Variables
isom.c File Reference
#include "avformat.h"
#include "internal.h"
#include "isom.h"
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/mpegaudiodata.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Data Structures

struct  MovChannelLayout
 

Functions

int ff_mov_iso639_to_lang (const char lang[4], int mp4)
 
int ff_mov_lang_to_iso639 (unsigned code, char to[4])
 
int ff_mp4_read_descr_len (AVIOContext *pb)
 
int ff_mp4_read_descr (AVFormatContext *fc, AVIOContext *pb, int *tag)
 
void ff_mp4_parse_es_descr (AVIOContext *pb, int *es_id)
 
int ff_mp4_read_dec_config_descr (AVFormatContext *fc, AVStream *st, AVIOContext *pb)
 
void ff_mov_write_chan (AVIOContext *pb, int64_t channel_layout)
 

Variables

const AVCodecTag ff_mp4_obj_type []
 
const AVCodecTag ff_codec_movsubtitle_tags []
 
const AVCodecTag ff_codec_movdata_tags []
 
static const char mov_mdhd_language_map [][4]
 
static const AVCodecTag mp4_audio_types []
 
static const MovChannelLayout mov_channel_layout []
 
static const struct MP4TrackKindValueMapping dash_role_map []
 
const struct MP4TrackKindMapping ff_mov_track_kind_table []
 

Function Documentation

◆ ff_mov_iso639_to_lang()

int ff_mov_iso639_to_lang ( const char  lang[4],
int  mp4 
)

Definition at line 234 of file isom.c.

Referenced by get_metadata_lang(), mov_init(), and mov_write_string_data_tag().

◆ ff_mov_lang_to_iso639()

int ff_mov_lang_to_iso639 ( unsigned  code,
char  to[4] 
)

Definition at line 261 of file isom.c.

Referenced by mov_metadata_loci(), mov_read_mdhd(), and mov_read_udta_string().

◆ ff_mp4_read_descr_len()

int ff_mp4_read_descr_len ( AVIOContext pb)

Definition at line 283 of file isom.c.

Referenced by ff_mp4_read_descr(), and read_pakt_chunk().

◆ ff_mp4_read_descr()

int ff_mp4_read_descr ( AVFormatContext fc,
AVIOContext pb,
int tag 
)

Definition at line 296 of file isom.c.

Referenced by ff_mov_read_esds(), ff_mp4_read_dec_config_descr(), and parse_mp4_descr().

◆ ff_mp4_parse_es_descr()

void ff_mp4_parse_es_descr ( AVIOContext pb,
int es_id 
)

Definition at line 305 of file isom.c.

Referenced by ff_mov_read_esds(), and parse_MP4ESDescrTag().

◆ ff_mp4_read_dec_config_descr()

int ff_mp4_read_dec_config_descr ( AVFormatContext fc,
AVStream st,
AVIOContext pb 
)

Definition at line 330 of file isom.c.

Referenced by ff_mov_read_esds(), ff_parse_mpeg2_descriptor(), and m4sl_cb().

◆ ff_mov_write_chan()

void ff_mov_write_chan ( AVIOContext pb,
int64_t  channel_layout 
)

Definition at line 413 of file isom.c.

Referenced by aiff_write_header(), and caf_write_header().

Variable Documentation

◆ ff_mp4_obj_type

const AVCodecTag ff_mp4_obj_type[]

Definition at line 35 of file isom.c.

Referenced by ff_mp4_read_dec_config_descr(), mov_write_esds_tag(), and set_codec_str().

◆ ff_codec_movsubtitle_tags

const AVCodecTag ff_codec_movsubtitle_tags[]
Initial value:
= {
{ AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
{ AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
{ AV_CODEC_ID_EIA_608, MKTAG('c', '6', '0', '8') },
}

Definition at line 76 of file isom.c.

Referenced by mov_codec_id(), and mov_get_codec_tag().

◆ ff_codec_movdata_tags

const AVCodecTag ff_codec_movdata_tags[]
Initial value:
= {
{ AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') },
}

Definition at line 83 of file isom.c.

Referenced by mov_codec_id().

◆ mov_mdhd_language_map

const char mov_mdhd_language_map[][4]
static

Definition at line 92 of file isom.c.

Referenced by ff_mov_iso639_to_lang(), and ff_mov_lang_to_iso639().

◆ mp4_audio_types

const AVCodecTag mp4_audio_types[]
static

◆ mov_channel_layout

const MovChannelLayout mov_channel_layout[]
static
Initial value:
= {
{ AV_CH_LAYOUT_MONO, (100<<16) | 1},
{ AV_CH_LAYOUT_STEREO, (101<<16) | 2},
{ AV_CH_LAYOUT_STEREO, (102<<16) | 2},
{ AV_CH_LAYOUT_2_1, (131<<16) | 3},
{ AV_CH_LAYOUT_QUAD, (132<<16) | 4},
{ AV_CH_LAYOUT_2_2, (132<<16) | 4},
{ AV_CH_LAYOUT_QUAD, (108<<16) | 4},
{ AV_CH_LAYOUT_SURROUND, (113<<16) | 3},
{ AV_CH_LAYOUT_4POINT0, (115<<16) | 4},
{ AV_CH_LAYOUT_5POINT0_BACK, (117<<16) | 5},
{ AV_CH_LAYOUT_5POINT0, (117<<16) | 5},
{ AV_CH_LAYOUT_5POINT1_BACK, (121<<16) | 6},
{ AV_CH_LAYOUT_5POINT1, (121<<16) | 6},
{ AV_CH_LAYOUT_7POINT1, (128<<16) | 8},
{ AV_CH_LAYOUT_7POINT1_WIDE, (126<<16) | 8},
{ 0, 0},
}

Definition at line 387 of file isom.c.

Referenced by ff_mov_write_chan().

◆ dash_role_map

const struct MP4TrackKindValueMapping dash_role_map[]
static
Initial value:

Definition at line 434 of file isom.c.

◆ ff_mov_track_kind_table

const struct MP4TrackKindMapping ff_mov_track_kind_table[]
Initial value:
= {
{ "urn:mpeg:dash:role:2011", dash_role_map },
{ 0, NULL }
}

Definition at line 448 of file isom.c.

Referenced by mov_read_kind(), and mov_write_track_kinds().

AV_CODEC_ID_EIA_608
@ AV_CODEC_ID_EIA_608
Definition: codec_id.h:532
AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
Definition: channel_layout.h:102
AOT_PS
@ AOT_PS
N Parametric Stereo.
Definition: mpeg4audio.h:101
AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_MONO
Definition: channel_layout.h:90
AV_CODEC_ID_MP3ON4
@ AV_CODEC_ID_MP3ON4
Definition: codec_id.h:437
AOT_L1
@ AOT_L1
Y Layer 1.
Definition: mpeg4audio.h:104
AV_CODEC_ID_BIN_DATA
@ AV_CODEC_ID_BIN_DATA
Definition: codec_id.h:562
AV_DISPOSITION_FORCED
#define AV_DISPOSITION_FORCED
Track should be used during playback by default.
Definition: avformat.h:853
AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_STEREO
Definition: channel_layout.h:91
AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_QUAD
Definition: channel_layout.h:99
AV_CH_LOW_FREQUENCY
#define AV_CH_LOW_FREQUENCY
Definition: channel_layout.h:52
AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_CH_LAYOUT_STEREO_DOWNMIX
Definition: channel_layout.h:117
AV_CH_LAYOUT_2_1
#define AV_CH_LAYOUT_2_1
Definition: channel_layout.h:93
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_MOV_TEXT
@ AV_CODEC_ID_MOV_TEXT
Definition: codec_id.h:527
AV_DISPOSITION_COMMENT
#define AV_DISPOSITION_COMMENT
The stream is a commentary track.
Definition: avformat.h:838
AV_CH_LAYOUT_5POINT1
#define AV_CH_LAYOUT_5POINT1
Definition: channel_layout.h:101
AV_CODEC_ID_MP4ALS
@ AV_CODEC_ID_MP4ALS
Definition: codec_id.h:468
AV_DISPOSITION_CAPTIONS
#define AV_DISPOSITION_CAPTIONS
The subtitle stream contains captions, providing a transcription and possibly a translation of audio.
Definition: avformat.h:884
AOT_L2
@ AOT_L2
Y Layer 2.
Definition: mpeg4audio.h:105
dash_role_map
static const struct MP4TrackKindValueMapping dash_role_map[]
Definition: isom.c:434
AV_DISPOSITION_DUB
#define AV_DISPOSITION_DUB
The stream is not in original language.
Definition: avformat.h:828
AV_DISPOSITION_HEARING_IMPAIRED
#define AV_DISPOSITION_HEARING_IMPAIRED
The stream is intended for hearing impaired audiences.
Definition: avformat.h:857
AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LAYOUT_5POINT1_BACK
Definition: channel_layout.h:103
AV_CH_LAYOUT_5POINT0
#define AV_CH_LAYOUT_5POINT0
Definition: channel_layout.h:100
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_7POINT1
Definition: channel_layout.h:112
AV_CH_LAYOUT_7POINT1_WIDE
#define AV_CH_LAYOUT_7POINT1_WIDE
Definition: channel_layout.h:113
AOT_NULL
@ AOT_NULL
Definition: mpeg4audio.h:74
AV_DISPOSITION_VISUAL_IMPAIRED
#define AV_DISPOSITION_VISUAL_IMPAIRED
The stream is intended for visually impaired audiences.
Definition: avformat.h:861
AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_SURROUND
Definition: channel_layout.h:94
AV_DISPOSITION_DESCRIPTIONS
#define AV_DISPOSITION_DESCRIPTIONS
The subtitle stream contains a textual description of the video content.
Definition: avformat.h:890
AOT_ALS
@ AOT_ALS
Y Audio LosslesS.
Definition: mpeg4audio.h:108
AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_4POINT0
Definition: channel_layout.h:96
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
AOT_L3
@ AOT_L3
Y Layer 3.
Definition: mpeg4audio.h:106
AV_CH_LAYOUT_2_2
#define AV_CH_LAYOUT_2_2
Definition: channel_layout.h:98