mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-03 06:39:39 +00:00
Adds h264 as format for recording
Useful for piping into `ffmpeg`.
This commit is contained in:
parent
39356602ed
commit
158a3e5d2b
3 changed files with 6 additions and 0 deletions
|
@ -307,6 +307,10 @@ parse_record_format(const char *optarg, enum recorder_format *format) {
|
||||||
*format = RECORDER_FORMAT_MKV;
|
*format = RECORDER_FORMAT_MKV;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!strcmp(optarg, "h264")) {
|
||||||
|
*format = RECORDER_FORMAT_H264;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
LOGE("Unsupported format: %s (expected mp4 or mkv)", optarg);
|
LOGE("Unsupported format: %s (expected mp4 or mkv)", optarg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ recorder_destroy(struct recorder *recorder) {
|
||||||
static const char *
|
static const char *
|
||||||
recorder_get_format_name(enum recorder_format format) {
|
recorder_get_format_name(enum recorder_format format) {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
|
case RECORDER_FORMAT_H264: return "h264";
|
||||||
case RECORDER_FORMAT_MP4: return "mp4";
|
case RECORDER_FORMAT_MP4: return "mp4";
|
||||||
case RECORDER_FORMAT_MKV: return "matroska";
|
case RECORDER_FORMAT_MKV: return "matroska";
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
|
|
|
@ -14,6 +14,7 @@ enum recorder_format {
|
||||||
RECORDER_FORMAT_AUTO,
|
RECORDER_FORMAT_AUTO,
|
||||||
RECORDER_FORMAT_MP4,
|
RECORDER_FORMAT_MP4,
|
||||||
RECORDER_FORMAT_MKV,
|
RECORDER_FORMAT_MKV,
|
||||||
|
RECORDER_FORMAT_H264,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct record_packet {
|
struct record_packet {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue