diff options
author | Martin Storsjö <martin@martin.st> | 2014-11-02 01:02:43 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2024-06-24 11:24:04 +0300 |
commit | 6ec22731ae7694d4db08fff556eea58aa3b990d3 (patch) | |
tree | 924014657e628b7649ca6fab286cb14a5f1e9e29 /libavformat/movenc.h | |
parent | 4b8ddf71dcd3340c64649f7be3d23e8df517aae5 (diff) | |
download | ffmpeg-6ec22731ae7694d4db08fff556eea58aa3b990d3.tar.gz |
movenc: Add an option for resilient, hybrid fragmented/non-fragmented muxing
This allows ending up with a normal, non-fragmented file when
the file is finished, while keeping the file readable if writing
is aborted abruptly at any point. (Normally when writing a
mov/mp4 file, the unfinished file is completely useless unless it
is finished properly.)
This results in a file where the mdat atom contains (and hides)
all the moof atoms that were part of the fragmented file structure
initially.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r-- | libavformat/movenc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h index 08d580594d..d73f7f314d 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -85,7 +85,7 @@ typedef struct MOVFragmentInfo { typedef struct MOVTrack { int mode; - int entry; + int entry, entry_written; unsigned timescale; uint64_t time; int64_t track_duration; @@ -114,6 +114,7 @@ typedef struct MOVTrack { int vos_len; uint8_t *vos_data; MOVIentry *cluster; + MOVIentry *cluster_written; unsigned cluster_capacity; int audio_vbr; int height; ///< active picture (w/o VBI) height for D-10/IMX @@ -282,6 +283,7 @@ typedef struct MOVMuxContext { #define FF_MOV_FLAG_SKIP_SIDX (1 << 21) #define FF_MOV_FLAG_CMAF (1 << 22) #define FF_MOV_FLAG_PREFER_ICC (1 << 23) +#define FF_MOV_FLAG_HYBRID_FRAGMENTED (1 << 24) int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt); |