From ca0d09c50fc4246fdae67b8a33799ea580b68593 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Aug 2013 12:24:36 +0200 Subject: EncoderPlugin: pass config_param reference --- src/encoder/OpusEncoderPlugin.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/encoder/OpusEncoderPlugin.cxx') diff --git a/src/encoder/OpusEncoderPlugin.cxx b/src/encoder/OpusEncoderPlugin.cxx index a6f36f7d5..d67cf1862 100644 --- a/src/encoder/OpusEncoderPlugin.cxx +++ b/src/encoder/OpusEncoderPlugin.cxx @@ -75,9 +75,9 @@ opus_encoder_quark(void) static bool opus_encoder_configure(struct opus_encoder *encoder, - const struct config_param *param, GError **error_r) + const config_param ¶m, GError **error_r) { - const char *value = config_get_block_string(param, "bitrate", "auto"); + const char *value = param.GetBlockValue("bitrate", "auto"); if (strcmp(value, "auto") == 0) encoder->bitrate = OPUS_AUTO; else if (strcmp(value, "max") == 0) @@ -93,15 +93,14 @@ opus_encoder_configure(struct opus_encoder *encoder, } } - encoder->complexity = config_get_block_unsigned(param, "complexity", - 10); + encoder->complexity = param.GetBlockValue("complexity", 10u); if (encoder->complexity > 10) { g_set_error(error_r, opus_encoder_quark(), 0, "Invalid complexity"); return false; } - value = config_get_block_string(param, "signal", "auto"); + value = param.GetBlockValue("signal", "auto"); if (strcmp(value, "auto") == 0) encoder->signal = OPUS_AUTO; else if (strcmp(value, "voice") == 0) @@ -118,7 +117,7 @@ opus_encoder_configure(struct opus_encoder *encoder, } static Encoder * -opus_encoder_init(const struct config_param *param, GError **error) +opus_encoder_init(const config_param ¶m, GError **error) { opus_encoder *encoder = new opus_encoder(); -- cgit v1.2.3