]> git.sesse.net Git - nageru/blob - nageru/defs.h
Unify mux.cpp between Nageru and Futatabi.
[nageru] / nageru / defs.h
1 #ifndef _DEFS_H
2 #define _DEFS_H
3
4 #include <libavformat/version.h>
5
6 #define OUTPUT_FREQUENCY 48000  // Currently needs to be exactly 48000, since bmusb outputs in that.
7 #define MAX_FPS 60
8 #define FAKE_FPS 25  // Must be an integer.
9 #define MAX_VIDEO_CARDS 16
10 #define MAX_ALSA_CARDS 16
11 #define MAX_BUSES 256  // Audio buses.
12
13 // For deinterlacing. See also comments on InputState.
14 #define FRAME_HISTORY_LENGTH 5
15
16 #define AUDIO_OUTPUT_CODEC_NAME "pcm_s32le"
17 #define DEFAULT_AUDIO_OUTPUT_BIT_RATE 0
18 #define DEFAULT_X264_OUTPUT_BIT_RATE 4500  // 5 Mbit after making room for some audio and TCP overhead.
19
20 #define LOCAL_DUMP_PREFIX "record-"
21 #define LOCAL_DUMP_SUFFIX ".nut"
22 #define DEFAULT_STREAM_MUX_NAME "nut"  // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX.
23 #define DEFAULT_HTTPD_PORT 9095
24
25 #include "shared/mux_opts.h"
26
27 // In bytes. Beware, if too small, stream clients will start dropping data.
28 // For mov, you want this at 10MB or so (for the reason mentioned above),
29 // but for nut, there's no flushing, so such a large mux buffer would cause
30 // the output to be very uneven.
31 #define MUX_BUFFER_SIZE 10485760
32
33 // In number of frames. Comes in addition to any internal queues in x264
34 // (frame threading, lookahead, etc.).
35 #define X264_QUEUE_LENGTH 50
36
37 #define X264_DEFAULT_PRESET "ultrafast"
38 #define X264_DEFAULT_TUNE "film"
39
40 #endif  // !defined(_DEFS_H)