X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=defs.h;h=aa577bb607af039e8136c9e609e6e9027a872ea5;hb=c4c5e2df2b1ef88fa20b71ae981ae6462d84b63c;hp=3ee96c1e54d8cb6fed4ba5dfb0be46f8c80c2852;hpb=bd6cb62456225064229a871735ad99ed5c44a671;p=nageru diff --git a/defs.h b/defs.h index 3ee96c1..aa577bb 100644 --- a/defs.h +++ b/defs.h @@ -1,15 +1,40 @@ #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 AUDIO_OUTPUT_CODEC_NAME "pcm_s32le" +#define DEFAULT_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 10485760 + +// In number of frames. Comes in addition to any internal queues in x264 +// (frame threading, lookahead, etc.). +#define X264_QUEUE_LENGTH 50 + +#define X264_DEFAULT_PRESET "ultrafast" +#define X264_DEFAULT_TUNE "film" #endif // !defined(_DEFS_H)