FFmpeg
Data Structures | Macros | Functions | Variables
isom.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libavutil/encryption_info.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/spherical.h"
#include "libavutil/stereo3d.h"
#include "avio.h"
#include "internal.h"
#include "dv.h"

Go to the source code of this file.

Data Structures

struct  MOVStts
 
struct  MOVCtts
 
struct  MOVStsc
 
struct  MOVElst
 
struct  MOVDref
 
struct  MOVAtom
 
struct  MOVFragment
 
struct  MOVTrackExt
 
struct  MOVSbgp
 
struct  MOVEncryptionIndex
 
struct  MOVFragmentStreamInfo
 
struct  MOVFragmentIndexItem
 
struct  MOVFragmentIndex
 
struct  MOVIndexRange
 
struct  MOVStreamContext
 
struct  MOVContext
 
struct  MP4TrackKindValueMapping
 
struct  MP4TrackKindMapping
 

Macros

#define MP4ODescrTag   0x01
 
#define MP4IODescrTag   0x02
 
#define MP4ESDescrTag   0x03
 
#define MP4DecConfigDescrTag   0x04
 
#define MP4DecSpecificDescrTag   0x05
 
#define MP4SLDescrTag   0x06
 
#define MOV_TFHD_BASE_DATA_OFFSET   0x01
 
#define MOV_TFHD_STSD_ID   0x02
 
#define MOV_TFHD_DEFAULT_DURATION   0x08
 
#define MOV_TFHD_DEFAULT_SIZE   0x10
 
#define MOV_TFHD_DEFAULT_FLAGS   0x20
 
#define MOV_TFHD_DURATION_IS_EMPTY   0x010000
 
#define MOV_TFHD_DEFAULT_BASE_IS_MOOF   0x020000
 
#define MOV_TRUN_DATA_OFFSET   0x01
 
#define MOV_TRUN_FIRST_SAMPLE_FLAGS   0x04
 
#define MOV_TRUN_SAMPLE_DURATION   0x100
 
#define MOV_TRUN_SAMPLE_SIZE   0x200
 
#define MOV_TRUN_SAMPLE_FLAGS   0x400
 
#define MOV_TRUN_SAMPLE_CTS   0x800
 
#define MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK   0x0000ffff
 
#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC   0x00010000
 
#define MOV_FRAG_SAMPLE_FLAG_PADDING_MASK   0x000e0000
 
#define MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK   0x00300000
 
#define MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK   0x00c00000
 
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK   0x03000000
 
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO   0x02000000
 
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES   0x01000000
 
#define MOV_TKHD_FLAG_ENABLED   0x0001
 
#define MOV_TKHD_FLAG_IN_MOVIE   0x0002
 
#define MOV_TKHD_FLAG_IN_PREVIEW   0x0004
 
#define MOV_TKHD_FLAG_IN_POSTER   0x0008
 
#define MOV_SAMPLE_DEPENDENCY_UNKNOWN   0x0
 
#define MOV_SAMPLE_DEPENDENCY_YES   0x1
 
#define MOV_SAMPLE_DEPENDENCY_NO   0x2
 
#define TAG_IS_AVCI(tag)
 
#define FF_MOV_FLAG_MFRA_AUTO   -1
 
#define FF_MOV_FLAG_MFRA_DTS   1
 
#define FF_MOV_FLAG_MFRA_PTS   2
 
#define MOV_ISMV_TTML_TAG   MKTAG('d', 'f', 'x', 'p')
 
#define MOV_MP4_TTML_TAG   MKTAG('s', 't', 'p', 'p')
 

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)
 
int ff_mp4_read_dec_config_descr (AVFormatContext *fc, AVStream *st, AVIOContext *pb)
 
void ff_mp4_parse_es_descr (AVIOContext *pb, int *es_id)
 
int ff_mov_read_esds (AVFormatContext *fc, AVIOContext *pb)
 
int ff_mov_read_stsd_entries (MOVContext *c, AVIOContext *pb, int entries)
 
void ff_mov_write_chan (AVIOContext *pb, int64_t channel_layout)
 
static enum AVCodecID ff_mov_get_lpcm_codec_id (int bps, int flags)
 Compute codec id for 'lpcm' tag. More...
 

Variables

const AVCodecTag ff_mp4_obj_type []
 
const AVCodecTag ff_codec_movvideo_tags []
 
const AVCodecTag ff_codec_movaudio_tags []
 
const AVCodecTag ff_codec_movsubtitle_tags []
 
const AVCodecTag ff_codec_movdata_tags []
 
const struct MP4TrackKindMapping ff_mov_track_kind_table []
 

Macro Definition Documentation

◆ MP4ODescrTag

#define MP4ODescrTag   0x01

Definition at line 328 of file isom.h.

◆ MP4IODescrTag

#define MP4IODescrTag   0x02

Definition at line 329 of file isom.h.

◆ MP4ESDescrTag

#define MP4ESDescrTag   0x03

Definition at line 330 of file isom.h.

◆ MP4DecConfigDescrTag

#define MP4DecConfigDescrTag   0x04

Definition at line 331 of file isom.h.

◆ MP4DecSpecificDescrTag

#define MP4DecSpecificDescrTag   0x05

Definition at line 332 of file isom.h.

◆ MP4SLDescrTag

#define MP4SLDescrTag   0x06

Definition at line 333 of file isom.h.

◆ MOV_TFHD_BASE_DATA_OFFSET

#define MOV_TFHD_BASE_DATA_OFFSET   0x01

Definition at line 335 of file isom.h.

◆ MOV_TFHD_STSD_ID

#define MOV_TFHD_STSD_ID   0x02

Definition at line 336 of file isom.h.

◆ MOV_TFHD_DEFAULT_DURATION

#define MOV_TFHD_DEFAULT_DURATION   0x08

Definition at line 337 of file isom.h.

◆ MOV_TFHD_DEFAULT_SIZE

#define MOV_TFHD_DEFAULT_SIZE   0x10

Definition at line 338 of file isom.h.

◆ MOV_TFHD_DEFAULT_FLAGS

#define MOV_TFHD_DEFAULT_FLAGS   0x20

Definition at line 339 of file isom.h.

◆ MOV_TFHD_DURATION_IS_EMPTY

#define MOV_TFHD_DURATION_IS_EMPTY   0x010000

Definition at line 340 of file isom.h.

◆ MOV_TFHD_DEFAULT_BASE_IS_MOOF

#define MOV_TFHD_DEFAULT_BASE_IS_MOOF   0x020000

Definition at line 341 of file isom.h.

◆ MOV_TRUN_DATA_OFFSET

#define MOV_TRUN_DATA_OFFSET   0x01

Definition at line 343 of file isom.h.

◆ MOV_TRUN_FIRST_SAMPLE_FLAGS

#define MOV_TRUN_FIRST_SAMPLE_FLAGS   0x04

Definition at line 344 of file isom.h.

◆ MOV_TRUN_SAMPLE_DURATION

#define MOV_TRUN_SAMPLE_DURATION   0x100

Definition at line 345 of file isom.h.

◆ MOV_TRUN_SAMPLE_SIZE

#define MOV_TRUN_SAMPLE_SIZE   0x200

Definition at line 346 of file isom.h.

◆ MOV_TRUN_SAMPLE_FLAGS

#define MOV_TRUN_SAMPLE_FLAGS   0x400

Definition at line 347 of file isom.h.

◆ MOV_TRUN_SAMPLE_CTS

#define MOV_TRUN_SAMPLE_CTS   0x800

Definition at line 348 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK

#define MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK   0x0000ffff

Definition at line 350 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC

#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC   0x00010000

Definition at line 351 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_PADDING_MASK

#define MOV_FRAG_SAMPLE_FLAG_PADDING_MASK   0x000e0000

Definition at line 352 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK

#define MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK   0x00300000

Definition at line 353 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK

#define MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK   0x00c00000

Definition at line 354 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK

#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK   0x03000000

Definition at line 355 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO

#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO   0x02000000

Definition at line 357 of file isom.h.

◆ MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES

#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES   0x01000000

Definition at line 358 of file isom.h.

◆ MOV_TKHD_FLAG_ENABLED

#define MOV_TKHD_FLAG_ENABLED   0x0001

Definition at line 360 of file isom.h.

◆ MOV_TKHD_FLAG_IN_MOVIE

#define MOV_TKHD_FLAG_IN_MOVIE   0x0002

Definition at line 361 of file isom.h.

◆ MOV_TKHD_FLAG_IN_PREVIEW

#define MOV_TKHD_FLAG_IN_PREVIEW   0x0004

Definition at line 362 of file isom.h.

◆ MOV_TKHD_FLAG_IN_POSTER

#define MOV_TKHD_FLAG_IN_POSTER   0x0008

Definition at line 363 of file isom.h.

◆ MOV_SAMPLE_DEPENDENCY_UNKNOWN

#define MOV_SAMPLE_DEPENDENCY_UNKNOWN   0x0

Definition at line 365 of file isom.h.

◆ MOV_SAMPLE_DEPENDENCY_YES

#define MOV_SAMPLE_DEPENDENCY_YES   0x1

Definition at line 366 of file isom.h.

◆ MOV_SAMPLE_DEPENDENCY_NO

#define MOV_SAMPLE_DEPENDENCY_NO   0x2

Definition at line 367 of file isom.h.

◆ TAG_IS_AVCI

#define TAG_IS_AVCI (   tag)
Value:
((tag) == MKTAG('a', 'i', '5', 'p') || \
(tag) == MKTAG('a', 'i', '5', 'q') || \
(tag) == MKTAG('a', 'i', '5', '2') || \
(tag) == MKTAG('a', 'i', '5', '3') || \
(tag) == MKTAG('a', 'i', '5', '5') || \
(tag) == MKTAG('a', 'i', '5', '6') || \
(tag) == MKTAG('a', 'i', '1', 'p') || \
(tag) == MKTAG('a', 'i', '1', 'q') || \
(tag) == MKTAG('a', 'i', '1', '2') || \
(tag) == MKTAG('a', 'i', '1', '3') || \
(tag) == MKTAG('a', 'i', '1', '5') || \
(tag) == MKTAG('a', 'i', '1', '6') || \
(tag) == MKTAG('a', 'i', 'v', 'x') || \
(tag) == MKTAG('A', 'V', 'i', 'n'))

Definition at line 370 of file isom.h.

◆ FF_MOV_FLAG_MFRA_AUTO

#define FF_MOV_FLAG_MFRA_AUTO   -1

Definition at line 392 of file isom.h.

◆ FF_MOV_FLAG_MFRA_DTS

#define FF_MOV_FLAG_MFRA_DTS   1

Definition at line 393 of file isom.h.

◆ FF_MOV_FLAG_MFRA_PTS

#define FF_MOV_FLAG_MFRA_PTS   2

Definition at line 394 of file isom.h.

◆ MOV_ISMV_TTML_TAG

#define MOV_ISMV_TTML_TAG   MKTAG('d', 'f', 'x', 'p')

Definition at line 410 of file isom.h.

◆ MOV_MP4_TTML_TAG

#define MOV_MP4_TTML_TAG   MKTAG('s', 't', 'p', 'p')

Definition at line 411 of file isom.h.

Function Documentation

◆ ff_mov_iso639_to_lang()

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

Definition at line 233 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 260 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 282 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 295 of file isom.c.

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

◆ ff_mp4_read_dec_config_descr()

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

Definition at line 329 of file isom.c.

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

◆ ff_mp4_parse_es_descr()

void ff_mp4_parse_es_descr ( AVIOContext pb,
int es_id 
)

Definition at line 304 of file isom.c.

Referenced by ff_mov_read_esds(), and parse_MP4ESDescrTag().

◆ ff_mov_read_esds()

int ff_mov_read_esds ( AVFormatContext fc,
AVIOContext pb 
)

Definition at line 23 of file mov_esds.c.

Referenced by mov_read_esds(), and read_kuki_chunk().

◆ ff_mov_read_stsd_entries()

int ff_mov_read_stsd_entries ( MOVContext c,
AVIOContext pb,
int  entries 
)

Definition at line 2537 of file mov.c.

Referenced by mov_read_stsd(), and qt_rtp_parse_packet().

◆ 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().

◆ ff_mov_get_lpcm_codec_id()

static enum AVCodecID ff_mov_get_lpcm_codec_id ( int  bps,
int  flags 
)
inlinestatic

Compute codec id for 'lpcm' tag.

See CoreAudioTypes and AudioStreamBasicDescription at Apple.

Definition at line 400 of file isom.h.

Referenced by mov_parse_stsd_audio(), and read_desc_chunk().

Variable Documentation

◆ ff_mp4_obj_type

const AVCodecTag ff_mp4_obj_type[]

Definition at line 34 of file isom.c.

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

◆ ff_codec_movvideo_tags

const AVCodecTag ff_codec_movvideo_tags[]

◆ ff_codec_movaudio_tags

const AVCodecTag ff_codec_movaudio_tags[]

◆ ff_codec_movsubtitle_tags

const AVCodecTag ff_codec_movsubtitle_tags[]

Definition at line 75 of file isom.c.

Referenced by mov_codec_id(), and mov_get_codec_tag().

◆ ff_codec_movdata_tags

const AVCodecTag ff_codec_movdata_tags[]

Definition at line 82 of file isom.c.

Referenced by mov_codec_id().

◆ ff_mov_track_kind_table

const struct MP4TrackKindMapping ff_mov_track_kind_table[]

Definition at line 448 of file isom.c.

Referenced by mov_read_kind(), and mov_write_track_kinds().

tag
uint32_t tag
Definition: movenc.c:1646
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55