mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(record_ffmpeg) No more settings_t dependency
This commit is contained in:
parent
9c37356267
commit
950f6bb752
@ -65,7 +65,6 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
@ -1042,7 +1041,6 @@ static void ffmpeg_free(void *data)
|
||||
|
||||
static void *ffmpeg_new(const struct record_params *params)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
ffmpeg_t *handle = (ffmpeg_t*)calloc(1, sizeof(*handle));
|
||||
if (!handle)
|
||||
return NULL;
|
||||
@ -1065,11 +1063,11 @@ static void *ffmpeg_new(const struct record_params *params)
|
||||
ffmpeg_init_config_common(
|
||||
&handle->config,
|
||||
params->preset,
|
||||
settings->bools.video_gpu_record,
|
||||
settings->uints.video_record_scale_factor,
|
||||
settings->uints.video_stream_scale_factor,
|
||||
settings->uints.streaming_mode,
|
||||
settings->uints.video_record_threads
|
||||
params->video_gpu_record,
|
||||
params->video_record_scale_factor,
|
||||
params->video_stream_scale_factor,
|
||||
params->streaming_mode,
|
||||
params->video_record_threads
|
||||
);
|
||||
break;
|
||||
}
|
||||
@ -1082,7 +1080,7 @@ static void *ffmpeg_new(const struct record_params *params)
|
||||
|
||||
if (handle->config.audio_enable &&
|
||||
!ffmpeg_init_audio(handle,
|
||||
settings->arrays.audio_resampler))
|
||||
params->audio_resampler))
|
||||
goto error;
|
||||
|
||||
if (!ffmpeg_init_muxer_post(handle))
|
||||
|
@ -11988,6 +11988,13 @@ static bool recording_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
params.audio_resampler = settings->arrays.audio_resampler;
|
||||
params.video_gpu_record = settings->bools.video_gpu_record;
|
||||
params.video_record_scale_factor = settings->uints.video_record_scale_factor;
|
||||
params.video_stream_scale_factor = settings->uints.video_stream_scale_factor;
|
||||
params.video_record_threads = settings->uints.video_record_threads;
|
||||
params.streaming_mode = settings->uints.streaming_mode;
|
||||
|
||||
params.out_width = av_info->geometry.base_width;
|
||||
params.out_height = av_info->geometry.base_height;
|
||||
params.fb_width = av_info->geometry.max_width;
|
||||
|
@ -660,6 +660,14 @@ struct record_params
|
||||
|
||||
/* Path to config. Optional. */
|
||||
const char *config;
|
||||
|
||||
bool video_gpu_record;
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
unsigned video_record_threads;
|
||||
unsigned streaming_mode;
|
||||
|
||||
const char *audio_resampler;
|
||||
};
|
||||
|
||||
struct record_video_data
|
||||
|
Loading…
x
Reference in New Issue
Block a user