2018-02-08 18:14:13 +08:00
|
|
|
#ifndef SCRCPY_H
|
|
|
|
#define SCRCPY_H
|
2017-12-12 22:12:07 +08:00
|
|
|
|
2019-03-03 06:52:22 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
2017-12-12 22:12:07 +08:00
|
|
|
|
2019-09-30 04:36:56 +08:00
|
|
|
#include "config.h"
|
2019-12-10 04:16:09 +08:00
|
|
|
#include "common.h"
|
2019-11-08 02:01:35 +08:00
|
|
|
#include "input_manager.h"
|
2019-11-07 05:22:23 +08:00
|
|
|
#include "recorder.h"
|
2019-09-30 04:36:56 +08:00
|
|
|
|
2018-03-21 21:04:13 +08:00
|
|
|
struct scrcpy_options {
|
|
|
|
const char *serial;
|
2018-08-10 01:12:27 +08:00
|
|
|
const char *crop;
|
2018-11-11 21:03:29 +08:00
|
|
|
const char *record_filename;
|
2019-06-24 01:02:34 +08:00
|
|
|
const char *window_title;
|
2019-07-31 07:48:32 +08:00
|
|
|
const char *push_target;
|
2019-02-09 22:20:07 +08:00
|
|
|
enum recorder_format record_format;
|
2019-12-10 04:16:09 +08:00
|
|
|
struct port_range port_range;
|
2019-03-03 06:52:22 +08:00
|
|
|
uint16_t max_size;
|
|
|
|
uint32_t bit_rate;
|
2019-11-18 05:07:19 +08:00
|
|
|
uint16_t max_fps;
|
2020-02-16 19:30:36 +08:00
|
|
|
int8_t lock_video_orientation;
|
2019-08-29 13:25:17 +08:00
|
|
|
int16_t window_x;
|
|
|
|
int16_t window_y;
|
2019-11-04 01:00:11 +08:00
|
|
|
uint16_t window_width;
|
|
|
|
uint16_t window_height;
|
2019-03-03 06:52:22 +08:00
|
|
|
bool show_touches;
|
|
|
|
bool fullscreen;
|
|
|
|
bool always_on_top;
|
2019-06-05 03:49:26 +08:00
|
|
|
bool control;
|
|
|
|
bool display;
|
2019-06-05 06:55:46 +08:00
|
|
|
bool turn_screen_off;
|
2019-06-06 01:02:50 +08:00
|
|
|
bool render_expired_frames;
|
2019-11-08 02:01:35 +08:00
|
|
|
bool prefer_text;
|
2019-08-29 13:25:17 +08:00
|
|
|
bool window_borderless;
|
2018-03-21 21:04:13 +08:00
|
|
|
};
|
|
|
|
|
2019-11-07 05:06:54 +08:00
|
|
|
#define SCRCPY_OPTIONS_DEFAULT { \
|
|
|
|
.serial = NULL, \
|
|
|
|
.crop = NULL, \
|
|
|
|
.record_filename = NULL, \
|
|
|
|
.window_title = NULL, \
|
|
|
|
.push_target = NULL, \
|
|
|
|
.record_format = RECORDER_FORMAT_AUTO, \
|
2019-12-10 04:16:09 +08:00
|
|
|
.port_range = { \
|
|
|
|
.first = DEFAULT_LOCAL_PORT_RANGE_FIRST, \
|
|
|
|
.last = DEFAULT_LOCAL_PORT_RANGE_LAST, \
|
|
|
|
}, \
|
2019-12-03 19:06:43 +08:00
|
|
|
.max_size = DEFAULT_MAX_SIZE, \
|
2019-11-07 05:06:54 +08:00
|
|
|
.bit_rate = DEFAULT_BIT_RATE, \
|
2019-11-18 05:07:19 +08:00
|
|
|
.max_fps = 0, \
|
2020-02-16 19:30:36 +08:00
|
|
|
.lock_video_orientation = DEFAULT_LOCK_VIDEO_ORIENTATION, \
|
2019-08-29 13:25:17 +08:00
|
|
|
.window_x = -1, \
|
|
|
|
.window_y = -1, \
|
2019-11-04 01:00:11 +08:00
|
|
|
.window_width = 0, \
|
|
|
|
.window_height = 0, \
|
2019-11-07 05:06:54 +08:00
|
|
|
.show_touches = false, \
|
|
|
|
.fullscreen = false, \
|
|
|
|
.always_on_top = false, \
|
|
|
|
.control = true, \
|
|
|
|
.display = true, \
|
|
|
|
.turn_screen_off = false, \
|
|
|
|
.render_expired_frames = false, \
|
2019-11-08 02:01:35 +08:00
|
|
|
.prefer_text = false, \
|
2019-08-29 13:25:17 +08:00
|
|
|
.window_borderless = false, \
|
2019-11-07 05:06:54 +08:00
|
|
|
}
|
|
|
|
|
2019-03-03 06:52:22 +08:00
|
|
|
bool
|
2019-03-03 03:09:56 +08:00
|
|
|
scrcpy(const struct scrcpy_options *options);
|
2017-12-12 22:12:07 +08:00
|
|
|
|
|
|
|
#endif
|