summaryrefslogtreecommitdiff
path: root/libavformat/movenc.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-26 01:52:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-26 02:23:56 +0100
commit3c5fe5b52758225e58fec917cc29281d6025aa67 (patch)
treed7484edfa989ffc33744cbbf11960e803f677f2b /libavformat/movenc.h
parent01e5e97026cf0b344abafca22b0336a2c58b2a33 (diff)
parentd78bb1a4b2a3a415b68e4e6dd448779eccec64e3 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits) wma: Clip WMA1 and WMA2 frame length to 11 bits. movenc: Don't require frame_size to be set for modes other than mov doc: Update APIchanges with info on muxer flushing movenc: Reindent a block tools: Remove some unnecessary #undefs. rv20: prevent calling ff_h263_decode_mba() with unset height/width tools: K&R reformatting cosmetics Ignore generated aviocat and ismindex tools. build: Automatically include architecture-specific library Makefile snippets. indeo5: prevent null pointer dereference on broken files pktdumper: Use usleep instead of sleep cosmetics: Remove some unnecessary block braces. Drop unnecessary prefix from *sink* variable and struct names. Add a tool for creating smooth streaming manifests movdec: Calculate an average bit rate for fragmented streams, too movenc: Write the sample rate instead of time scale in the stsd atom movenc: Add a separate ismv/isma (smooth streaming) muxer movenc: Allow the caller to decide on fragmentation libavformat: Add a flag for muxers that support write_packet(NULL) for flushing movenc: Add support for writing fragmented mov files ... Conflicts: Changelog cmdutils.c cmdutils.h doc/APIchanges ffmpeg.c ffplay.c libavfilter/Makefile libavformat/Makefile libavformat/avformat.h libavformat/movenc.c libavformat/movenc.h libavformat/version.h tools/graph2dot.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r--libavformat/movenc.h41
1 files changed, 32 insertions, 9 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index ac6573b821..c430df1bcf 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -38,6 +38,7 @@
// ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4
#define MODE_3G2 0x10
#define MODE_IPOD 0x20
+#define MODE_ISM 0x40
typedef struct MOVIentry {
uint64_t pos;
@@ -50,7 +51,6 @@ typedef struct MOVIentry {
#define MOV_SYNC_SAMPLE 0x0001
#define MOV_PARTIAL_SYNC_SAMPLE 0x0002
uint32_t flags;
- uint8_t *data;
} MOVIentry;
typedef struct HintSample {
@@ -67,6 +67,13 @@ typedef struct {
HintSample *samples;
} HintSampleQueue;
+typedef struct {
+ int64_t offset;
+ int64_t time;
+ int64_t duration;
+ int64_t tfrf_offset;
+} MOVFragmentInfo;
+
typedef struct MOVIndex {
int mode;
int entry;
@@ -87,14 +94,12 @@ typedef struct MOVIndex {
int vosLen;
uint8_t *vosData;
- int cluster_write_index;
MOVIentry *cluster;
int audio_vbr;
int height; ///< active picture (w/o VBI) height for D-10/IMX
uint32_t tref_tag;
int tref_id; ///< trackID of the referenced track
- uint32_t trex_flags;
- int trex_size;
+ int64_t start_dts;
int hint_track; ///< the track that hints this track, -1 if no hint track is set
int src_track; ///< the track that this hint track describes
@@ -102,9 +107,21 @@ typedef struct MOVIndex {
uint32_t prev_rtp_ts;
int64_t cur_rtp_ts_unwrapped;
uint32_t max_packet_size;
- int64_t base_data_offset_pos;
+
+ int64_t default_duration;
+ uint32_t default_sample_flags;
+ uint32_t default_size;
HintSampleQueue sample_queue;
+
+ AVIOContext *mdat_buf;
+ int64_t moof_size_offset;
+ int64_t data_offset;
+ int64_t frag_start;
+ int64_t tfrf_offset;
+
+ int nb_frag_info;
+ MOVFragmentInfo *frag_info;
} MOVTrack;
typedef struct MOVMuxContext {
@@ -116,22 +133,28 @@ typedef struct MOVMuxContext {
int64_t mdat_pos;
uint64_t mdat_size;
MOVTrack *tracks;
- int fragments;
- int frag_seq_num;
int flags;
int rtp_flags;
int reserved_moov_size;
int64_t reserved_moov_pos;
- int max_fragment_duration;
- int max_fragment_size;
int iods_skip;
int iods_video_profile;
int iods_audio_profile;
+
+ int fragments;
+ int max_fragment_duration;
+ int max_fragment_size;
+ int ism_lookahead;
} MOVMuxContext;
#define FF_MOV_FLAG_RTP_HINT 1
+#define FF_MOV_FLAG_FRAGMENT 2
+#define FF_MOV_FLAG_EMPTY_MOOV 4
+#define FF_MOV_FLAG_FRAG_KEYFRAME 8
+#define FF_MOV_FLAG_SEPARATE_MOOF 16
+#define FF_MOV_FLAG_FRAG_CUSTOM 32
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt);