mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-05 16:55:40 +00:00
Add --audio-codec-options
Similar to --video-codec-options, but for audio. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
@@ -66,6 +66,7 @@ enum {
|
||||
OPT_NO_AUDIO,
|
||||
OPT_AUDIO_BIT_RATE,
|
||||
OPT_AUDIO_CODEC,
|
||||
OPT_AUDIO_CODEC_OPTIONS,
|
||||
};
|
||||
|
||||
struct sc_option {
|
||||
@@ -122,6 +123,18 @@ static const struct sc_option options[] = {
|
||||
.text = "Select an audio codec (opus or aac).\n"
|
||||
"Default is opus.",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_AUDIO_CODEC_OPTIONS,
|
||||
.longopt = "audio-codec-options",
|
||||
.argdesc = "key[:type]=value[,...]",
|
||||
.text = "Set a list of comma-separated key:type=value options for the "
|
||||
"device audio encoder.\n"
|
||||
"The possible values for 'type' are 'int' (default), 'long', "
|
||||
"'float' and 'string'.\n"
|
||||
"The list of possible codec options is available in the "
|
||||
"Android documentation: "
|
||||
"<https://d.android.com/reference/android/media/MediaFormat>",
|
||||
},
|
||||
{
|
||||
.shortopt = 'b',
|
||||
.longopt = "video-bit-rate",
|
||||
@@ -1672,6 +1685,9 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
case OPT_VIDEO_CODEC_OPTIONS:
|
||||
opts->video_codec_options = optarg;
|
||||
break;
|
||||
case OPT_AUDIO_CODEC_OPTIONS:
|
||||
opts->audio_codec_options = optarg;
|
||||
break;
|
||||
case OPT_ENCODER:
|
||||
LOGW("--encoder is deprecated, use --video-encoder instead.");
|
||||
// fall through
|
||||
|
Reference in New Issue
Block a user