[record] hookup quality

This commit is contained in:
radius 2018-09-23 19:29:19 -05:00
parent bcb960d248
commit 554ad5a494
3 changed files with 11 additions and 3 deletions

View File

@ -651,6 +651,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
return true;
}
/*
static bool ffmpeg_init_config_recording(struct ff_config_param *params)
{
return true;
@ -667,6 +668,7 @@ static bool ffmpeg_init_config_recording(struct ff_config_param *params)
return true;
}
*/
static bool ffmpeg_init_config(struct ff_config_param *params,
const char *config)
@ -924,13 +926,13 @@ static void *ffmpeg_new(const struct record_params *params)
handle->params = *params;
if (params->config_type == RECORD_CONFIG_TYPE_RECORDING_CUSTOM)
if (params->preset == RECORD_CONFIG_TYPE_RECORDING_CUSTOM)
{
if (!ffmpeg_init_config(&handle->config, params->config))
goto error;
}
else
ffmpeg_init_config_common(&handle->config, params->config_type);
ffmpeg_init_config_common(&handle->config, params->preset);
if (!ffmpeg_init_muxer_pre(handle))
goto error;

View File

@ -391,9 +391,15 @@ bool recording_init(void)
else
{
if (streaming_is_enabled())
{
params.config = settings->paths.path_stream_config;
params.preset = settings->uints.video_stream_quality;
}
else
{
params.config = settings->paths.path_record_config;
params.preset = settings->uints.video_record_quality;
}
}
if (video_driver_supports_recording())

View File

@ -69,7 +69,7 @@ struct record_params
/* Audio channels. */
unsigned channels;
enum record_config_type config_type;
enum record_config_type preset;
/* Input pixel format. */
enum ffemu_pix_format pix_fmt;