From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 385974D430
	for <ffmpegdev@gitmailbox.com>; Fri, 18 Apr 2025 02:57:23 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4856468813C;
	Fri, 18 Apr 2025 05:57:20 +0300 (EEST)
Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com
 [209.85.216.47])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0CB8687D65
 for <ffmpeg-devel@ffmpeg.org>; Fri, 18 Apr 2025 05:57:13 +0300 (EEST)
Received: by mail-pj1-f47.google.com with SMTP id
 98e67ed59e1d1-3015001f862so1151227a91.3
 for <ffmpeg-devel@ffmpeg.org>; Thu, 17 Apr 2025 19:57:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744945032; x=1745549832; darn=ffmpeg.org;
 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=z7mBlQqHK3QFARK8EF+MfAKOvNiKT3+CO87EFaoX8Pc=;
 b=jxyoTeMmE7j97THRsDhJ92qDlpgoeE0HuHx8zpSjJsYj39O1sSyFJwTD7LqD/BODeG
 DZFgHPg+xYnAbVEiog6LmGEDQTqNCKK3uRXSb8dFVqRldPor2iHU/v4qJTlgX1/kEUXo
 FuncG3y/vW/oxYnjSmV/kdCTgkI4fgFfErle8BwMdfDkTKSaIjT/nd7R46XxEHmBJmBw
 ELplvl1yuKFBSgGmlCSZTOphLUsNX/En6DdEkfFjm77CdnTh23HVpwYL4R4ucizpvHXy
 ONG9yj/mbPsj7jb6TwmcH6yBdqbphSxL9XgvfEZTjf1pA3AT9eydf1nhFTg74ylNLSIK
 4i/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744945032; x=1745549832;
 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=z7mBlQqHK3QFARK8EF+MfAKOvNiKT3+CO87EFaoX8Pc=;
 b=LDBwBC8JTVjX+mDVY/bfYMQcawsa+dCA/ZfsNDg4uQ7D/cZhvm7D9F+4CRN9lWa+ka
 SQyktcst9oyqgOLVaYd03Ef0YVibbL4KG7jzfGqx9K2HY4MZG1eMiNbR4N9q6W2R+nw6
 ew27+GdY05Ti5Ro/R4qTb/Y5lAfNgoCdOZfhoDtmzs0k52haerjmFPay0KXvvOzIcm2P
 kemZt2C1TJ9MfqtdRLs5LQZH2BLfQliAQRMbFl7EUpApJvBF/m7Uj9Md6SEfUHXSlWsV
 tO9QmzPBD10AHfpTPHMnjgM5gratjJQo7wB664tnCNW8xIT7cyb0dfCHuHCcmuEFdm6t
 YtxA==
X-Gm-Message-State: AOJu0YyRdxBKDXbId/9Rogjk9SSTowgvqr6twYXRj74RZ+DRdTdE7e1/
 j04J4QGemTudWoedbJRGElZYVAVYOBRIjAnQyu508aUgWc6ERivzVH2LXg==
X-Gm-Gg: ASbGncv//BE7xXu64c2d6UiHMMcpkCLxn/ehyMNpb7y85CAVGz+24sjjq2dn44gGM7u
 kA8QlYXn1dx0l1iaOTvOElCxeBICnLekRovTPJHfLXr4tTZsk2B5mGTB2AFPkCKQJIea4OBa1g8
 kWFlwrqObNtVHFGu2TZhs7yCAcMkbqIrsfAyQHD7gy+G1NS7a/1pZXXddkp5pEdh8sVkMr/Rw5G
 FBosd0rr+W/gJU9vZPO7ifvFGpnou5i0nZC1wPZOJA0fD1xA/ErseHsCXwIZWqj8uWz0I5zko1D
 bhEMrywqPqC43IeBuNDKDm9UX+Vi+ZqdqzjP4h3IRwppgotJxRnJo/uxk6c=
X-Google-Smtp-Source: AGHT+IEs3TGpiH3LacxFDU2Z5cIwRfdf+vfdxYcmHCEB/0YxzSfnvblQJ3IKlqTR70f4EI57czRR2A==
X-Received: by 2002:a17:90b:2542:b0:2f9:bcd8:da33 with SMTP id
 98e67ed59e1d1-3087bb6d2ccmr1742016a91.21.1744945030885; 
 Thu, 17 Apr 2025 19:57:10 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-3087df0513dsm211119a91.16.2025.04.17.19.57.10
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 17 Apr 2025 19:57:10 -0700 (PDT)
Message-Id: <pull.66.v3.ffstaging.FFmpeg.1744945024.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v2.ffstaging.FFmpeg.1744798340.ffmpegagent@gmail.com>
References: <pull.66.v2.ffstaging.FFmpeg.1744798340.ffmpegagent@gmail.com>
From: ffmpegagent <ffmpegagent@gmail.com>
Date: Fri, 18 Apr 2025 02:56:53 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v3 00/11] Execution Graph Printing
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: softworkz <softworkz@hotmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/pull.66.v3.ffstaging.FFmpeg.1744945024.ffmpegagent@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

Shortest cover letter for my longest-running FFmpeg patchset:

 * Apply
 * Build
 * Add the "-sg" switch to any FFmpeg command line
 * Press 'q' when you don't want to wait

SG = Show Graph

Documentation and examples can be found here:

https://github.com/softworkz/ffmpeg_output_apis/wiki


Version Updates
===============


V2
==

 * Rebased on top of Andreas' improvements
 * Applied changes from review (thanks, Andreas)


V3
==

 * Fixed all "new warnings"
 * Fixed out-of-tree building (thanks, Michael)

softworkz (11):
  fftools/textformat: Formatting and whitespace changes
  fftools/textformat: Quality improvements
  fftools/textformat: Introduce common header and deduplicate code
  fftools/tf_internal: Use ac_default_item_name
  fftools/textformat: Add function avtext_print_integer_flags()
  fftools/ffmpeg_filter: Move some declaration to new header file
  avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()
  fftools/resources: Add resource manager files
  fftools/ffmpeg_mux: Make ms_from_ost() inline
  fftools/graphprint: Add execution graph printing
  fftools/graphprint: Now, make it a Killer-Feature!

 doc/APIchanges                     |    3 +
 doc/ffmpeg.texi                    |   14 +
 ffbuild/common.mak                 |   28 +-
 fftools/Makefile                   |   22 +-
 fftools/ffmpeg.c                   |    4 +
 fftools/ffmpeg.h                   |    4 +
 fftools/ffmpeg_filter.c            |  195 +----
 fftools/ffmpeg_filter.h            |  234 ++++++
 fftools/ffmpeg_mux.h               |    2 +-
 fftools/ffmpeg_opt.c               |   17 +
 fftools/graph/filelauncher.c       |  204 +++++
 fftools/graph/graphprint.c         | 1146 ++++++++++++++++++++++++++++
 fftools/graph/graphprint.h         |   62 ++
 fftools/resources/.gitignore       |    4 +
 fftools/resources/Makefile         |   27 +
 fftools/resources/graph.css        |  353 +++++++++
 fftools/resources/graph.html       |   86 +++
 fftools/resources/resman.c         |  213 ++++++
 fftools/resources/resman.h         |   50 ++
 fftools/textformat/avtextformat.c  |  238 +++---
 fftools/textformat/avtextformat.h  |   53 +-
 fftools/textformat/avtextwriters.h |   11 +-
 fftools/textformat/tf_compact.c    |  121 +--
 fftools/textformat/tf_default.c    |   55 +-
 fftools/textformat/tf_flat.c       |   51 +-
 fftools/textformat/tf_ini.c        |   62 +-
 fftools/textformat/tf_internal.h   |   81 ++
 fftools/textformat/tf_json.c       |   56 +-
 fftools/textformat/tf_mermaid.c    |  658 ++++++++++++++++
 fftools/textformat/tf_mermaid.h    |   41 +
 fftools/textformat/tf_xml.c        |   68 +-
 fftools/textformat/tw_avio.c       |   16 +-
 fftools/textformat/tw_buffer.c     |    7 +-
 fftools/textformat/tw_stdout.c     |    8 +-
 libavfilter/avfilter.c             |    9 +
 libavfilter/avfilter.h             |   12 +
 36 files changed, 3669 insertions(+), 546 deletions(-)
 create mode 100644 fftools/ffmpeg_filter.h
 create mode 100644 fftools/graph/filelauncher.c
 create mode 100644 fftools/graph/graphprint.c
 create mode 100644 fftools/graph/graphprint.h
 create mode 100644 fftools/resources/.gitignore
 create mode 100644 fftools/resources/Makefile
 create mode 100644 fftools/resources/graph.css
 create mode 100644 fftools/resources/graph.html
 create mode 100644 fftools/resources/resman.c
 create mode 100644 fftools/resources/resman.h
 create mode 100644 fftools/textformat/tf_internal.h
 create mode 100644 fftools/textformat/tf_mermaid.c
 create mode 100644 fftools/textformat/tf_mermaid.h


base-commit: 7684243fbe6e84fecb4a039195d5fda8a006a2a4
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-66%2Fsoftworkz%2Fsubmit_print_execution_graph-v3
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-66/softworkz/submit_print_execution_graph-v3
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/66

Range-diff vs v2:

  1:  b6468d1a30 =  1:  357859ee56 fftools/textformat: Formatting and whitespace changes
  2:  6568269678 !  2:  9279d2f53d fftools/textformat: Quality improvements
     @@ fftools/textformat/tw_avio.c: const AVTextWriter avtextwriter_avio = {
       
       int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
       {
     -+    if (!pwctx || !output_filename || !output_filename[0])
     ++    if (!output_filename || !output_filename[0])
      +        return AVERROR(EINVAL);
      +
           IOWriterContext *ctx;
  3:  9e77a447b8 !  3:  d6734bd718 fftools/textformat: Introduce common header and deduplicate code
     @@ fftools/textformat/tw_avio.c: static void io_put_str(AVTextWriterContext *wctx,
       }
       
       
     -@@ fftools/textformat/tw_avio.c: const AVTextWriter avtextwriter_avio = {
     - 
     - int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
     - {
     --    if (!pwctx || !output_filename || !output_filename[0])
     -+    if (!output_filename || !output_filename[0])
     -         return AVERROR(EINVAL);
     - 
     -     IOWriterContext *ctx;
      
       ## fftools/textformat/tw_buffer.c ##
      @@ fftools/textformat/tw_buffer.c: static void buffer_put_str(AVTextWriterContext *wctx, const char *str)
  4:  a1b358f5c5 =  4:  8289c0ebf8 fftools/tf_internal: Use ac_default_item_name
  5:  4f6870ed4c =  5:  a3fe7abcfe fftools/textformat: Add function avtext_print_integer_flags()
  6:  9c03e66aea =  6:  5b0ac30814 fftools/ffmpeg_filter: Move some declaration to new header file
  7:  eb54476d00 !  7:  5e3225c9df avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()
     @@ doc/APIchanges: The last version increases of all libraries were on 2025-03-28
      +2025-02-xx - xxxxxxxxxx - lavfi 10.10.100 - avfilter.h
      +  Add avfilter_link_get_hw_frames_ctx().
      +
     - 2025-04-07 - 19e9a203b7 - lavu 60.01.100 - dict.h
     -   Add AV_DICT_DEDUP.
     + 2025-04-16 - c818c67991 - libpostproc 59.1.100 - postprocess.h
     +   Deprecate PP_CPU_CAPS_3DNOW.
       
      
       ## libavfilter/avfilter.c ##
  8:  dac301adba !  8:  9881050f93 fftools/resources: Add resource manager files
     @@ ffbuild/common.mak: else
      +
      +# 2) Gzip the minified CSS
      +%.css.min.gz: %.css.min
     -+	$(M)gzip -nc9 $< > $@
     ++	$(M)gzip -nc9 $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) >$@
      +
      +# 3) Convert the gzipped CSS to a .c array
      +%.css.c: %.css.min.gz $(BIN2CEXE)
     -+	$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
     ++	$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@)))
      +
      +# 4) Gzip the HTML file (no minification needed)
      +%.html.gz: TAG = GZIP
     @@ ffbuild/common.mak: else
      +
      +# 5) Convert the gzipped HTML to a .c array
      +%.html.c: %.html.gz $(BIN2CEXE)
     -+	$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
     ++	$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@)))
      +
       clean::
       	$(RM) $(BIN2CEXE) $(CLEANSUFFIXES:%=ffbuild/%)
     @@ ffbuild/common.mak: $(TOOLOBJS): | tools
       
       define RULES
      
     + ## fftools/Makefile ##
     +@@ fftools/Makefile: ifdef HAVE_GNU_WINDRES
     + OBJS-$(1) += fftools/fftoolsres.o
     + endif
     + $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
     +-$$(OBJS-$(1)): | fftools fftools/textformat
     ++$$(OBJS-$(1)): | fftools fftools/textformat fftools/resources
     + $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
     + $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
     + $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
     +@@ fftools/Makefile: all: $(AVPROGS)
     + fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
     + OUTDIRS += fftools
     + OUTDIRS += fftools/textformat
     ++OUTDIRS += fftools/resources
     + 
     + ifdef AVPROGS
     + install: install-progs install-data
     +
       ## fftools/resources/.gitignore (new) ##
      @@
      +*.html.c
  -:  ---------- >  9:  f639a2e9ff fftools/ffmpeg_mux: Make ms_from_ost() inline
  9:  128ae47177 ! 10:  998d6a70c4 fftools/graphprint: Add execution graph printing
     @@ fftools/Makefile: OBJS-ffprobe +=                       \
       
       OBJS-ffplay += fftools/ffplay_renderer.o
       
     +@@ fftools/Makefile: ifdef HAVE_GNU_WINDRES
     + OBJS-$(1) += fftools/fftoolsres.o
     + endif
     + $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
     +-$$(OBJS-$(1)): | fftools fftools/textformat fftools/resources
     ++$$(OBJS-$(1)): | fftools fftools/textformat fftools/resources fftools/graph
     + $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
     + $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
     + $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
     +@@ fftools/Makefile: fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
     + OUTDIRS += fftools
     + OUTDIRS += fftools/textformat
     + OUTDIRS += fftools/resources
     ++OUTDIRS += fftools/graph
     + 
     + ifdef AVPROGS
     + install: install-progs install-data
      
       ## fftools/ffmpeg.c ##
      @@
     @@ fftools/textformat/tf_mermaid.c (new)
      +        AVBPrint css_buf;
      +        const char *diag_directive = mmc->diagram_config->diagram_type == AV_DIAGRAMTYPE_ENTITYRELATIONSHIP ? init_directive_er : init_directive;
      +        char *single_line_css = av_strireplace(mmc->diagram_config->diagram_css, "\n", " ");
     ++        (void)theme_css_er;
      +        ////char *single_line_css = av_strireplace(theme_css_er, "\n", " ");
      +        av_bprint_init(&css_buf, 0, AV_BPRINT_SIZE_UNLIMITED);
      +        av_bprint_escape(&css_buf, single_line_css, "'\\", AV_ESCAPE_MODE_BACKSLASH, AV_ESCAPE_FLAG_STRICT);
     @@ fftools/textformat/tf_mermaid.c (new)
      +
      +            break;
      +        case AV_DIAGRAMTYPE_ENTITYRELATIONSHIP:
     ++
     ++            if (!is_int && str)
      +            {
     -+                char *col_type;
     ++                const char *col_type;
      +
      +                if (key[0] == '_')
      +                    return;
 10:  0f6fd80b25 = 11:  8817dd0991 fftools/graphprint: Now, make it a Killer-Feature!

-- 
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".