summaryrefslogtreecommitdiff
path: root/libavformat/movenc.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-01-05 13:57:05 +0200
committerMartin Storsjö <martin@martin.st>2012-01-25 12:15:41 +0200
commit83988d58ed134f82b6d2a25ef0065edfaf50ccb0 (patch)
tree0a61ea55c7ca0589ed9d77e049c76ca983d341e3 /libavformat/movenc.h
parent6ca3856894c8838096595f7e147df8f73169dfe2 (diff)
movenc: Add support for writing fragmented mov files
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r--libavformat/movenc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index 5b7689a27b..4cc61b3a7d 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -65,6 +65,11 @@ typedef struct {
HintSample *samples;
} HintSampleQueue;
+typedef struct {
+ int64_t offset;
+ int64_t time;
+} MOVFragmentInfo;
+
typedef struct MOVIndex {
int mode;
int entry;
@@ -98,7 +103,19 @@ typedef struct MOVIndex {
int64_t cur_rtp_ts_unwrapped;
uint32_t max_packet_size;
+ 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;
+
+ int nb_frag_info;
+ MOVFragmentInfo *frag_info;
} MOVTrack;
typedef struct MOVMuxContext {
@@ -116,9 +133,17 @@ typedef struct MOVMuxContext {
int iods_skip;
int iods_video_profile;
int iods_audio_profile;
+
+ int fragments;
+ int max_fragment_duration;
+ int max_fragment_size;
} 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
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt);