From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5E78643B28 for ; Tue, 11 Oct 2022 21:38:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DEDBC68BD13; Wed, 12 Oct 2022 00:38:30 +0300 (EEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7DB1668BB35 for ; Wed, 12 Oct 2022 00:38:24 +0300 (EEST) Received: by mail-pl1-f176.google.com with SMTP id z20so14426902plb.10 for ; Tue, 11 Oct 2022 14:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=CmwAKrzIXDzSx9DlZVhVvic08RSsBGpVmn2qNRvvzXU=; b=X0KgPM7vEfvzSFE/YmZ4R2ZgWizYo0lZ3XrRSL3jZ0uN0Fz6tlIf4hoP6pyBM49XlN SGF4ylHc8jKHi5PE/i6s7dsdWbfE8RPTW7GGBe1B//UAtXR8Qf3blnK8HcVn3qAgMPDk nAM37Ij+vl2/VR+rm3B0S+Q0USqeDvoopgPRSwJWb7V75lPeUPx4bxu5aIcTejdxG9NA cs+C4X5s7iHaBGk6GYYzo++MlfpVcl2TZ4ODw8g+OFk9z3b04g1WLt63uCPjkJFAkrQX EF3nsmXkmmGBFtSSUCELHSc/EIMaG3NAmQcpBA/BjTds6PP1fYurGfP/hCBYFVDgXOkO WtuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CmwAKrzIXDzSx9DlZVhVvic08RSsBGpVmn2qNRvvzXU=; b=xuRRIZdgqKQQ99nOHcMisljtVXedra1sbAVnrJGc66Mkncdk3wc9EejUeoiQp6NSH6 4PGPTjC8ipObXOKVtp8OvjpTJnfgnthC1DixBd6SOmtKAyZAZVPf9Kjklr1H6dGBj07e SZtZIOoFu31jXhjX+yx8WTMKIbViDqJ08VFSpnFuZB50eDX9FTL7v8vc9Y6Bk8jgSpFV MMp7EIIyTdT8SF4syu9g/y8SQLb+sAu0eD+XrF+dfLUIo+d0pSFFGm1VOJoIoDNnT5nu oZGMeVfaDPiDKMcODCJr2WkEgPUrELDzpuqFIXR9ZS8+QvxFEhg+AXOcb/G+TsCOqFgo 6WDA== X-Gm-Message-State: ACrzQf3KJ6UC+8TpfD2omckIFytNia9pJsdeXt903sLk76/gD7iF/Dbe 5Ce/FFxkFJmjEsKh/qQbcNk2JKwg6vw= X-Google-Smtp-Source: AMsMyM7c2SHGrxyWI50Vmx27DJvtmVeG8xIwI46eNYwRHPRR6dEhS/vH1dmEgITatr5oKZxnVuv3KA== X-Received: by 2002:a17:90b:2741:b0:20a:ebc3:6513 with SMTP id qi1-20020a17090b274100b0020aebc36513mr1366853pjb.29.1665524302531; Tue, 11 Oct 2022 14:38:22 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id ik7-20020a170902ab0700b0016f8e8032c4sm9060141plb.129.2022.10.11.14.38.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Oct 2022 14:38:21 -0700 (PDT) Message-Id: In-Reply-To: References: From: ffmpegagent Date: Tue, 11 Oct 2022 21:38:18 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 0/2] Print filter input/output formats in help output X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Example output for command: ffmpeg -h filters=overlay Filter overlay Overlay a video source on top of the input. slice threading supported Inputs: #0: main (video), Formats: Dynamic, Default: [yuv420p, yuvj420p, yuva420p, nv12, nv21] #1: overlay (video), Formats: Dynamic, Default: [yuva420p] Outputs: #0: default (video), Formats: Dynamic, Default: [yuv420p, yuvj420p, yuva420p, nv12, nv21] overlay AVOptions: [...] Examples for what it prints in various cases ============================================ For pass-through filter links "All (passthrough)" For filters using query_formats "Dynamic" For filters using query_formats where a call to query_formats succeeds "Dynamic, Default: [yuv420p, yuvj420p, yuva420p, nv12, nv21]" For all other cases "[s16p, s32p, fltp, dblp]" Except when all formats are supported (number of formats equals number of available formats) "All" ---------------------------------------------------------------------------- v2: rebase and fix compiler warnings softworkz (2): avfilter/avfilter: add avfilter_print_config_formats() ftools/opt_common: Print filter input/output formats in help output doc/APIchanges | 3 ++ fftools/opt_common.c | 37 +++++++++---- libavfilter/avfilter.c | 102 +++++++++++++++++++++++++++++++++++- libavfilter/avfilter.h | 12 +++++ libavfilter/avfiltergraph.c | 15 ++++-- libavfilter/internal.h | 9 ++++ libavfilter/version.h | 4 +- 7 files changed, 163 insertions(+), 19 deletions(-) base-commit: 479747645f795b6f4f376578ea1556409f943c31 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-43%2Fsoftworkz%2Fsubmit_print_formats-v2 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-43/softworkz/submit_print_formats-v2 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/43 Range-diff vs v1: 1: c9496ca671 ! 1: 5ae347e40c avfilter/avfilter: add avfilter_print_config_formats() @@ doc/APIchanges: libavutil: 2021-04-27 +2022-10-11 - xxxxxxxxxx - lavf 59.50.100 - avfilter.h + Add add avfilter_print_config_formats(). -+ - 2022-10-05 - 37d5ddc317 - lavu 57.39.100 - cpu.h - Add AV_CPU_FLAG_RVB_BASIC. ++ + 2022-10-11 - xxxxxxxxxx - lavu 57.39.101 - pixfmt.h + Add AV_PIX_FMT_RGBF32 and AV_PIX_FMT_RGBAF32. ## libavfilter/avfilter.c ## @@ libavfilter/avfilter.c: void avfilter_link_free(AVFilterLink **link) av_freep(link); } -+static unsigned get_nb_pix_fmts() ++static unsigned get_nb_pix_fmts(void) +{ + unsigned i = 0; + while (av_pix_fmt_desc_get(i++)) {} + return i - 1; +} + -+static unsigned get_nb_sample_fmts() ++static unsigned get_nb_sample_fmts(void) +{ + unsigned i = 0; + while (av_get_sample_fmt_name(i++)) {} @@ libavfilter/avfiltergraph.c: static int query_formats(AVFilterGraph *graph, void - ret = filter_query_formats(f); - else - ret = ff_default_query_formats(f); ++ + ret = ff_filter_query_formats(f); if (ret < 0 && ret != AVERROR(EAGAIN)) return ret; 2: c99d278881 ! 2: 29389422a9 ftools/opt_common: Print filter input/output formats in help output @@ fftools/opt_common.c: static void show_help_filter(const char *name) { #if CONFIG_AVFILTER const AVFilter *f = avfilter_get_by_name(name); -- int i, count; + AVBPrint bp; -+ int i, count, ret; + int i, count; if (!name) { - av_log(NULL, AV_LOG_ERROR, "No filter name specified.\n"); @@ fftools/opt_common.c: static void show_help_filter(const char *name) return; } -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".