mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-22 07:10:34 +00:00
Use meson to configure default values
Make meson generate config.h with configured values.
This commit is contained in:
parent
cb7e29180f
commit
53ff1aa410
@ -30,6 +30,22 @@ dependencies = [
|
||||
dependency('SDL2_net'),
|
||||
]
|
||||
|
||||
conf = configuration_data()
|
||||
|
||||
# the default client TCP port for the "adb reverse" tunnel
|
||||
# overridden by option --port
|
||||
conf.set('DEFAULT_LOCAL_PORT', '27183')
|
||||
|
||||
# the default max video size for both dimensions, in pixels
|
||||
# overridden by option --max-size
|
||||
conf.set('DEFAULT_MAX_SIZE', '0') # 0: unlimited
|
||||
|
||||
# the default video bitrate, in bits/second
|
||||
# overridden by option --bit-rate
|
||||
conf.set('DEFAULT_BIT_RATE', '4000000') # 4Mbps
|
||||
|
||||
configure_file(configuration: conf, output: 'config.h')
|
||||
|
||||
executable('scrcpy', src, dependencies: dependencies)
|
||||
|
||||
|
||||
|
@ -5,9 +5,7 @@
|
||||
#include <libavformat/avformat.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#define DEFAULT_LOCAL_PORT 27183
|
||||
#define DEFAULT_MAX_SIZE 0 // unlimited
|
||||
#define DEFAULT_BIT_RATE 4000000 // 4Mbps
|
||||
#include "config.h"
|
||||
|
||||
struct args {
|
||||
const char *serial;
|
||||
|
Loading…
Reference in New Issue
Block a user