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 9B118430D7 for ; Sun, 15 Oct 2023 09:29:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C24168C8CB; Sun, 15 Oct 2023 12:29:19 +0300 (EEST) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8011568A0CD for ; Sun, 15 Oct 2023 12:29:13 +0300 (EEST) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-533d31a8523so5891298a12.1 for ; Sun, 15 Oct 2023 02:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697362152; x=1697966952; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1uHwxNaqNuH6pUNoNv7mLHSe6CegVPzVBJ3knmWmcEs=; b=J/kYH8RT4VDElUAlIYzR+dcAXRp4IHWPeihkvDgCKTyBJUq5ey+32oJJthl/r9wf2B Xv198Ia7er2FYfBLl9ZqewOPkLmqkBebzpzRoD9NsOTOHRtek2TcH0vwWd3J1BhzAXIv pIg40Ch9jqQ4shYLNM4zvDvbsIo6SVfwqKMY7U6TtO2ntNlYcKajBmXKKZ416wBAeF55 BdKzK2bx6i0dWRCsbKbErvaSKDRyk0iK0AJqSDjEQeJ+oVNQiuwzwZB8l+k5JRSrWK1D 3fHFdlZinU3xLblH6gyA3SZL6UXCeT9GNKupxQVv76dZmCfFXaX4T0SWspDF+kFndkco QumQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697362152; x=1697966952; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1uHwxNaqNuH6pUNoNv7mLHSe6CegVPzVBJ3knmWmcEs=; b=uP++DmAYIfXquXJ8SPdDbgrIoEJ4/UHj2p/Ht8NnYMGPR9C0OrQq6Xm1LMLdN27Qo1 1DPeQW1xgUQpNtAgg8JNzXs6riJxZSlQHGrz6keBrvF/yhAOQFEB2phvugPYr4X0efmy V7rSeCy0/NGvdj/+1n+UjJ0aPZ+N0iFgt9VHI/+FyM8J/JJDVtobLU2sNHnJdfKJoYSK LRhM4IyjsKFFRtix9bX2cEndgFvOoK8VM7UqfOPT1QIzcA4ujfEzV+2+wh6W3r/Ww4FY hvzEFEBurMS8N9nBqN37vGER89j2x5qITyYFFx7d2X/KzILX4KqvOUMbkKj8V6+AtWaY wRIA== X-Gm-Message-State: AOJu0YzHhI4rnpf4Pz9oqyfMp2MbPzGe9Q1ZfQ/Zy0H4SjYCdF5P6zfA 11VJH1KR5pg8ZhF1kuqB0+kk4qxIL9u41Q== X-Google-Smtp-Source: AGHT+IE+u0RUQedE3B6aiensiE1UFYuiNkjko9wK7DbIxDvpGRk4m0KKz6csXV+kTx8mhDrCl78niQ== X-Received: by 2002:a17:907:774c:b0:9ae:7433:aec6 with SMTP id kx12-20020a170907774c00b009ae7433aec6mr24609397ejc.60.1697362152174; Sun, 15 Oct 2023 02:29:12 -0700 (PDT) Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it. [84.220.189.10]) by smtp.gmail.com with ESMTPSA id ck22-20020a170906c45600b009b2d46425absm2032150ejb.85.2023.10.15.02.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 02:29:11 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 38498BFCDA; Sun, 15 Oct 2023 11:29:10 +0200 (CEST) From: Stefano Sabatini To: FFmpeg development discussions and patches Date: Sun, 15 Oct 2023 11:29:10 +0200 Message-Id: <20231015092910.388128-1-stefasab@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of 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: Stefano Sabatini 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: Currently we have -of and -print_format, which is a bit confusing. Add -output_format as an alias of -of to match the short name. --- Changelog | 1 + doc/ffprobe.texi | 6 +++--- fftools/ffprobe.c | 17 +++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Changelog b/Changelog index 259180e190..cceee46215 100644 --- a/Changelog +++ b/Changelog @@ -37,6 +37,7 @@ version : - VAAPI AV1 encoder - ffprobe XML output schema changed to account for multiple variable-fields elements within the same parent element +- ffprobe -output_format option added as an alias of -of version 6.0: diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index 4dc9f577bb..b74ff650ac 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -41,7 +41,7 @@ ffprobe will show it. ffprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of a form defined by the selected -writer, which is specified by the @option{print_format} option. +writer, which is specified by the @option{output_format} option. Sections may contain other nested sections, and are identified by a name (which may be shared by other sections), and an unique @@ -83,7 +83,7 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values. Prettify the format of the displayed values, it corresponds to the options "-unit -prefix -byte_binary_prefix -sexagesimal". -@item -of, -print_format @var{writer_name}[=@var{writer_options}] +@item -output_format, -of, -print_format @var{writer_name}[=@var{writer_options}] Set the output printing format. @var{writer_name} specifies the name of the writer, and @@ -91,7 +91,7 @@ Set the output printing format. For example for printing the output in JSON format, specify: @example --print_format json +-output_format json @end example For more details on the available output printing formats, see the diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index e490a9a9b2..91e81e639c 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -140,7 +140,7 @@ static int show_private_data = 1; #define SHOW_OPTIONAL_FIELDS_ALWAYS 1 static int show_optional_fields = SHOW_OPTIONAL_FIELDS_AUTO; -static char *print_format; +static char *output_format; static char *stream_specifier; static char *show_data_hash; @@ -4094,9 +4094,10 @@ static const OptionDef real_options[] = { "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" }, { "pretty", 0, {.func_arg = opt_pretty}, "prettify the format of displayed values, make it more human readable" }, - { "print_format", OPT_STRING | HAS_ARG, { &print_format }, + { "output_format", OPT_STRING | HAS_ARG, { &output_format }, "set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)", "format" }, - { "of", OPT_STRING | HAS_ARG, { &print_format }, "alias for -print_format", "format" }, + { "print_format", OPT_STRING | HAS_ARG, { &output_format }, "alias for -output_format (deprecated)" }, + { "of", OPT_STRING | HAS_ARG, { &output_format }, "alias for -output_format", "format" }, { "select_streams", OPT_STRING | HAS_ARG, { &stream_specifier }, "select the specified streams", "stream_specifier" }, { "sections", OPT_EXIT, {.func_arg = opt_sections}, "print sections structure and section information, and exit" }, { "show_data", OPT_BOOL, { &do_show_data }, "show packets data" }, @@ -4217,13 +4218,13 @@ int main(int argc, char **argv) writer_register_all(); - if (!print_format) - print_format = av_strdup("default"); - if (!print_format) { + if (!output_format) + output_format = av_strdup("default"); + if (!output_format) { ret = AVERROR(ENOMEM); goto end; } - w_name = av_strtok(print_format, "=", &buf); + w_name = av_strtok(output_format, "=", &buf); if (!w_name) { av_log(NULL, AV_LOG_ERROR, "No name specified for the output format\n"); @@ -4292,7 +4293,7 @@ int main(int argc, char **argv) } end: - av_freep(&print_format); + av_freep(&output_format); av_freep(&read_intervals); av_hash_freep(&hash); -- 2.34.1 _______________________________________________ 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".