Support recording to MKV

Implement recording to Matroska files.

The format to use is determined by the option -F/--record-format if set,
or by the file extension (".mp4" or ".mkv").
This commit is contained in:
Romain Vimont
2019-02-09 15:20:07 +01:00
parent 1aaad6ba35
commit 0ed2373952
6 changed files with 100 additions and 11 deletions

View File

@@ -229,7 +229,10 @@ SDL_bool scrcpy(const struct scrcpy_options *options) {
struct recorder *rec = NULL;
if (options->record_filename) {
if (!recorder_init(&recorder, options->record_filename, frame_size)) {
if (!recorder_init(&recorder,
options->record_filename,
options->record_format,
frame_size)) {
ret = SDL_FALSE;
server_stop(&server);
goto finally_destroy_file_handler;