mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Scrcpy is a C11 project. Use the C99 standard types instead of the
SDL-specific types:
SDL_bool -> bool
SintXX -> intXX_t
UintXX -> uintXX_t
38 lines
749 B
C
38 lines
749 B
C
#ifndef RECORDER_H
|
|
#define RECORDER_H
|
|
|
|
#include <stdbool.h>
|
|
#include <libavformat/avformat.h>
|
|
|
|
#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;
|
|
bool header_written;
|
|
};
|
|
|
|
bool
|
|
recorder_init(struct recorder *recoder, const char *filename,
|
|
enum recorder_format format, struct size declared_frame_size);
|
|
|
|
void
|
|
recorder_destroy(struct recorder *recorder);
|
|
|
|
bool
|
|
recorder_open(struct recorder *recorder, AVCodec *input_codec);
|
|
|
|
void
|
|
recorder_close(struct recorder *recorder);
|
|
|
|
bool
|
|
recorder_write(struct recorder *recorder, AVPacket *packet);
|
|
|
|
#endif
|