Make scrcpy.h independant of other headers

The header scrcpy.h is intended to be the "public" API. It should not
depend on other internal headers.

Therefore, declare all required structs in this header and adapt
internal code.
This commit is contained in:
Romain Vimont
2020-06-19 22:04:06 +02:00
parent 29e5af76d4
commit 0ba74fbd9a
12 changed files with 62 additions and 52 deletions

View File

@@ -8,14 +8,9 @@
#include "config.h"
#include "common.h"
#include "scrcpy.h"
#include "util/queue.h"
enum recorder_format {
RECORDER_FORMAT_AUTO,
RECORDER_FORMAT_MP4,
RECORDER_FORMAT_MKV,
};
struct record_packet {
AVPacket packet;
struct record_packet *next;
@@ -25,7 +20,7 @@ struct recorder_queue QUEUE(struct record_packet);
struct recorder {
char *filename;
enum recorder_format format;
enum sc_record_format format;
AVFormatContext *ctx;
struct size declared_frame_size;
bool header_written;
@@ -46,7 +41,7 @@ struct recorder {
bool
recorder_init(struct recorder *recorder, const char *filename,
enum recorder_format format, struct size declared_frame_size);
enum sc_record_format format, struct size declared_frame_size);
void
recorder_destroy(struct recorder *recorder);