Libav
Macros | Functions | Variables
movenc.c File Reference
#include <stdint.h>
#include <inttypes.h>
#include "movenc.h"
#include "avformat.h"
#include "avio_internal.h"
#include "riff.h"
#include "avio.h"
#include "isom.h"
#include "avc.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/put_bits.h"
#include "libavcodec/vc1.h"
#include "internal.h"
#include "libavutil/avstring.h"
#include "libavutil/intfloat.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "hevc.h"
#include "rtpenc.h"
#include "mov_chan.h"
#include <assert.h>

Go to the source code of this file.

Macros

#define MOV_CLASS(flavor)
 
#define READ_BLOCK
 

Functions

static int utf8len (const uint8_t *b)
 
static int64_t update_size (AVIOContext *pb, int64_t pos)
 
static int co64_required (const MOVTrack *track)
 
static int mov_write_stco_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_stsz_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_stsc_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_stss_tag (AVIOContext *pb, MOVTrack *track, uint32_t flag)
 
static int mov_write_amr_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_ac3_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_extradata_tag (AVIOContext *pb, MOVTrack *track)
 This function writes extradata "as is". More...
 
static void put_descr (AVIOContext *pb, int tag, unsigned int size)
 
static int mov_write_esds_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_ms_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_wfex_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_chan_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_wave_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_dvc1_structs (MOVTrack *track, uint8_t *buf)
 
static int mov_write_dvc1_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_glbl_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_get_lpcm_flags (enum AVCodecID codec_id)
 Compute flags for 'lpcm' tag. More...
 
static int get_cluster_duration (MOVTrack *track, int cluster_idx)
 
static int get_samples_per_packet (MOVTrack *track)
 
static int mov_write_audio_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_d263_tag (AVIOContext *pb)
 
static int mov_write_svq3_tag (AVIOContext *pb)
 
static int mov_write_avcc_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_hvcc_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_avid_tag (AVIOContext *pb, MOVTrack *track)
 
static int mp4_get_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int ipod_get_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int mov_get_dv_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int mov_get_rawvideo_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int mov_get_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int mov_find_codec_tag (AVFormatContext *s, MOVTrack *track)
 
static int mov_write_uuid_tag_ipod (AVIOContext *pb)
 Write uuid atom. More...
 
static int mov_write_fiel_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_subtitle_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_pasp_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_video_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_rtp_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_tmcd_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_stsd_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_ctts_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_stts_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_dref_tag (AVIOContext *pb)
 
static int mov_write_stbl_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_dinf_tag (AVIOContext *pb)
 
static int mov_write_nmhd_tag (AVIOContext *pb)
 
static int mov_write_gmhd_tag (AVIOContext *pb)
 
static int mov_write_smhd_tag (AVIOContext *pb)
 
static int mov_write_vmhd_tag (AVIOContext *pb)
 
static int is_clcp_track (MOVTrack *track)
 
static int mov_write_hdlr_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_hmhd_tag (AVIOContext *pb)
 
static int mov_write_minf_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_mdhd_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_mdia_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_tkhd_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st)
 
static int mov_write_tapt_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_edts_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_tref_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_uuid_tag_psp (AVIOContext *pb, MOVTrack *mov)
 
static int mov_write_udta_sdp (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_track_metadata (AVIOContext *pb, AVStream *st, const char *tag, const char *str)
 
static int mov_write_track_udta_tag (AVIOContext *pb, MOVMuxContext *mov, AVStream *st)
 
static int mov_write_trak_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st)
 
static int mov_write_iods_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_trex_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_mvex_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_mvhd_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_itunes_hdlr_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static int mov_write_string_data_tag (AVIOContext *pb, const char *data, int lang, int long_style)
 
static int mov_write_string_tag (AVIOContext *pb, const char *name, const char *value, int lang, int long_style)
 
static int mov_write_string_metadata (AVFormatContext *s, AVIOContext *pb, const char *name, const char *tag, int long_style)
 
static int mov_write_trkn_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static int mov_write_ilst_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static int mov_write_meta_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static int ascii_to_wc (AVIOContext *pb, const uint8_t *b)
 
static uint16_t language_code (const char *str)
 
static int mov_write_3gp_udta_tag (AVIOContext *pb, AVFormatContext *s, const char *tag, const char *str)
 
static int mov_write_chpl_tag (AVIOContext *pb, AVFormatContext *s)
 
static int mov_write_udta_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static void mov_write_psp_udta_tag (AVIOContext *pb, const char *str, const char *lang, int type)
 
static int mov_write_uuidusmt_tag (AVIOContext *pb, AVFormatContext *s)
 
static int mov_write_moov_tag (AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
 
static void param_write_int (AVIOContext *pb, const char *name, int value)
 
static void param_write_string (AVIOContext *pb, const char *name, const char *value)
 
static void param_write_hex (AVIOContext *pb, const char *name, const uint8_t *value, int len)
 
static int mov_write_isml_manifest (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_mfhd_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_tfhd_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int64_t moof_offset)
 
static uint32_t get_sample_flags (MOVTrack *track, MOVIentry *entry)
 
static int mov_write_trun_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int moof_size)
 
static int mov_write_tfxd_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_tfrf_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int entry)
 
static int mov_write_tfrf_tags (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
 
static int mov_write_traf_tag (AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int64_t moof_offset, int moof_size)
 
static int mov_write_moof_tag_internal (AVIOContext *pb, MOVMuxContext *mov, int tracks, int moof_size)
 
static int mov_write_moof_tag (AVIOContext *pb, MOVMuxContext *mov, int tracks)
 
static int mov_write_tfra_tag (AVIOContext *pb, MOVTrack *track)
 
static int mov_write_mfra_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_mdat_tag (AVIOContext *pb, MOVMuxContext *mov)
 
static int mov_write_ftyp_tag (AVIOContext *pb, AVFormatContext *s)
 
static void mov_write_uuidprof_tag (AVIOContext *pb, AVFormatContext *s)
 
static int mov_parse_mpeg2_frame (AVPacket *pkt, uint32_t *flags)
 
static void mov_parse_vc1_frame (AVPacket *pkt, MOVTrack *trk, int fragment)
 
static int mov_flush_fragment (AVFormatContext *s)
 
int ff_mov_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int mov_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int mov_create_chapter_track (AVFormatContext *s, int tracknum)
 
static void enable_tracks (AVFormatContext *s)
 
static void mov_free (AVFormatContext *s)
 
static uint32_t rgb_to_yuv (uint32_t rgb)
 
static int mov_create_dvd_sub_decoder_specific_info (MOVTrack *track, AVStream *st)
 
static int mov_write_header (AVFormatContext *s)
 
static int get_moov_size (AVFormatContext *s)
 
static int compute_moov_size (AVFormatContext *s)
 
static int shift_data (AVFormatContext *s)
 
static int mov_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVCodecTag codec_ipod_tags []
 
struct {
   enum AVPixelFormat   pix_fmt
 
   uint32_t   tag
 
   unsigned   bps
 
} mov_pix_fmt_tags []
 
static const AVCodecTag codec_3gp_tags []
 
static const AVCodecTag codec_f4v_tags []
 
static const uint16_t fiel_data []
 

Macro Definition Documentation

#define MOV_CLASS (   flavor)
Value:
static const AVClass flavor ## _muxer_class = {\
.class_name = #flavor " muxer",\
.item_name = av_default_item_name,\
.option = options,\
.version = LIBAVUTIL_VERSION_INT,\
};
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Definition: log.h:38
static const AVOption options[]
Definition: movenc.c:50
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:52
Describe the class of an AVClass context structure.
Definition: log.h:33

Definition at line 73 of file movenc.c.

#define READ_BLOCK
Value:
do { \
read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], moov_size); \
read_buf_id ^= 1; \
} while (0)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
Definition: aviobuf.c:463

Referenced by shift_data().

Function Documentation

static int utf8len ( const uint8_t *  b)
static
static int64_t update_size ( AVIOContext *  pb,
int64_t  pos 
)
static
static int co64_required ( const MOVTrack *  track)
static

Definition at line 103 of file movenc.c.

Referenced by mov_write_stco_tag().

static int mov_write_stco_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 111 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_stsz_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 133 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_stsc_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 169 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_stss_tag ( AVIOContext *  pb,
MOVTrack *  track,
uint32_t  flag 
)
static

Definition at line 198 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_amr_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 221 of file movenc.c.

Referenced by mov_write_audio_tag(), and mov_write_wave_tag().

static int mov_write_ac3_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 235 of file movenc.c.

Referenced by mov_write_audio_tag(), and mov_write_wave_tag().

static int mov_write_extradata_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

This function writes extradata "as is".

Extradata must be formatted like a valid atom (with size and tag).

Definition at line 283 of file movenc.c.

Referenced by mov_write_audio_tag(), and mov_write_wave_tag().

static void put_descr ( AVIOContext *  pb,
int  tag,
unsigned int  size 
)
static

Definition at line 289 of file movenc.c.

Referenced by mov_write_esds_tag(), and mov_write_iods_tag().

static int mov_write_esds_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static
static int mov_write_ms_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 353 of file movenc.c.

Referenced by mov_write_wave_tag().

static int mov_write_wfex_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 363 of file movenc.c.

Referenced by mov_write_audio_tag().

static int mov_write_chan_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 372 of file movenc.c.

Referenced by mov_write_audio_tag().

static int mov_write_wave_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 397 of file movenc.c.

Referenced by mov_write_audio_tag().

static int mov_write_dvc1_structs ( MOVTrack *  track,
uint8_t *  buf 
)
static

Definition at line 431 of file movenc.c.

Referenced by mov_write_dvc1_tag(), and mov_write_trailer().

static int mov_write_dvc1_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 512 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_glbl_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 529 of file movenc.c.

Referenced by mov_write_audio_tag(), and mov_write_video_tag().

static int mov_get_lpcm_flags ( enum AVCodecID  codec_id)
static

Compute flags for 'lpcm' tag.

See CoreAudioTypes and AudioStreamBasicDescription at Apple.

Definition at line 541 of file movenc.c.

Referenced by mov_write_audio_tag().

static int get_cluster_duration ( MOVTrack *  track,
int  cluster_idx 
)
static
static int get_samples_per_packet ( MOVTrack *  track)
static

Definition at line 581 of file movenc.c.

Referenced by mov_write_audio_tag().

static int mov_write_audio_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 600 of file movenc.c.

Referenced by mov_write_stsd_tag().

static int mov_write_d263_tag ( AVIOContext *  pb)
static

Definition at line 676 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_svq3_tag ( AVIOContext *  pb)
static

Definition at line 689 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_avcc_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 701 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_hvcc_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 711 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_avid_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 722 of file movenc.c.

Referenced by mov_write_video_tag().

static int mp4_get_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 769 of file movenc.c.

Referenced by mov_find_codec_tag().

static int ipod_get_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 800 of file movenc.c.

Referenced by mov_find_codec_tag().

static int mov_get_dv_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 817 of file movenc.c.

Referenced by mov_get_codec_tag().

static int mov_get_rawvideo_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 863 of file movenc.c.

Referenced by mov_get_codec_tag().

static int mov_get_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 879 of file movenc.c.

Referenced by mov_find_codec_tag().

static int mov_find_codec_tag ( AVFormatContext *  s,
MOVTrack *  track 
)
static

Definition at line 937 of file movenc.c.

Referenced by mov_write_header().

static int mov_write_uuid_tag_ipod ( AVIOContext *  pb)
static

Write uuid atom.

Needed to make file play in iPods running newest firmware goes after avcC atom in moov.trak.mdia.minf.stbl.stsd.avc1

Definition at line 963 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_fiel_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 979 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_subtitle_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 992 of file movenc.c.

Referenced by mov_write_stsd_tag().

static int mov_write_pasp_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1009 of file movenc.c.

Referenced by mov_write_video_tag().

static int mov_write_video_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1022 of file movenc.c.

Referenced by mov_write_stsd_tag().

static int mov_write_rtp_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1102 of file movenc.c.

Referenced by mov_write_stsd_tag().

static int mov_write_tmcd_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1122 of file movenc.c.

Referenced by mov_write_stsd_tag().

static int mov_write_stsd_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1135 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_ctts_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1155 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_stts_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1189 of file movenc.c.

Referenced by mov_write_stbl_tag().

static int mov_write_dref_tag ( AVIOContext *  pb)
static

Definition at line 1230 of file movenc.c.

Referenced by mov_write_dinf_tag().

static int mov_write_stbl_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1244 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_dinf_tag ( AVIOContext *  pb)
static

Definition at line 1266 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_nmhd_tag ( AVIOContext *  pb)
static

Definition at line 1275 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_gmhd_tag ( AVIOContext *  pb)
static

Definition at line 1283 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_smhd_tag ( AVIOContext *  pb)
static

Definition at line 1299 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_vmhd_tag ( AVIOContext *  pb)
static

Definition at line 1309 of file movenc.c.

Referenced by mov_write_minf_tag().

static int is_clcp_track ( MOVTrack *  track)
static

Definition at line 1318 of file movenc.c.

Referenced by mov_write_hdlr_tag(), mov_write_minf_tag(), and mov_write_trak_tag().

static int mov_write_hdlr_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1324 of file movenc.c.

Referenced by mov_write_mdia_tag(), and mov_write_minf_tag().

static int mov_write_hmhd_tag ( AVIOContext *  pb)
static

Definition at line 1394 of file movenc.c.

Referenced by mov_write_minf_tag().

static int mov_write_minf_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1409 of file movenc.c.

Referenced by mov_write_mdia_tag().

static int mov_write_mdhd_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1436 of file movenc.c.

Referenced by mov_write_mdia_tag().

static int mov_write_mdia_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1472 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_tkhd_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
AVStream *  st 
)
static

Definition at line 1483 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_tapt_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1566 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_edts_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1598 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_tref_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1645 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_uuid_tag_psp ( AVIOContext *  pb,
MOVTrack *  mov 
)
static

Definition at line 1656 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_udta_sdp ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1674 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_track_metadata ( AVIOContext *  pb,
AVStream *  st,
const char *  tag,
const char *  str 
)
static

Definition at line 1695 of file movenc.c.

Referenced by mov_write_track_udta_tag().

static int mov_write_track_udta_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVStream *  st 
)
static

Definition at line 1709 of file movenc.c.

Referenced by mov_write_trak_tag().

static int mov_write_trak_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
AVStream *  st 
)
static

Definition at line 1736 of file movenc.c.

Referenced by mov_write_moov_tag().

static int mov_write_iods_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 1771 of file movenc.c.

Referenced by mov_write_moov_tag().

static int mov_write_trex_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 1800 of file movenc.c.

Referenced by mov_write_mvex_tag().

static int mov_write_mvex_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 1813 of file movenc.c.

Referenced by mov_write_moov_tag().

static int mov_write_mvhd_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 1824 of file movenc.c.

Referenced by mov_write_moov_tag().

static int mov_write_itunes_hdlr_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 1885 of file movenc.c.

Referenced by mov_write_meta_tag().

static int mov_write_string_data_tag ( AVIOContext *  pb,
const char *  data,
int  lang,
int  long_style 
)
static

Definition at line 1901 of file movenc.c.

Referenced by mov_write_string_tag().

static int mov_write_string_tag ( AVIOContext *  pb,
const char *  name,
const char *  value,
int  lang,
int  long_style 
)
static

Definition at line 1921 of file movenc.c.

Referenced by mov_write_ilst_tag(), and mov_write_string_metadata().

static int mov_write_string_metadata ( AVFormatContext *  s,
AVIOContext *  pb,
const char *  name,
const char *  tag,
int  long_style 
)
static

Definition at line 1935 of file movenc.c.

Referenced by mov_write_ilst_tag(), and mov_write_udta_tag().

static int mov_write_trkn_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 1960 of file movenc.c.

Referenced by mov_write_ilst_tag().

static int mov_write_ilst_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 1982 of file movenc.c.

Referenced by mov_write_meta_tag().

static int mov_write_meta_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 2013 of file movenc.c.

Referenced by mov_write_udta_tag().

static int ascii_to_wc ( AVIOContext *  pb,
const uint8_t *  b 
)
static

Definition at line 2027 of file movenc.c.

Referenced by mov_write_psp_udta_tag().

static uint16_t language_code ( const char *  str)
static
static int mov_write_3gp_udta_tag ( AVIOContext *  pb,
AVFormatContext *  s,
const char *  tag,
const char *  str 
)
static

Definition at line 2045 of file movenc.c.

Referenced by mov_write_udta_tag().

static int mov_write_chpl_tag ( AVIOContext *  pb,
AVFormatContext *  s 
)
static

Definition at line 2067 of file movenc.c.

Referenced by mov_write_udta_tag().

static int mov_write_udta_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 2093 of file movenc.c.

Referenced by mov_write_moov_tag().

static void mov_write_psp_udta_tag ( AVIOContext *  pb,
const char *  str,
const char *  lang,
int  type 
)
static

Definition at line 2142 of file movenc.c.

Referenced by mov_write_uuidusmt_tag().

static int mov_write_uuidusmt_tag ( AVIOContext *  pb,
AVFormatContext *  s 
)
static

Definition at line 2155 of file movenc.c.

Referenced by mov_write_moov_tag().

static int mov_write_moov_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
AVFormatContext *  s 
)
static

Definition at line 2192 of file movenc.c.

Referenced by get_moov_size(), mov_flush_fragment(), mov_write_header(), and mov_write_trailer().

static void param_write_int ( AVIOContext *  pb,
const char *  name,
int  value 
)
static

Definition at line 2240 of file movenc.c.

Referenced by mov_write_isml_manifest().

static void param_write_string ( AVIOContext *  pb,
const char *  name,
const char *  value 
)
static

Definition at line 2245 of file movenc.c.

Referenced by mov_write_isml_manifest().

static void param_write_hex ( AVIOContext *  pb,
const char *  name,
const uint8_t *  value,
int  len 
)
static

Definition at line 2250 of file movenc.c.

Referenced by mov_write_isml_manifest().

static int mov_write_isml_manifest ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 2259 of file movenc.c.

Referenced by mov_write_header().

static int mov_write_mfhd_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 2345 of file movenc.c.

Referenced by mov_write_moof_tag_internal().

static int mov_write_tfhd_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
int64_t  moof_offset 
)
static

Definition at line 2354 of file movenc.c.

Referenced by mov_write_traf_tag().

static uint32_t get_sample_flags ( MOVTrack *  track,
MOVIentry *  entry 
)
static

Definition at line 2405 of file movenc.c.

Referenced by mov_write_trun_tag().

static int mov_write_trun_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
int  moof_size 
)
static

Definition at line 2411 of file movenc.c.

Referenced by mov_write_traf_tag().

static int mov_write_tfxd_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 2461 of file movenc.c.

Referenced by mov_write_traf_tag().

static int mov_write_tfrf_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
int  entry 
)
static

Definition at line 2481 of file movenc.c.

Referenced by mov_write_tfrf_tags().

static int mov_write_tfrf_tags ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track 
)
static

Definition at line 2517 of file movenc.c.

Referenced by mov_flush_fragment().

static int mov_write_traf_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
MOVTrack *  track,
int64_t  moof_offset,
int  moof_size 
)
static

Definition at line 2531 of file movenc.c.

Referenced by mov_write_moof_tag_internal().

static int mov_write_moof_tag_internal ( AVIOContext *  pb,
MOVMuxContext *  mov,
int  tracks,
int  moof_size 
)
static

Definition at line 2558 of file movenc.c.

Referenced by mov_write_moof_tag().

static int mov_write_moof_tag ( AVIOContext *  pb,
MOVMuxContext *  mov,
int  tracks 
)
static

Definition at line 2580 of file movenc.c.

Referenced by mov_flush_fragment().

static int mov_write_tfra_tag ( AVIOContext *  pb,
MOVTrack *  track 
)
static

Definition at line 2592 of file movenc.c.

Referenced by mov_write_mfra_tag().

static int mov_write_mfra_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 2616 of file movenc.c.

Referenced by mov_write_trailer().

static int mov_write_mdat_tag ( AVIOContext *  pb,
MOVMuxContext *  mov 
)
static

Definition at line 2642 of file movenc.c.

Referenced by mov_write_header().

static int mov_write_ftyp_tag ( AVIOContext *  pb,
AVFormatContext *  s 
)
static

Definition at line 2654 of file movenc.c.

Referenced by mov_write_header().

static void mov_write_uuidprof_tag ( AVIOContext *  pb,
AVFormatContext *  s 
)
static

Definition at line 2719 of file movenc.c.

Referenced by mov_write_header().

static int mov_parse_mpeg2_frame ( AVPacket *  pkt,
uint32_t *  flags 
)
static

Definition at line 2782 of file movenc.c.

Referenced by ff_mov_write_packet().

static void mov_parse_vc1_frame ( AVPacket *  pkt,
MOVTrack *  trk,
int  fragment 
)
static

Definition at line 2803 of file movenc.c.

Referenced by ff_mov_write_packet().

static int mov_flush_fragment ( AVFormatContext *  s)
static

Definition at line 2860 of file movenc.c.

Referenced by mov_write_packet(), and mov_write_trailer().

int ff_mov_write_packet ( AVFormatContext *  s,
AVPacket *  pkt 
)

Definition at line 2990 of file movenc.c.

Referenced by ff_mov_add_hinted_packet(), mov_create_chapter_track(), and mov_write_packet().

static int mov_write_packet ( AVFormatContext *  s,
AVPacket *  pkt 
)
static

Definition at line 3138 of file movenc.c.

static int mov_create_chapter_track ( AVFormatContext *  s,
int  tracknum 
)
static

Definition at line 3173 of file movenc.c.

Referenced by mov_write_header(), and mov_write_trailer().

static void enable_tracks ( AVFormatContext *  s)
static

Definition at line 3235 of file movenc.c.

Referenced by mov_write_header().

static void mov_free ( AVFormatContext *  s)
static

Definition at line 3276 of file movenc.c.

Referenced by mov_write_header(), and mov_write_trailer().

static uint32_t rgb_to_yuv ( uint32_t  rgb)
static

Definition at line 3300 of file movenc.c.

Referenced by mov_create_dvd_sub_decoder_specific_info().

static int mov_create_dvd_sub_decoder_specific_info ( MOVTrack *  track,
AVStream *  st 
)
static

Definition at line 3316 of file movenc.c.

Referenced by mov_write_header().

static int mov_write_header ( AVFormatContext *  s)
static

Definition at line 3365 of file movenc.c.

static int get_moov_size ( AVFormatContext *  s)
static

Definition at line 3585 of file movenc.c.

Referenced by compute_moov_size().

static int compute_moov_size ( AVFormatContext *  s)
static

Definition at line 3603 of file movenc.c.

Referenced by shift_data().

static int shift_data ( AVFormatContext *  s)
static

Definition at line 3628 of file movenc.c.

Referenced by mov_write_trailer().

static int mov_write_trailer ( AVFormatContext *  s)
static

Definition at line 3691 of file movenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "movflags", "MOV muxer flags", 0x42, AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "rtphint", "Add RTP hint tracks", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_RTP_HINT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "empty_moov", "Make the initial moov atom empty (not supported by QuickTime)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_EMPTY_MOOV}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "frag_keyframe", "Fragment at video keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FRAG_KEYFRAME}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "separate_moof", "Write separate moof/mdat atoms for each track", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_SEPARATE_MOOF}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "frag_custom", "Flush fragments on caller requests", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FRAG_CUSTOM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "isml", "Create a live smooth streaming feed (for pushing to a publishing point)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_ISML}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "faststart", "Run a second pass to put the index (moov atom) at the beginning of the file", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FASTSTART}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "omit_tfhd_offset", "Omit the base data offset in tfhd atoms", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_OMIT_TFHD_OFFSET}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "disable_chpl", "Disable Nero chapter atom", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_DISABLE_CHPL}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "skip_iods", "Skip writing iods atom.", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
{ "iods_audio_profile", "iods audio profile atom.", 0x42, AV_OPT_TYPE_INT, {.i64 = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
{ "iods_video_profile", "iods video profile atom.", 0x42, AV_OPT_TYPE_INT, {.i64 = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
{ "frag_duration", "Maximum fragment duration", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{ "min_frag_duration", "Minimum fragment duration", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{ "frag_size", "Maximum fragment size", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{ "ism_lookahead", "Number of lookahead entries for ISM files", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{ "brand", "Override major brand", 0x42, AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}
#define FF_MOV_FLAG_FASTSTART
Definition: movenc.h:177
#define FF_MOV_FLAG_ISML
Definition: movenc.h:176
#define FF_MOV_FLAG_EMPTY_MOOV
Definition: movenc.h:172
#define FF_MOV_FLAG_OMIT_TFHD_OFFSET
Definition: movenc.h:178
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:264
#define FF_MOV_FLAG_SEPARATE_MOOF
Definition: movenc.h:174
NULL
Definition: eval.c:55
#define FF_RTP_FLAG_OPTS(ctx, fieldname)
Definition: rtpenc.h:73
#define FF_MOV_FLAG_FRAG_CUSTOM
Definition: movenc.h:175
#define FF_MOV_FLAG_RTP_HINT
Definition: movenc.h:170
#define FF_MOV_FLAG_FRAG_KEYFRAME
Definition: movenc.h:173
#define FF_MOV_FLAG_DISABLE_CHPL
Definition: movenc.h:179

Definition at line 50 of file movenc.c.

const AVCodecTag codec_ipod_tags[]
static
Initial value:
= {
{ AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
{ AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
{ AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
{ AV_CODEC_ID_ALAC, MKTAG('a','l','a','c') },
{ AV_CODEC_ID_AC3, MKTAG('a','c','-','3') },
{ AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
{ AV_CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') },
}
#define MKTAG(a, b, c, d)
Definition: common.h:238

Definition at line 789 of file movenc.c.

enum AVPixelFormat pix_fmt
uint32_t tag

Definition at line 844 of file movenc.c.

Referenced by aac_encode_frame(), add_input_streams(), aiff_read_header(), ape_read_header(), asf_write_header1(), av_codec_get_tag(), av_dict_set(), av_find_info_tag(), av_get_audio_frame_duration(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_read_nikon(), avi_stream2fourcc(), avi_write_header(), avi_write_idx1(), avi_write_ix(), avi_write_packet(), bwf_write_bext_string(), check_stream_specifier(), copy_tag(), decode_frame(), decode_interframe_v4(), decode_interframe_v4a(), dump_metadata(), dxa_read_header(), ff_mov_get_channel_layout_tag(), ff_mov_read_esds(), ff_mp4_read_dec_config_descr(), ff_vorbiscomment_length(), ff_vorbiscomment_write(), flv_write_header(), get_swf_tag(), gxf_material_tags(), gxf_track_tags(), id3v1_create_tag(), id3v1_set_string(), id3v2_check_write_tag(), id3v2_parse(), ipod_get_codec_tag(), libschroedinger_decode_frame(), lz_unpack(), main(), matroska_convert_tags(), metasound_decode_init(), mkv_write_codecprivate(), mkv_write_header(), mkv_write_simpletag(), mkv_write_stereo_mode(), mkv_write_tag(), mkv_write_track(), mmf_read_header(), mov_find_codec_tag(), mov_get_codec_tag(), mov_get_dv_codec_tag(), mov_get_rawvideo_codec_tag(), mov_probe(), mov_read_custom(), mov_read_meta(), mov_read_replaygain(), mov_read_udta_string(), mov_write_audio_tag(), mp4_get_codec_tag(), mpc8_parse_seektable(), mpc8_read_header(), mpc8_read_packet(), new_output_stream(), ogm_header(), parse_fragment(), parse_mp4_descr(), pmt_cb(), process_line(), put_swf_end_tag(), put_swf_tag(), qcp_read_packet(), qt_rtp_parse_packet(), rdt_load_mdpr(), read_header(), rm_read_header(), rv10_write_header(), siff_probe(), siff_read_header(), smjpeg_write_header(), sol_read_header(), srt_to_ass(), swf_read_header(), swf_read_packet(), tiff_decode_tag(), validate_codec_tag(), xan_decode_frame(), xwma_read_header(), yop_decode_frame(), and yop_paint_block().

unsigned bps
const { ... } mov_pix_fmt_tags[]
Initial value:
= {
{ AV_PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 },
{ AV_PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 },
{ AV_PIX_FMT_RGB555BE,MKTAG('r','a','w',' '), 16 },
{ AV_PIX_FMT_RGB555LE,MKTAG('L','5','5','5'), 16 },
{ AV_PIX_FMT_RGB565LE,MKTAG('L','5','6','5'), 16 },
{ AV_PIX_FMT_RGB565BE,MKTAG('B','5','6','5'), 16 },
{ AV_PIX_FMT_GRAY16BE,MKTAG('b','1','6','g'), 16 },
{ AV_PIX_FMT_RGB24, MKTAG('r','a','w',' '), 24 },
{ AV_PIX_FMT_BGR24, MKTAG('2','4','B','G'), 24 },
{ AV_PIX_FMT_ARGB, MKTAG('r','a','w',' '), 32 },
{ AV_PIX_FMT_BGRA, MKTAG('B','G','R','A'), 32 },
{ AV_PIX_FMT_RGBA, MKTAG('R','G','B','A'), 32 },
{ AV_PIX_FMT_ABGR, MKTAG('A','B','G','R'), 32 },
{ AV_PIX_FMT_RGB48BE, MKTAG('b','4','8','r'), 48 },
}
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:84
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:67
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0 ...
Definition: pixfmt.h:118
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: pixfmt.h:116
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: pixfmt.h:115
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:97
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:98
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:95
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:96
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:68
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:66
Y , 16bpp, big-endian.
Definition: pixfmt.h:100
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
Definition: pixfmt.h:117
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:112
#define MKTAG(a, b, c, d)
Definition: common.h:238

Referenced by mov_get_rawvideo_codec_tag().

const AVCodecTag codec_3gp_tags[]
static
Initial value:
= {
{ AV_CODEC_ID_H263, MKTAG('s','2','6','3') },
{ AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
{ AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
{ AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
{ AV_CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
{ AV_CODEC_ID_AMR_WB, MKTAG('s','a','w','b') },
{ AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
}
#define MKTAG(a, b, c, d)
Definition: common.h:238

Definition at line 917 of file movenc.c.

const AVCodecTag codec_f4v_tags[]
static
Initial value:
= {
{ AV_CODEC_ID_MP3, MKTAG('.','m','p','3') },
{ AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
{ AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
{ AV_CODEC_ID_VP6A, MKTAG('V','P','6','A') },
{ AV_CODEC_ID_VP6F, MKTAG('V','P','6','F') },
}
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:379
#define MKTAG(a, b, c, d)
Definition: common.h:238

Definition at line 928 of file movenc.c.

const uint16_t fiel_data[]
static
Initial value:
= {
0x0000, 0x0100, 0x0201, 0x0206, 0x0209, 0x020e
}

Definition at line 975 of file movenc.c.

Referenced by mov_write_fiel_tag().