]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/movenc.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / movenc.h
index 1aa23fa1a9814f2beb8e7b8435fc495864b7c568..f6c95adea36834b7001d76726707032669d99c37 100644 (file)
@@ -43,12 +43,14 @@ typedef struct MOVIentry {
     unsigned int size;
     uint64_t     pos;
     unsigned int samplesInChunk;
+    unsigned int chunkNum;              ///< Chunk number if the current entry is a chunk start otherwise 0
     unsigned int entries;
     int          cts;
     int64_t      dts;
 #define MOV_SYNC_SAMPLE         0x0001
 #define MOV_PARTIAL_SYNC_SAMPLE 0x0002
     uint32_t     flags;
+    uint8_t      *data;
 } MOVIentry;
 
 typedef struct HintSample {
@@ -73,6 +75,7 @@ typedef struct MOVIndex {
     int64_t     trackDuration;
     long        sampleCount;
     long        sampleSize;
+    long        chunkCount;
     int         hasKeyframes;
 #define MOV_TRACK_CTTS         0x0001
 #define MOV_TRACK_STPS         0x0002
@@ -84,11 +87,14 @@ 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;
 
     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
@@ -96,6 +102,7 @@ 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;
 
     HintSampleQueue sample_queue;
 } MOVTrack;
@@ -109,11 +116,19 @@ 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;
 } MOVMuxContext;
 
 #define FF_MOV_FLAG_RTP_HINT 1
@@ -122,7 +137,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt);
 
 int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index);
 int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt,
-                             int track_index, int sample);
+                             int track_index, int sample,
+                             uint8_t *sample_data, int sample_size);
 void ff_mov_close_hinting(MOVTrack *track);
 
 #endif /* AVFORMAT_MOVENC_H */