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 ESMTPS id 369984DAAB for ; Fri, 28 Feb 2025 05:04:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E02668DDAD; Fri, 28 Feb 2025 07:03:01 +0200 (EET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29A4668DD94 for ; Fri, 28 Feb 2025 07:02:58 +0200 (EET) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2fea795bafeso2363139a91.1; Thu, 27 Feb 2025 21:02:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740718976; x=1741323776; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=jwdmzMgeHxZr9yLbm+qzzcYXTUxmGED30hG/WotembU=; b=IB3+s9nriz2doENv5gZcv/VdQYXbmYZG7ppgDmYNHf8LLtmYK8qMuJY36vzuKxDla3 3mi+3J7jh5lv2/qyO3Co6VX+iGTTsTmXA8jTe+tYdrgO6UpyIlmbPwHG9rjVctG6Abrb wpmnrpqEXgf7OqVpnBqH2bLfTAvb+iG76aDoaI9OC2BQ4MXCnZU0Db+MEubET1AORxNu R6Qa/vgAHOEKmiwE4kHOBfSaSOS5MafXYsbQ9OjosJVUUskvKkiKljEbeug2poX8DM33 F5eH3v7biYuO7ZtGZ/Fb9z2oJla6NH9RY3m1FpohBAUrF9oOWyTSwHx5COSh4aXs48wN 8Rsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740718976; x=1741323776; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jwdmzMgeHxZr9yLbm+qzzcYXTUxmGED30hG/WotembU=; b=OogvvMgjVbRozHU9awFmSKVTFbS8qLpsStsiNQLOGAY5NLiY/v63n44KF6osKNJwtb +eCUKDQ2+rQ3BhNbCpmGpmaUH0JqXrDO+6F8TRMMhLzPVhTW7CjtAYliOBvk9/emRlLy WR/npNvF+RD/WbzULdPG9HeOHYP2jSXXW3/2KuMmvISVj/44k01ovL3iPIxgW3fGC6tN aJNjb7Fz4/BYSG2n6xGqgHqeXaQoyhDoVKw83+l6QYRfH6hV/C2uly9ihBOiSA/Pr38e LUD3ID4gAXVH11HyziXtrGE7Qfw072gLfeECCaVCYwBab0D1i6gM3ai2wiCc2ptQEdsW NNow== X-Forwarded-Encrypted: i=1; AJvYcCXQOrJ2wKy2maWK6zjCl5yF/BdKn2rOCVNTIFqLTT/GEMctSWfz0V5D4++/geFg6G8Ta9PsEyDHVIAQECCKGI6sFWfdnUDcfC0=@ffmpeg.org X-Gm-Message-State: AOJu0YzoNo80yX1BcKaavv7W0bcniLrdIV8aoKbsQtyqb99iJc0LF4Y+ y0Y622I4nEVMNf5d0svBAMcKnF35ZotJYqL44/fe0yVojMFbXV0WtjNkLg== X-Gm-Gg: ASbGncsDOCJg5vqefbLdl2wW7gjYAnTjA8hFxLa+EQk3KFeqHnS76lNQTt8zFAW//WG vtrPailMpWV2foFmudWXSAGhO+JIH5pu8LrIpHayfxkUFwSv9xp6ydzTL5mCOPbege3Bkc/wBXG FWK5ecuVjOWHg7RF984HlAYOM/4Kiz7YIiH/F7p1pi9LSV1iWWR8KSXvyrWoF5xrcL578/B+jba N4LJWm/rcFoPCaP/74Ryt6kxLFly4h+ceeL8WNd5Izrumq9gNlRueszWbZLfc/+s7v618oMbuLq LH9TWtmolibrnUs9EfFoqGdPDHbmImd0MUi0IkXU8Wfb X-Google-Smtp-Source: AGHT+IH5NMcXi3D8ncOuCWHi043w0eBgtAnAfNOybAr4SkaIyK8hbnOwmpJWF1k5QB8bS3qje38Y+A== X-Received: by 2002:a17:90b:3884:b0:2fa:2252:f436 with SMTP id 98e67ed59e1d1-2feba5ced0cmr3496230a91.3.1740718976259; Thu, 27 Feb 2025 21:02:56 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-223504c5c5csm24722315ad.113.2025.02.27.21.02.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Feb 2025 21:02:55 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Fri, 28 Feb 2025 05:02:14 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 6/8] ffprobe/avtextformat: Rename writer to formatter 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: Michael Niedermayer , Soft Works , 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: From: softworkz ..except for the actrual writers Signed-off-by: softworkz --- fftools/ffprobe.c | 116 ++++++++++++++-------------- libavutil/avtextformat.h | 14 ++-- libavutil/textformat/avtextformat.c | 48 ++++++------ 3 files changed, 89 insertions(+), 89 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 5dc9803d5c..87e2b94a1a 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -412,36 +412,36 @@ static void log_callback(void *ptr, int level, const char *fmt, va_list vl) #define writer_put_str(wctx_, str_) (wctx_)->writer_put_str(wctx_, str_) #define writer_printf(wctx_, fmt_, ...) (wctx_)->writer_printf(wctx_, fmt_, __VA_ARGS__) -#define MAX_REGISTERED_WRITERS_NB 64 +#define MAX_REGISTERED_FORMATTERS_NB 64 -static const AVTextFormatter *registered_writers[MAX_REGISTERED_WRITERS_NB + 1]; +static const AVTextFormatter *registered_formatters[MAX_REGISTERED_FORMATTERS_NB + 1]; -static int writer_register(const AVTextFormatter *writer) +static int formatter_register(const AVTextFormatter *formatter) { - static int next_registered_writer_idx = 0; + static int next_registered_formatter_idx = 0; - if (next_registered_writer_idx == MAX_REGISTERED_WRITERS_NB) + if (next_registered_formatter_idx == MAX_REGISTERED_FORMATTERS_NB) return AVERROR(ENOMEM); - registered_writers[next_registered_writer_idx++] = writer; + registered_formatters[next_registered_formatter_idx++] = formatter; return 0; } -static const AVTextFormatter *writer_get_by_name(const char *name) +static const AVTextFormatter *formatter_get_by_name(const char *name) { int i; - for (i = 0; registered_writers[i]; i++) - if (!strcmp(registered_writers[i]->name, name)) - return registered_writers[i]; + for (i = 0; registered_formatters[i]; i++) + if (!strcmp(registered_formatters[i]->name, name)) + return registered_formatters[i]; return NULL; } -/* WRITERS */ +/* FORMATTERS */ -#define DEFINE_WRITER_CLASS(name) \ +#define DEFINE_FORMATTER_CLASS(name) \ static const char *name##_get_name(void *ctx) \ { \ return #name ; \ @@ -472,7 +472,7 @@ static const AVOption default_options[] = { {NULL}, }; -DEFINE_WRITER_CLASS(default); +DEFINE_FORMATTER_CLASS(default); /* lame uppercasing routine, assumes the string is lower case ASCII */ static inline char *upcase_string(char *dst, size_t dst_size, const char *src) @@ -630,7 +630,7 @@ static const AVOption compact_options[]= { {NULL}, }; -DEFINE_WRITER_CLASS(compact); +DEFINE_FORMATTER_CLASS(compact); static av_cold int compact_init(AVTextFormatContext *wctx) { @@ -768,7 +768,7 @@ static const AVOption csv_options[] = { {NULL}, }; -DEFINE_WRITER_CLASS(csv); +DEFINE_FORMATTER_CLASS(csv); static const AVTextFormatter csv_formatter = { .name = "csv", @@ -802,7 +802,7 @@ static const AVOption flat_options[]= { {NULL}, }; -DEFINE_WRITER_CLASS(flat); +DEFINE_FORMATTER_CLASS(flat); static av_cold int flat_init(AVTextFormatContext *wctx) { @@ -923,7 +923,7 @@ static const AVOption ini_options[] = { {NULL}, }; -DEFINE_WRITER_CLASS(ini); +DEFINE_FORMATTER_CLASS(ini); static char *ini_escape_str(AVBPrint *dst, const char *src) { @@ -1030,7 +1030,7 @@ static const AVOption json_options[]= { { NULL } }; -DEFINE_WRITER_CLASS(json); +DEFINE_FORMATTER_CLASS(json); static av_cold int json_init(AVTextFormatContext *wctx) { @@ -1200,7 +1200,7 @@ static const AVOption xml_options[] = { {NULL}, }; -DEFINE_WRITER_CLASS(xml); +DEFINE_FORMATTER_CLASS(xml); static av_cold int xml_init(AVTextFormatContext *wctx) { @@ -1351,7 +1351,7 @@ static AVTextFormatter xml_formatter = { .priv_class = &xml_class, }; -static void writer_register_all(void) +static void formatters_register_all(void) { static int initialized; @@ -1359,13 +1359,13 @@ static void writer_register_all(void) return; initialized = 1; - writer_register(&default_formatter); - writer_register(&compact_formatter); - writer_register(&csv_formatter); - writer_register(&flat_formatter); - writer_register(&ini_formatter); - writer_register(&json_formatter); - writer_register(&xml_formatter); + formatter_register(&default_formatter); + formatter_register(&compact_formatter); + formatter_register(&csv_formatter); + formatter_register(&flat_formatter); + formatter_register(&ini_formatter); + formatter_register(&json_formatter); + formatter_register(&xml_formatter); } #define print_fmt(k, f, ...) do { \ @@ -3381,7 +3381,7 @@ static void close_input_file(InputFile *ifile) avformat_close_input(&ifile->fmt_ctx); } -static int probe_file(AVTextFormatContext *wctx, const char *filename, +static int probe_file(AVTextFormatContext *tctx, const char *filename, const char *print_filename) { InputFile ifile = { 0 }; @@ -3423,40 +3423,40 @@ static int probe_file(AVTextFormatContext *wctx, const char *filename, if (do_read_frames || do_read_packets) { if (do_show_frames && do_show_packets && - wctx->writer->flags & AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT) + tctx->formatter->flags & AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT) section_id = SECTION_ID_PACKETS_AND_FRAMES; else if (do_show_packets && !do_show_frames) section_id = SECTION_ID_PACKETS; else // (!do_show_packets && do_show_frames) section_id = SECTION_ID_FRAMES; if (do_show_frames || do_show_packets) - avtext_print_section_header(wctx, NULL, section_id); - ret = read_packets(wctx, &ifile); + avtext_print_section_header(tctx, NULL, section_id); + ret = read_packets(tctx, &ifile); if (do_show_frames || do_show_packets) - avtext_print_section_footer(wctx); + avtext_print_section_footer(tctx); CHECK_END; } if (do_show_programs) { - ret = show_programs(wctx, &ifile); + ret = show_programs(tctx, &ifile); CHECK_END; } if (do_show_stream_groups) { - ret = show_stream_groups(wctx, &ifile); + ret = show_stream_groups(tctx, &ifile); CHECK_END; } if (do_show_streams) { - ret = show_streams(wctx, &ifile); + ret = show_streams(tctx, &ifile); CHECK_END; } if (do_show_chapters) { - ret = show_chapters(wctx, &ifile); + ret = show_chapters(tctx, &ifile); CHECK_END; } if (do_show_format) { - ret = show_format(wctx, &ifile); + ret = show_format(tctx, &ifile); CHECK_END; } @@ -4019,10 +4019,10 @@ static inline int check_section_show_entries(int section_id) int main(int argc, char **argv) { - const AVTextFormatter *w; - AVTextFormatContext *wctx; + const AVTextFormatter *f; + AVTextFormatContext *tctx; char *buf; - char *w_name = NULL, *w_args = NULL; + char *f_name = NULL, *f_args = NULL; int ret, input_ret, i; init_dynload(); @@ -4084,7 +4084,7 @@ int main(int argc, char **argv) goto end; } - writer_register_all(); + formatters_register_all(); if (!output_format) output_format = av_strdup("default"); @@ -4092,37 +4092,37 @@ int main(int argc, char **argv) ret = AVERROR(ENOMEM); goto end; } - w_name = av_strtok(output_format, "=", &buf); - if (!w_name) { + f_name = av_strtok(output_format, "=", &buf); + if (!f_name) { av_log(NULL, AV_LOG_ERROR, "No name specified for the output format\n"); ret = AVERROR(EINVAL); goto end; } - w_args = buf; + f_args = buf; - w = writer_get_by_name(w_name); - if (!w) { - av_log(NULL, AV_LOG_ERROR, "Unknown output format with name '%s'\n", w_name); + f = formatter_get_by_name(f_name); + if (!f) { + av_log(NULL, AV_LOG_ERROR, "Unknown output format with name '%s'\n", f_name); ret = AVERROR(EINVAL); goto end; } - if ((ret = avtext_context_open(&wctx, w, w_args, + if ((ret = avtext_context_open(&tctx, f, f_args, sections, FF_ARRAY_ELEMS(sections), output_filename, show_value_unit, use_value_prefix, use_byte_value_binary_prefix, use_value_sexagesimal_format, show_optional_fields, show_data_hash)) >= 0) { - if (w == &xml_formatter) - wctx->string_validation_utf8_flags |= AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES; + if (f == &xml_formatter) + tctx->string_validation_utf8_flags |= AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES; - avtext_print_section_header(wctx, NULL, SECTION_ID_ROOT); + avtext_print_section_header(tctx, NULL, SECTION_ID_ROOT); if (do_show_program_version) - ffprobe_show_program_version(wctx); + ffprobe_show_program_version(tctx); if (do_show_library_versions) - ffprobe_show_library_versions(wctx); + ffprobe_show_library_versions(tctx); if (do_show_pixel_formats) - ffprobe_show_pixel_formats(wctx); + ffprobe_show_pixel_formats(tctx); if (!input_filename && ((do_show_format || do_show_programs || do_show_stream_groups || do_show_streams || do_show_chapters || do_show_packets || do_show_error) || @@ -4132,15 +4132,15 @@ int main(int argc, char **argv) av_log(NULL, AV_LOG_ERROR, "Use -h to get full help or, even better, run 'man %s'.\n", program_name); ret = AVERROR(EINVAL); } else if (input_filename) { - ret = probe_file(wctx, input_filename, print_input_filename); + ret = probe_file(tctx, input_filename, print_input_filename); if (ret < 0 && do_show_error) - show_error(wctx, ret); + show_error(tctx, ret); } input_ret = ret; - avtext_print_section_footer(wctx); - ret = avtext_context_close(&wctx); + avtext_print_section_footer(tctx); + ret = avtext_context_close(&tctx); if (ret < 0) av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret)); diff --git a/libavutil/avtextformat.h b/libavutil/avtextformat.h index 68db9445c9..3ffb070d01 100644 --- a/libavutil/avtextformat.h +++ b/libavutil/avtextformat.h @@ -66,8 +66,8 @@ typedef enum { } StringValidation; typedef struct AVTextFormatter { - const AVClass *priv_class; ///< private class of the writer, if any - int priv_size; ///< private size for the writer context + const AVClass *priv_class; ///< private class of the formatter, if any + int priv_size; ///< private size for the formatter context const char *name; int (*init) (AVTextFormatContext *wctx); @@ -85,15 +85,15 @@ typedef struct AVTextFormatter { #define SECTION_MAX_NB_SECTIONS 100 struct AVTextFormatContext { - const AVClass *class; ///< class of the writer - const AVTextFormatter *writer; ///< the AVTextFormatter of which this is an instance + const AVClass *class; ///< class of the formatter + const AVTextFormatter *formatter; ///< the AVTextFormatter of which this is an instance AVIOContext *avio; ///< the I/O context used to write void (* writer_w8)(AVTextFormatContext *wctx, int b); void (* writer_put_str)(AVTextFormatContext *wctx, const char *str); void (* writer_printf)(AVTextFormatContext *wctx, const char *fmt, ...); - char *name; ///< name of this writer instance + char *name; ///< name of this formatter instance void *priv; ///< private data for use by the filter const struct AVTextFormatSection *sections; ///< array containing all sections @@ -108,7 +108,7 @@ struct AVTextFormatContext { /** section per each level */ const struct AVTextFormatSection *section[SECTION_MAX_NB_LEVELS]; AVBPrint section_pbuf[SECTION_MAX_NB_LEVELS]; ///< generic print buffer dedicated to each section, - /// used by various writers + /// used by various formatters int show_optional_fields; int show_value_unit; @@ -126,7 +126,7 @@ struct AVTextFormatContext { #define AV_TEXTFORMAT_PRINT_STRING_OPTIONAL 1 #define AV_TEXTFORMAT_PRINT_STRING_VALIDATE 2 -int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writer, const char *args, +int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *formatter, const char *args, const struct AVTextFormatSection *sections, int nb_sections, const char *output_filename, int show_value_unit, diff --git a/libavutil/textformat/avtextformat.c b/libavutil/textformat/avtextformat.c index 2c47ccd18b..c8aaf702ec 100644 --- a/libavutil/textformat/avtextformat.c +++ b/libavutil/textformat/avtextformat.c @@ -54,10 +54,10 @@ static const struct { { 1.125899906842624e15, 1e15, "Pi", "P" }, }; -static const char *avtext_context_get_writer_name(void *p) +static const char *avtext_context_get_formatter_name(void *p) { AVTextFormatContext *wctx = p; - return wctx->writer->name; + return wctx->formatter->name; } #define OFFSET(x) offsetof(AVTextFormatContext, x) @@ -78,14 +78,14 @@ static const AVOption textcontext_options[] = { static void *trextcontext_child_next(void *obj, void *prev) { AVTextFormatContext *ctx = obj; - if (!prev && ctx->writer && ctx->writer->priv_class && ctx->priv) + if (!prev && ctx->formatter && ctx->formatter->priv_class && ctx->priv) return ctx->priv; return NULL; } static const AVClass textcontext_class = { .class_name = "AVTextContext", - .item_name = avtext_context_get_writer_name, + .item_name = avtext_context_get_formatter_name, .option = textcontext_options, .version = LIBAVUTIL_VERSION_INT, .child_next = trextcontext_child_next, @@ -149,11 +149,11 @@ int avtext_context_close(AVTextFormatContext **pwctx) av_hash_freep(&wctx->hash); - if (wctx->writer->uninit) - wctx->writer->uninit(wctx); + if (wctx->formatter->uninit) + wctx->formatter->uninit(wctx); for (i = 0; i < SECTION_MAX_NB_LEVELS; i++) av_bprint_finalize(&wctx->section_pbuf[i], NULL); - if (wctx->writer->priv_class) + if (wctx->formatter->priv_class) av_opt_free(wctx->priv); av_freep(&wctx->priv); av_opt_free(wctx); @@ -166,7 +166,7 @@ int avtext_context_close(AVTextFormatContext **pwctx) } -int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writer, const char *args, +int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *formatter, const char *args, const struct AVTextFormatSection *sections, int nb_sections, const char *output_filename, int show_value_unit, @@ -184,7 +184,7 @@ int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writ goto fail; } - if (!(wctx->priv = av_mallocz(writer->priv_size))) { + if (!(wctx->priv = av_mallocz(formatter->priv_size))) { ret = AVERROR(ENOMEM); goto fail; } @@ -201,16 +201,16 @@ int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writ } wctx->class = &textcontext_class; - wctx->writer = writer; + wctx->formatter = formatter; wctx->level = -1; wctx->sections = sections; wctx->nb_sections = nb_sections; av_opt_set_defaults(wctx); - if (writer->priv_class) { + if (formatter->priv_class) { void *priv_ctx = wctx->priv; - *(const AVClass **)priv_ctx = writer->priv_class; + *(const AVClass **)priv_ctx = formatter->priv_class; av_opt_set_defaults(priv_ctx); } @@ -220,14 +220,14 @@ int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writ const AVDictionaryEntry *opt = NULL; if ((ret = av_dict_parse_string(&opts, args, "=", ":", 0)) < 0) { - av_log(wctx, AV_LOG_ERROR, "Failed to parse option string '%s' provided to writer context\n", args); + av_log(wctx, AV_LOG_ERROR, "Failed to parse option string '%s' provided to textformat context\n", args); av_dict_free(&opts); goto fail; } while ((opt = av_dict_iterate(opts, opt))) { if ((ret = av_opt_set(wctx, opt->key, opt->value, AV_OPT_SEARCH_CHILDREN)) < 0) { - av_log(wctx, AV_LOG_ERROR, "Failed to set option '%s' with value '%s' provided to writer context\n", + av_log(wctx, AV_LOG_ERROR, "Failed to set option '%s' with value '%s' provided to textformat context\n", opt->key, opt->value); av_dict_free(&opts); goto fail; @@ -288,8 +288,8 @@ int avtext_context_open(AVTextFormatContext **pwctx, const AVTextFormatter *writ for (i = 0; i < SECTION_MAX_NB_LEVELS; i++) av_bprint_init(&wctx->section_pbuf[i], 1, AV_BPRINT_SIZE_UNLIMITED); - if (wctx->writer->init) - ret = wctx->writer->init(wctx); + if (wctx->formatter->init) + ret = wctx->formatter->init(wctx); if (ret < 0) goto fail; @@ -320,8 +320,8 @@ void avtext_print_section_header(AVTextFormatContext *wctx, memset(wctx->nb_item_type[wctx->level], 0, sizeof(wctx->nb_item_type[wctx->level])); wctx->section[wctx->level] = &wctx->sections[section_id]; - if (wctx->writer->print_section_header) - wctx->writer->print_section_header(wctx, data); + if (wctx->formatter->print_section_header) + wctx->formatter->print_section_header(wctx, data); } void avtext_print_section_footer(AVTextFormatContext *wctx) @@ -335,8 +335,8 @@ void avtext_print_section_footer(AVTextFormatContext *wctx) wctx->nb_item_type[wctx->level - 1][section_id]++; } - if (wctx->writer->print_section_footer) - wctx->writer->print_section_footer(wctx); + if (wctx->formatter->print_section_footer) + wctx->formatter->print_section_footer(wctx); wctx->level--; } @@ -346,7 +346,7 @@ void avtext_print_integer(AVTextFormatContext *wctx, const struct AVTextFormatSection *section = wctx->section[wctx->level]; if (section->show_all_entries || av_dict_get(section->entries_to_show, key, NULL, 0)) { - wctx->writer->print_integer(wctx, key, val); + wctx->formatter->print_integer(wctx, key, val); wctx->nb_item[wctx->level]++; } } @@ -483,7 +483,7 @@ int avtext_print_string(AVTextFormatContext *wctx, const char *key, const char * if (wctx->show_optional_fields == SHOW_OPTIONAL_FIELDS_NEVER || (wctx->show_optional_fields == SHOW_OPTIONAL_FIELDS_AUTO && (flags & AV_TEXTFORMAT_PRINT_STRING_OPTIONAL) - && !(wctx->writer->flags & AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS))) + && !(wctx->formatter->flags & AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS))) return 0; if (section->show_all_entries || av_dict_get(section->entries_to_show, key, NULL, 0)) { @@ -493,7 +493,7 @@ int avtext_print_string(AVTextFormatContext *wctx, const char *key, const char * if (ret < 0) goto end; ret = validate_string(wctx, &val1, val); if (ret < 0) goto end; - wctx->writer->print_string(wctx, key1, val1); + wctx->formatter->print_string(wctx, key1, val1); end: if (ret < 0) { av_log(wctx, AV_LOG_ERROR, @@ -503,7 +503,7 @@ int avtext_print_string(AVTextFormatContext *wctx, const char *key, const char * av_free(key1); av_free(val1); } else { - wctx->writer->print_string(wctx, key, val); + wctx->formatter->print_string(wctx, key, val); } wctx->nb_item[wctx->level]++; -- 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".