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:
@@ -6,15 +6,24 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
enum recorder_format {
|
||||
RECORDER_FORMAT_MP4 = 1,
|
||||
RECORDER_FORMAT_MKV,
|
||||
};
|
||||
|
||||
struct recorder {
|
||||
char *filename;
|
||||
enum recorder_format format;
|
||||
AVFormatContext *ctx;
|
||||
struct size declared_frame_size;
|
||||
SDL_bool header_written;
|
||||
};
|
||||
|
||||
SDL_bool recorder_init(struct recorder *recoder, const char *filename,
|
||||
SDL_bool recorder_init(struct recorder *recoder,
|
||||
const char *filename,
|
||||
enum recorder_format format,
|
||||
struct size declared_frame_size);
|
||||
|
||||
void recorder_destroy(struct recorder *recorder);
|
||||
|
||||
SDL_bool recorder_open(struct recorder *recorder, AVCodec *input_codec);
|
||||
|
||||
Reference in New Issue
Block a user