]> git.sesse.net Git - nageru/blob - shared/shared_defs.h
Fix some Clang 7 warnings.
[nageru] / shared / shared_defs.h
1 #ifndef _SHARED_DEFS_H
2 #define _SHARED_DEFS_H 1
3
4 // This flag is only supported in FFmpeg 3.3 and up, and we only require 3.1.
5 #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 71, 100)
6 #define MUX_SKIP_TRAILER "+skip_trailer"
7 #else
8 #define MUX_SKIP_TRAILER ""
9 #endif
10
11 #define MUX_OPTS { \
12         /* Make seekable .mov files, and keep MP4 muxer from using unlimited amounts of memory. */ \
13         { "movflags", "empty_moov+frag_keyframe+default_base_moof" MUX_SKIP_TRAILER }, \
14         \
15         /* Make for somewhat less bursty stream output when using .mov. */ \
16         { "frag_duration", "125000" }, \
17         \
18         /* Keep nut muxer from using unlimited amounts of memory. */ \
19         { "write_index", "0" } \
20 }
21
22 // In bytes. Beware, if too small, stream clients will start dropping data.
23 // For mov, you want this at 10MB or so (for the reason mentioned above),
24 // but for nut, there's no flushing, so such a large mux buffer would cause
25 // the output to be very uneven.
26 #define MUX_BUFFER_SIZE 10485760
27
28 #endif  // !defined(_SHARED_DEFS_H)