]> git.sesse.net Git - nageru/blob - nageru/defs.h
Fix a Clang 19 warning.
[nageru] / nageru / defs.h
1 #ifndef _DEFS_H
2 #define _DEFS_H
3
4 #define TYPICAL_FPS 60
5 #define FAKE_FPS 25  // Must be an integer.
6 // #define MAX_VIDEO_CARDS 16  // defined in shared_defs.h.
7 #define MAX_ALSA_CARDS 16
8 #define MAX_BUSES 256  // Audio buses.
9
10 // FRAME_SIZE is the default frame size, in bytes. FFmpeg inputs (video files and SRT streams)
11 // can allocate larger frames as needed; USB and DeckLink outputs always use FRAME_SIZE.
12 // We should eventually add support for at least DeckLink outputs, allowing us to capture
13 // 2160p frames. Also, it would allow us to lower the default frame size to the maximum
14 // bmusb supports (2 MB just about covers 1080i 4:2:2, then add some for 10-bit?) to waste
15 // less memory.
16 //
17 // As a general sanity check, we also have a MAX_FRAME_SIZE that even dynamic allocation
18 // will not go past.
19 #define FRAME_SIZE (8 << 20)  // 8 MB (just enough for 1080p RGBA).
20 #define MAX_FRAME_SIZE (140 << 20)  // 140 MB; enough for 8192*4320 RGBA and then some.
21
22 // For deinterlacing. See also comments on InputState.
23 #define FRAME_HISTORY_LENGTH 5
24
25 #define AUDIO_OUTPUT_CODEC_NAME "pcm_s32le"
26 #define DEFAULT_AUDIO_OUTPUT_BIT_RATE 0
27 #define DEFAULT_X264_OUTPUT_BIT_RATE 4500  // 5 Mbit after making room for some audio and TCP overhead.
28 #define DEFAULT_AV1_OUTPUT_BIT_RATE 4500  // Same.
29
30 #define LOCAL_DUMP_PREFIX "record-"
31 #define LOCAL_DUMP_SUFFIX ".nut"
32 #define DEFAULT_STREAM_MUX_NAME "nut"  // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX.
33 #define DEFAULT_HTTPD_PORT 9095
34 #define DEFAULT_SRT_PORT 9710
35 #define DEFAULT_SRT_OUTPUT_LATENCY_MS 2000
36
37 // In number of frames. Comes in addition to any internal queues in x264
38 // (frame threading, lookahead, etc.).
39 #define X264_QUEUE_LENGTH 50
40 #define AV1_QUEUE_LENGTH 50
41
42 #define X264_DEFAULT_PRESET "ultrafast"
43 #define X264_DEFAULT_TUNE "film"
44
45 #define DEFAULT_AV1_PRESET 12
46 #define DEFAULT_AV1_FPS_NUM 60000
47 #define DEFAULT_AV1_FPS_DEN 1001
48
49 #endif  // !defined(_DEFS_H)