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:
@@ -63,7 +63,7 @@ recorder_queue_clear(struct recorder_queue *queue) {
|
||||
bool
|
||||
recorder_init(struct recorder *recorder,
|
||||
const char *filename,
|
||||
enum recorder_format format,
|
||||
enum sc_record_format format,
|
||||
struct size declared_frame_size) {
|
||||
recorder->filename = SDL_strdup(filename);
|
||||
if (!recorder->filename) {
|
||||
@@ -105,10 +105,10 @@ recorder_destroy(struct recorder *recorder) {
|
||||
}
|
||||
|
||||
static const char *
|
||||
recorder_get_format_name(enum recorder_format format) {
|
||||
recorder_get_format_name(enum sc_record_format format) {
|
||||
switch (format) {
|
||||
case RECORDER_FORMAT_MP4: return "mp4";
|
||||
case RECORDER_FORMAT_MKV: return "matroska";
|
||||
case SC_RECORD_FORMAT_MP4: return "mp4";
|
||||
case SC_RECORD_FORMAT_MKV: return "matroska";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user