obs-ffmpeg: Remove unused parameter

master
tytan652 2022-07-20 08:12:48 +02:00
parent 348cf1b872
commit fcc94634d9
4 changed files with 11 additions and 14 deletions

View File

@ -175,9 +175,8 @@ static void *av1_create_internal(obs_data_t *settings, obs_encoder_t *encoder,
if (strcmp(enc_lib, "libsvtav1") == 0) if (strcmp(enc_lib, "libsvtav1") == 0)
enc->svtav1 = true; enc->svtav1 = true;
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings, encoder, if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, enc_lib, NULL,
enc_lib, NULL, enc_name, NULL, enc_name, NULL, on_first_packet))
on_first_packet))
goto fail; goto fail;
if (!av1_update(enc, settings)) if (!av1_update(enc, settings))
goto fail; goto fail;

View File

@ -284,20 +284,20 @@ static void *nvenc_create_internal(obs_data_t *settings, obs_encoder_t *encoder,
#ifdef ENABLE_HEVC #ifdef ENABLE_HEVC
enc->hevc = hevc; enc->hevc = hevc;
if (hevc) { if (hevc) {
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings, if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder,
encoder, "hevc_nvenc", "hevc_nvenc", "nvenc_hevc",
"nvenc_hevc", ENCODER_NAME_HEVC, ENCODER_NAME_HEVC, on_init_error,
on_init_error, on_first_packet)) on_first_packet))
goto fail; goto fail;
} else } else
#else #else
UNUSED_PARAMETER(hevc); UNUSED_PARAMETER(hevc);
#endif #endif
{ {
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings, if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder,
encoder, "h264_nvenc", "h264_nvenc", "nvenc_h264",
"nvenc_h264", ENCODER_NAME_H264, ENCODER_NAME_H264, on_init_error,
on_init_error, on_first_packet)) on_first_packet))
goto fail; goto fail;
} }

View File

@ -142,7 +142,6 @@ void ffmpeg_video_encoder_free(struct ffmpeg_video_encoder *enc)
} }
bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc, void *parent, bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc, void *parent,
obs_data_t *settings OBS_UNUSED,
obs_encoder_t *encoder, const char *enc_lib, obs_encoder_t *encoder, const char *enc_lib,
const char *enc_lib2, const char *enc_name, const char *enc_lib2, const char *enc_name,
init_error_cb on_init_error, init_error_cb on_init_error,

View File

@ -39,8 +39,7 @@ struct ffmpeg_video_encoder {
}; };
extern bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc, extern bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc,
void *parent, obs_data_t *settings, void *parent, obs_encoder_t *encoder,
obs_encoder_t *encoder,
const char *enc_lib, const char *enc_lib2, const char *enc_lib, const char *enc_lib2,
const char *enc_name, const char *enc_name,
init_error_cb on_init_error, init_error_cb on_init_error,