X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=defs.h;h=cd1e267ddd071a0d97ad7fd54d36c5e4a42e638d;hb=95ad88db99ba896fb5bfcfd5c221f735a3e34b7e;hp=7b3a9ae39e91921f374dae94b98c8c0b132ce0c5;hpb=236cdb59df3518222cca245434602cdd6fdeca47;p=nageru diff --git a/defs.h b/defs.h index 7b3a9ae..cd1e267 100644 --- a/defs.h +++ b/defs.h @@ -1,16 +1,33 @@ #ifndef _DEFS_H #define _DEFS_H -// OUTPUT_FREQUENCY/FPS must be an integer for now. #define OUTPUT_FREQUENCY 48000 -#define FPS 60 +#define MAX_FPS 60 +#define WIDTH 1280 +#define HEIGHT 720 +#define MAX_CARDS 16 -#define AUDIO_OUTPUT_CODEC AV_CODEC_ID_MP3 -#define AUDIO_OUTPUT_SAMPLE_FMT AV_SAMPLE_FMT_FLTP -#define AUDIO_OUTPUT_BIT_RATE 256000 +// For deinterlacing. See also comments on InputState. +#define FRAME_HISTORY_LENGTH 5 -#define LOCAL_DUMP_FILE_NAME "test.ts" -#define STREAM_MUX_NAME "mpegts" -#define MUX_OPTS {} +#define AUDIO_OUTPUT_CODEC_NAME "pcm_s32le" +#define AUDIO_OUTPUT_BIT_RATE 0 + +#define LOCAL_DUMP_PREFIX "record-" +#define LOCAL_DUMP_SUFFIX ".nut" +#define DEFAULT_STREAM_MUX_NAME "nut" // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX. +#define MUX_OPTS { \ + /* Make seekable .mov files. */ \ + { "movflags", "empty_moov+frag_keyframe+default_base_moof" }, \ + \ + /* Keep nut muxer from using unlimited amounts of memory. */ \ + { "write_index", "0" } \ +} + +// In bytes. Beware, if too small, stream clients will start dropping data. +// For mov, you want this at 10MB or so (for the reason mentioned above), +// but for nut, there's no flushing, so such a large mux buffer would cause +// the output to be very uneven. +#define MUX_BUFFER_SIZE 65536 #endif // !defined(_DEFS_H)