From: Soft Works <softworkz-at-hotmail.com@ffmpeg.org>
To: Stefano Sabatini <stefasab@gmail.com>,
FFmpeg development discussions and patches
<ffmpeg-devel@ffmpeg.org>
Cc: Soft Works <softworkz-at-hotmail.com@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c
Date: Sun, 9 Mar 2025 18:55:22 +0000
Message-ID: <DM8P223MB0365CC16A3B2094B9E1F460FBAD72@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <Z8xV8g1pb2RPTKw1@mariano>
> -----Original Message-----
> From: Stefano Sabatini <stefasab@gmail.com>
> Sent: Samstag, 8. März 2025 15:37
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Cc: Soft Works <softworkz-at-hotmail.com@ffmpeg.org>; softworkz
> <softworkz@hotmail.com>; Andreas Rheinhardt
> <andreas.rheinhardt@outlook.com>
> Subject: Re: [FFmpeg-devel] [PATCH v3 1/7] fftools/textformat: Extract
> and generalize textformat api from ffprobe.c
>
> On date Saturday 2025-03-01 10:01:58 +0000, softworkz wrote:
> [...]
>
> > +int avtext_context_open(AVTextFormatContext **ptctx, const
> AVTextFormatter *formatter, AVTextWriterContext *writer, const char
> *args,
> > + const struct AVTextFormatSection *sections,
> int nb_sections,
> > + int show_value_unit,
> > + int use_value_prefix,
> > + int use_byte_value_binary_prefix,
> > + int use_value_sexagesimal_format,
> > + int show_optional_fields,
> > + char *show_data_hash);
>
> writer -> writer_ctx?
>
> I'm fine with changing this later to avoid massive rebase edits.
>
> Also I notice there is some of the usual inconsistencies here:
> av_X_Y against avXY and avX_Y that we have in the rest of the code.
>
> Maybe let's stick to avX_Y or to av_X_Y.
>
> Also this might be:
> av_text_format_open(...)
> av_text_format_close(...)
> av_text_format_print_X(...)
>
> Or to simplify we can just call the structure AVTextContext (I see
> text as an evolution of a string, meant for structured formatted data,
> which is implied by the fact that we need a formatter) and simplify
> related functions naming to:
> av_text_open(...)
> av_text_close(...)
> av_text_print_X(...)
>
> av_text_formatter_...
> av_text_writer_open...
> av_text_writer_close...
>
> In fact I don't think there is much gain in keeping "context" in the
> name of the functions.
>
> What do you think?
>
> Again, since this is not public API (yet?) this should not be
> considered a blocker (also I've been out of touch with FFmpeg and I
> might be not aware of API conventions evolution).
Hi Stefano,
regarding the API naming I thought that maybe it's better to get it straight right away. To make it fully consistent as mentioned, we should look at all "public" API names. Here's a complete list:
# "avtexformat.h"
## Defines
AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
=> AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
=> AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
AV_TEXTFORMAT_PRINT_STRING_OPTIONAL => AV_TEXTFORMAT_PRINT_STRING_OPTIONAL
AV_TEXTFORMAT_PRINT_STRING_VALIDATE => AV_TEXTFORMAT_PRINT_STRING_VALIDATE
## Enum
StringValidation => StringValidation
AV_TEXTFORMAT_STRING_VALIDATION_FAIL => AV_TEXTFORMAT_STRING_VALIDATION_FAIL
AV_TEXTFORMAT_STRING_VALIDATION_REPLACE => AV_TEXTFORMAT_STRING_VALIDATION_REPLACE
AV_TEXTFORMAT_STRING_VALIDATION_IGNORE => AV_TEXTFORMAT_STRING_VALIDATION_IGNORE
AV_TEXTFORMAT_STRING_VALIDATION_NB => AV_TEXTFORMAT_STRING_VALIDATION_NB
## Structs
AVTextFormatSection => AVTextFormatSection
AVTextFormatter => AVTextFormatter
AVTextFormatContext => AVTextFormatContext
## Functions
avtext_context_open() => avtext_context_open()
avtext_context_close() => avtext_context_close()
avtext_print_section_header() => avtext_print_section_header()
avtext_print_section_footer() => avtext_print_section_footer()
avtext_print_integer() => avtext_print_integer()
avtext_print_string() => avtext_print_string()
avtext_print_unit_int() => avtext_print_unit_int()
avtext_print_rational() => avtext_print_rational()
avtext_print_time() => avtext_print_time()
avtext_print_ts() => avtext_print_ts()
avtext_print_data() => avtext_print_data()
avtext_print_data_hash() => avtext_print_data_hash()
avtext_print_integers() => avtext_print_integers()
avtext_get_formatter_by_name() => avtext_get_formatter_by_name()
# "avtextwriters.h"
## Structs
AVTextWriter => AVTextWriter
AVTextWriterContext => AVTextWriterContext
## Functions
avtextwriter_context_open() => avtextwriter_context_open()
avtextwriter_context_close() => avtextwriter_context_close()
avtextwriter_create_stdout() => avtextwriter_create_stdout()
avtextwriter_create_avio() => avtextwriter_create_avio()
avtextwriter_create_file() => avtextwriter_create_file()
avtextwriter_create_buffer() => avtextwriter_create_buffer()
If you could edit the right sides in the way you think it should be, I'll make the changes accordingly.
Thanks,
sw
_______________________________________________
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".
next prev parent reply other threads:[~2025-03-09 18:55 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 9:59 [FFmpeg-devel] [PATCH 0/3] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-02-19 9:59 ` [FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-02-19 9:59 ` [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-02-21 9:22 ` Andreas Rheinhardt
2025-02-21 9:42 ` Soft Works
2025-02-21 11:11 ` Andreas Rheinhardt
2025-02-21 11:25 ` Soft Works
2025-02-21 13:09 ` Nicolas George
2025-02-21 13:49 ` Soft Works
2025-02-24 10:41 ` Nicolas George
2025-02-24 13:19 ` Soft Works
2025-02-26 14:42 ` Nicolas George
2025-02-27 13:11 ` Soft Works
2025-02-19 9:59 ` [FFmpeg-devel] [PATCH 3/3] fftools: Enable filtergraph printing and update docs softworkz
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 0/4] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 1/4] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 2/4] avfilter/avfilter Add avfilter_link_get_hw_frames_ctx() softworkz
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 3/4] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 4/4] fftools: Enable filtergraph printing and update docs softworkz
2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 0/7] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz
2025-03-02 17:54 ` Stefano Sabatini
2025-03-02 19:44 ` Soft Works
2025-03-05 20:20 ` Stefano Sabatini
2025-03-05 20:58 ` Soft Works
2025-03-08 14:00 ` Stefano Sabatini
2025-03-08 15:01 ` Soft Works
2025-03-08 14:36 ` Stefano Sabatini
2025-03-08 15:30 ` Soft Works
2025-03-08 18:12 ` Stefano Sabatini
2025-03-08 19:25 ` Soft Works
2025-03-09 18:55 ` Soft Works [this message]
2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 2/7] fftools/ffprobe: Change to use textformat api softworkz
2025-03-08 14:18 ` Stefano Sabatini
2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 3/7] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz
2025-03-08 14:46 ` Stefano Sabatini
2025-03-08 15:46 ` Soft Works
2025-03-08 17:54 ` Soft Works
2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 4/7] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 5/7] avfilter/avfilter Add avfilter_link_get_hw_frames_ctx() softworkz
2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 6/7] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 7/7] fftools: Enable filtergraph printing and update docs softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 0/7] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 2/7] fftools/ffprobe: Change to use textformat api softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 3/7] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 4/7] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 5/7] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 6/7] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 7/7] fftools: Enable filtergraph printing and update docs softworkz
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 0/8] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 1/8] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz
2025-03-08 19:08 ` Stefano Sabatini
2025-03-08 19:49 ` Soft Works
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 2/8] fftools/ffprobe: Change to use textformat api softworkz
2025-03-08 19:23 ` Stefano Sabatini
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 3/8] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz
2025-03-08 19:24 ` Stefano Sabatini
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 4/8] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 5/8] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 6/8] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 7/8] fftools: Enable filtergraph printing and update docs softworkz
2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 8/8] fftools/ffprobe: Rename AVTextFormatContext variables (w => tc) softworkz
2025-03-08 19:30 ` Stefano Sabatini
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 0/8] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 1/8] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 2/8] fftools/ffprobe: Change to use textformat api softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 3/8] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 4/8] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 5/8] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 6/8] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 7/8] fftools: Enable filtergraph printing and update docs softworkz
2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 8/8] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM8P223MB0365CC16A3B2094B9E1F460FBAD72@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM \
--to=softworkz-at-hotmail.com@ffmpeg.org \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=stefasab@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git