chromium/third_party/ffmpeg/libavformat/isom.h

/*
 * ISO Media common code
 * copyright (c) 2001 Fabrice Bellard
 * copyright (c) 2002 Francois Revol <[email protected]>
 * copyright (c) 2006 Baptiste Coudurier <[email protected]>
 *
 * 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_ISOM_H
#define AVFORMAT_ISOM_H

#include <stddef.h>
#include <stdint.h>

#include "libavutil/encryption_info.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/ambient_viewing_environment.h"
#include "libavutil/spherical.h"
#include "libavutil/stereo3d.h"

#include "avio.h"
#include "internal.h"
#include "dv.h"

/* isom.c */
extern const AVCodecTag ff_mp4_obj_type[];
extern const AVCodecTag ff_codec_movvideo_tags[];
extern const AVCodecTag ff_codec_movaudio_tags[];
extern const AVCodecTag ff_codec_movsubtitle_tags[];
extern const AVCodecTag ff_codec_movdata_tags[];

int ff_mov_iso639_to_lang(const char lang[4], int mp4);
int ff_mov_lang_to_iso639(unsigned code, char to[4]);

struct AVAESCTR;

/* the QuickTime file format is quite convoluted...
 * it has lots of index tables, each indexing something in another one...
 * Here we just use what is needed to read the chunks
 */

MOVStts;

MOVCtts;

MOVStsc;

MOVElst;

MOVDref;

MOVAtom;

struct MOVParseTableEntry;

MOVFragment;

MOVTrackExt;

MOVSbgp;

MOVEncryptionIndex;

MOVFragmentStreamInfo;

MOVFragmentIndexItem;

MOVFragmentIndex;

MOVIndexRange;

MOVStreamContext;

HEIFItem;

HEIFGrid;

MOVContext;

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);

#define MP4ODescrTag
#define MP4IODescrTag
#define MP4ESDescrTag
#define MP4DecConfigDescrTag
#define MP4DecSpecificDescrTag
#define MP4SLDescrTag

#define MOV_TFHD_BASE_DATA_OFFSET
#define MOV_TFHD_STSD_ID
#define MOV_TFHD_DEFAULT_DURATION
#define MOV_TFHD_DEFAULT_SIZE
#define MOV_TFHD_DEFAULT_FLAGS
#define MOV_TFHD_DURATION_IS_EMPTY
#define MOV_TFHD_DEFAULT_BASE_IS_MOOF

#define MOV_TRUN_DATA_OFFSET
#define MOV_TRUN_FIRST_SAMPLE_FLAGS
#define MOV_TRUN_SAMPLE_DURATION
#define MOV_TRUN_SAMPLE_SIZE
#define MOV_TRUN_SAMPLE_FLAGS
#define MOV_TRUN_SAMPLE_CTS

#define MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK
#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
#define MOV_FRAG_SAMPLE_FLAG_PADDING_MASK
#define MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK
#define MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK

#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES

#define MOV_TKHD_FLAG_ENABLED
#define MOV_TKHD_FLAG_IN_MOVIE
#define MOV_TKHD_FLAG_IN_PREVIEW
#define MOV_TKHD_FLAG_IN_POSTER

#define MOV_SAMPLE_DEPENDENCY_UNKNOWN
#define MOV_SAMPLE_DEPENDENCY_YES
#define MOV_SAMPLE_DEPENDENCY_NO


#define TAG_IS_AVCI(tag)


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);

#define FF_MOV_FLAG_MFRA_AUTO
#define FF_MOV_FLAG_MFRA_DTS
#define FF_MOV_FLAG_MFRA_PTS

/**
 * Compute codec id for 'lpcm' tag.
 * See CoreAudioTypes and AudioStreamBasicDescription at Apple.
 */
static inline enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
{}

#define MOV_ISMV_TTML_TAG
#define MOV_MP4_TTML_TAG
#define MOV_MP4_FPCM_TAG
#define MOV_MP4_IPCM_TAG

struct MP4TrackKindValueMapping {};

struct MP4TrackKindMapping {};

extern const struct MP4TrackKindMapping ff_mov_track_kind_table[];

#endif /* AVFORMAT_ISOM_H */