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 2814D48756 for ; Wed, 17 Jan 2024 12:41:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 176C168CFA7; Wed, 17 Jan 2024 14:41:39 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2E4B568CF01 for ; Wed, 17 Jan 2024 14:41:31 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=ZVroHvav; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 60BE519D4 for ; Wed, 17 Jan 2024 13:41:30 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id DbsQ5HtEiYkq for ; Wed, 17 Jan 2024 13:41:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1705495289; bh=pLCrW5455icJZ5CNu33yVaXtctust5EYx3ltMZXfcyk=; h=From:To:Subject:Date:From; b=ZVroHvavN1VM5t/kigdNu4ul2Xbc12eObe1xNxcMeB2sOyTa3WGUYoVuELLcbWHXN 5VOWkHWzM0VtmQ98JVc/ZhLc4K3Wk+tjf6fcrHMuMRagzBw1K9qCxlzWDaIh/fokSM /80D6G27OPq8vkxynd6N4XrUL9jn3RYcEAcnDbkXD541RJUPcUUTLaF9DPFiC6p/DS D5ip2NiY0PvfZIC4MB2vBjzuV0msj52dojTXuum22DF616inEWlCEtn93faJrqSiMT 4OtipFNq30LjoMuW9rksdUT8lXcfCxfqmgBIqCTfrUQNG4rxJWbMFa0P8las+e6PJY BtarcBh+2hYQA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 67677EE8 for ; Wed, 17 Jan 2024 13:41:29 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 42A503A0219 for ; Wed, 17 Jan 2024 13:41:29 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 17 Jan 2024 13:40:28 +0100 Message-ID: <20240117124036.7877-1-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/8] fftools/cmdutils: hide some information listing options from basic help 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 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: They are for advanced usage only and should not clutter basic output. --- fftools/ffmpeg_opt.c | 7 +++++-- fftools/opt_common.h | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 1978f438fe..6b16d92a87 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1197,7 +1197,10 @@ void show_help_default(const char *opt, const char *arg) "\n", program_name); show_help_options(options, "Print help / information / capabilities:", - OPT_EXIT, 0, 0); + OPT_EXIT, OPT_EXPERT, 0); + if (show_advanced) + show_help_options(options, "Advanced information / capabilities:", + OPT_EXIT | OPT_EXPERT, 0, 0); show_help_options(options, "Global options (affect whole program " "instead of just one file):", @@ -1806,7 +1809,7 @@ const OptionDef options[] = { { "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_output_formats) }, "select output format used with HW accelerated decoding", "format" }, - { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT, + { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_hwaccels }, "show available HW acceleration methods" }, { "autorotate", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_INPUT, diff --git a/fftools/opt_common.h b/fftools/opt_common.h index 36c591cc94..9bb5268472 100644 --- a/fftools/opt_common.h +++ b/fftools/opt_common.h @@ -41,9 +41,9 @@ int show_sources(void *optctx, const char *opt, const char *arg); #if CONFIG_AVDEVICE #define CMDUTILS_COMMON_OPTIONS_AVDEVICE \ - { "sources" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG, { .func_arg = show_sources }, \ + { "sources" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = show_sources }, \ "list sources of the input device", "device" }, \ - { "sinks" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG, { .func_arg = show_sinks }, \ + { "sinks" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = show_sinks }, \ "list sinks of the output device", "device" }, \ #else @@ -199,26 +199,26 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg); #define CMDUTILS_COMMON_OPTIONS \ { "L", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_license }, "show license" }, \ { "h", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ - { "?", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ - { "help", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ - { "-help", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "?", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \ + { "help", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \ + { "-help", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \ { "version", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_version }, "show version" }, \ - { "buildconf", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_buildconf }, "show build configuration" }, \ - { "formats", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \ + { "buildconf", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_buildconf }, "show build configuration" }, \ + { "formats", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_formats }, "show available formats" }, \ { "muxers", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_muxers }, "show available muxers" }, \ { "demuxers", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_demuxers }, "show available demuxers" }, \ { "devices", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_devices }, "show available devices" }, \ - { "codecs", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \ + { "codecs", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_codecs }, "show available codecs" }, \ { "decoders", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \ { "encoders", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \ - { "bsfs", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \ - { "protocols", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \ + { "bsfs", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \ + { "protocols", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_protocols }, "show available protocols" }, \ { "filters", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \ { "pix_fmts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \ { "layouts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \ { "sample_fmts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \ - { "dispositions", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_dispositions}, "show available stream dispositions" }, \ - { "colors", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \ + { "dispositions", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_dispositions}, "show available stream dispositions" }, \ + { "colors", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_colors }, "show available color names" }, \ { "loglevel", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ { "v", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ { "report", OPT_TYPE_FUNC, OPT_EXPERT, { .func_arg = opt_report }, "generate a report" }, \ -- 2.42.0 _______________________________________________ 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".