From patchwork Thu Oct 10 11:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 15680 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9266844932D for ; Thu, 10 Oct 2019 14:39:14 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 82F15688385; Thu, 10 Oct 2019 14:39:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B600688254 for ; Thu, 10 Oct 2019 14:39:05 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id v17so6414531wml.4 for ; Thu, 10 Oct 2019 04:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=Tk1gDZMpiBYFO+tXrMC7nyjnuREX0TeXbOhYOrABvPU=; b=mpT5mXslEnHy1QrE0roldmnlpCPX4gvx1e2p9CHZNQ/yrHKlqGWDABxZodoXLAKjDu TQq1vIH0BFsV4B1jl30XEwShr/DVZF6sCADKfmvkrQjuH3rOFJh7PNryhvTcIdtGapcx hTZOf+omowSxcIff1bwuRSoiG3fu5/mDtOc0HnVnQGds65Si/z+sLtEZ38io8lqxrdLq f7C7EfY/B+rLUbxkIypHUo1YrX5PZ5/pkfpJKUYx6h9nsmY8RtVDXwIfzmOd3wzyy+Dk I9Wz3AaYnaZfo3E0g14uxjseWqVYkP2fICBUprKseEj8fOHzXa4dICiuJFaHACwi+Mwu 4LoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Tk1gDZMpiBYFO+tXrMC7nyjnuREX0TeXbOhYOrABvPU=; b=AlYPXQ9G3GlN0o26ybTGgnWsL9fW3ESZMxqQoQCKULBSRWWaVkG+jKti9kM3FNl+zK isk0WGYid3yV++JP6uzOBja/W3ZZUYJnUscFOxFLpQJ6+tWEI/Yxs44rZbxqPqp3Qzjk +pS0zKuaAmQ09mmRTueqgofMiC5HZzjBgoI0e6hWSKGZGpmUcqBXqA44VXuRQXHjtwK/ Q388jWRw07AabLOv3glOEFHw6dUT5g3UppLGWiLPVtB4jLkjke9iuxxfF4MykW9Q2phl Q+c9dpnxgvaXH36/6/Xx+JlcF8KP9bsWskyIL1R58f4/hKrAKHfxNz2T7N6EWGLeCZkd KxAw== X-Gm-Message-State: APjAAAWrl2GX5uRJ4ccmPIENHJGRlKl+qv7sgoLRaIdupp5dF4I1YdeB /jvYeADx/ityauqOrqBiCObj1xzu X-Google-Smtp-Source: APXvYqygOpOD+O3c0lGN3bqJuOgFl0Op6C4YRK+FsiJnnBbmSGF8gpoZfR3X1I6XskoVdEB6O3RGxw== X-Received: by 2002:a1c:6389:: with SMTP id x131mr7088033wmb.77.1570707544841; Thu, 10 Oct 2019 04:39:04 -0700 (PDT) Received: from localhost.localdomain ([37.244.241.148]) by smtp.gmail.com with ESMTPSA id w4sm5442214wrv.66.2019.10.10.04.39.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 04:39:04 -0700 (PDT) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Thu, 10 Oct 2019 13:38:42 +0200 Message-Id: <20191010113851.27196-5-onemda@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010113851.27196-1-onemda@gmail.com> References: <20191010113851.27196-1-onemda@gmail.com> Subject: [FFmpeg-devel] [PATCH 05/14] avfilter/vf_gblur: switch to ff_filter_process_command() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Paul B Mahol --- libavfilter/vf_gblur.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c index 6ef261478f..1957d79e0f 100644 --- a/libavfilter/vf_gblur.c +++ b/libavfilter/vf_gblur.c @@ -35,7 +35,7 @@ #include "video.h" #define OFFSET(x) offsetof(GBlurContext, x) -#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption gblur_options[] = { { "sigma", "set sigma", OFFSET(sigma), AV_OPT_TYPE_FLOAT, {.dbl=0.5}, 0.0, 1024, FLAGS }, @@ -344,22 +344,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return ff_filter_frame(outlink, out); } -static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, - char *res, int res_len, int flags) -{ - GBlurContext *s = ctx->priv; - int ret = 0; - - if ( !strcmp(cmd, "sigma") || !strcmp(cmd, "sigmaV") - || !strcmp(cmd, "steps") || !strcmp(cmd, "planes")) { - av_opt_set(s, cmd, args, 0); - } else { - ret = AVERROR(ENOSYS); - } - - return ret; -} - static av_cold void uninit(AVFilterContext *ctx) { GBlurContext *s = ctx->priv; @@ -395,5 +379,5 @@ AVFilter ff_vf_gblur = { .inputs = gblur_inputs, .outputs = gblur_outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, - .process_command = process_command, + .process_command = ff_filter_process_command, };