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 4016B4E533
	for <ffmpegdev@gitmailbox.com>; Sun,  4 May 2025 02:57:44 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 75D6568B264;
	Sun,  4 May 2025 05:57:40 +0300 (EEST)
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com
 [209.85.216.43])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3AB8C68A5E3
 for <ffmpeg-devel@ffmpeg.org>; Sun,  4 May 2025 05:57:34 +0300 (EEST)
Received: by mail-pj1-f43.google.com with SMTP id
 98e67ed59e1d1-3014678689aso2628701a91.0
 for <ffmpeg-devel@ffmpeg.org>; Sat, 03 May 2025 19:57:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746327452; x=1746932252; 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=JtvJ7DPA3g/C6q09WgRpA3Ij5qwY4iYTs7M5kH8yWfM=;
 b=KTC1pV0IgVrzjXo1Re+pgfWYCqMXQUQ9IhFlu/FOBl1a9vaDAipBCctTHTKOy9MVwd
 zrkUA9kbdznJ3W4167d5NIw82qteBSOoSPNwqToqpYkk5Y/eF/UPbyLw6/nJobuozmhW
 8L9OhYfrgvV7aZJTD8tWLS5UV2UbMlxZKibzyfGboEZZ/45cu3FP4/4augcusORxcT80
 1mQhVs2Gq5pJAxyHqpY0JDJT8+deMpw04Vf96nK8vWMCeIsi9uCOcSdgjc0LgEAaigmE
 XlGBChA6B1ZtbTMVzq/YeJ/o20D3DapN/LGfXCdLS0BDAY18/udqgvBw/Ju4ickrusLH
 R2fA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746327452; x=1746932252;
 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=JtvJ7DPA3g/C6q09WgRpA3Ij5qwY4iYTs7M5kH8yWfM=;
 b=a5k5+1lkmEMkj/BMSVyf+fMnahI+0IRCffbYLJBIgN1niOC2x20DkWTjgm7i9+qmpg
 2RUrwC0pt0pbWjD/ydcYkqqORXIQXUXYfdOsXBG/mZRND283nJjnZX0V+EIGGtoJaJbM
 F5MM3RQdQVD6KG8JV3yj/zlQYhB1w6nMfZx4VdZoufJ8lau0yYDkTG32ZWL6B+980bE/
 M9x0zuz5DoBZvg4bRYgrF7xlNykCCUTk4uUwSJCKnx9DoEbPlNYkxwFcYyD62sNDPyFK
 aW5+5+gYUJJUJHkkXxsAf8+5r0PGQsRk9/F5lFOD0GT23Cithti4UFDAOHzrqj8m9Nh9
 UgLQ==
X-Gm-Message-State: AOJu0YxDPuNhNd9Zi3uzjubtboAJsohPDgnL4NR/idRfF/joCJVR7IxN
 a15mXus04HhKTRjsk9REYmVVOB4uRTfgbrWl/+UfHygUli16MOHnrtbf8w==
X-Gm-Gg: ASbGncuXbdVECEpwGaIwfnM9wlPQnFqoFXGoj0EP74nb2JDWw5rTrFIDN7mOg/AAy7D
 spBYWG1sL518FO88BiWEVsE7jMTxr6pDUoh6IOmrOfCY2BFj6thLhR9YEfAuVXeySb8X+TBjFKA
 7vcD0Ag1PUQQD6j/5Fao/1d65lePnLGsBCNVlINH3BC76oXwQcoKups0TF8tN4uhjCHb5doRuuq
 K9lNtPC+oTPttDvGts7o/9O8CkQAfzBFUWjD9g7jYkZiGUid4W48faphwwJgNRjqytX0aDfAyKT
 yI+p01ZaU83znfXd5gD2IU5U3CpHrc6+Yi4qVc80rYOSSmWn/olv9/AFLNU=
X-Google-Smtp-Source: AGHT+IEZ8y1r+Og2w+KYoaptzUWCnsYhrs5EielC5P2+UpQodnSDtJwfHHYpaLGJSi+bn32apStOoA==
X-Received: by 2002:a17:90b:2550:b0:2ee:f440:53ed with SMTP id
 98e67ed59e1d1-30a61a4c977mr3736105a91.31.1746327452070; 
 Sat, 03 May 2025 19:57:32 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-30a348266ccsm8627799a91.42.2025.05.03.19.57.31
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 03 May 2025 19:57:31 -0700 (PDT)
Message-Id: <pull.66.v10.ffstaging.FFmpeg.1746327446.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v9.ffstaging.FFmpeg.1746260565.ffmpegagent@gmail.com>
References: <pull.66.v9.ffstaging.FFmpeg.1746260565.ffmpegagent@gmail.com>
From: ffmpegagent <ffmpegagent@gmail.com>
Date: Sun, 04 May 2025 02:57:11 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v10 00/15] 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.v10.ffstaging.FFmpeg.1746327446.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)


V4
==

 * Resolved merge conflict
 * Fixed build on MinGW (missing include due to WIN32_LEAN_AND_MEAN being
   defined) (thanks, Michael)


V5
==

 * Applied changes as per review from Stefano (thanks!)
 * Introduced AVTextFormatOptions struct for options in
   avtext_context_open()


V6
==

 * Fix "new warning" in 2nd last commit
 * Squash patches 04 and 05 (they weren't truely independent)
 * Applied changes as per review from Stefano (thanks!)


V7
==

 * Bitten by OOT builds once again (thanks, Michael)


V8
==

 * New commit Remove void (*print_rational) from AVTextFormatter (unused)
 * New commit fftools/textformat: Rename name param to key for API
   consistency
 * print_int Extend existing function instead of adding print_int_flags
 * Fix registered_formatters[] array size
 * avtextwriters.h: Remove unused includes
 * graphprint.c: Make BPrint inits consistent
 * tf_json: Check nesting level for value printing
 * And other review suggestions by Stefano (thanks!)


V9
==

 * Handle cases where no zlib is available (thanks, Michael)
   and provide configure switch (--disable-resource-compression)


V10
===

 * Fix shared build by not using private URL API from avformat (thanks,
   Michael)

.

softworkz (15):
  fftools/textformat: Formatting and whitespace changes
  fftools/textformat: Apply quality improvements
  fftools/textformat: Remove unused print_rational() pointer from
    AVTextFormatter
  fftools/textformat: Rename name param to key for API consistency
  fftools/avtextformat: Re-use BPrint in loop
  fftools/textformat: Introduce AVTextFormatOptions for
    avtext_context_open()
  fftools/textformat: Introduce common header and deduplicate code
  fftools/tf_internal: Use av_default_item_name
  fftools/textformat: Add flags param to function avtext_print_integer()
  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 with build-time
    compression
  fftools/ffmpeg_mux: Make ms_from_ost() inline
  fftools/graphprint: Add execution graph printing
  fftools/graphprint: Now, make it a Killer-Feature!

 configure                          |    5 +
 doc/APIchanges                     |    3 +
 doc/ffmpeg.texi                    |   14 +
 ffbuild/common.mak                 |   43 +-
 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/ffprobe.c                  |   15 +-
 fftools/graph/filelauncher.c       |  205 +++++
 fftools/graph/graphprint.c         | 1153 ++++++++++++++++++++++++++++
 fftools/graph/graphprint.h         |   62 ++
 fftools/resources/.gitignore       |    4 +
 fftools/resources/Makefile         |   13 +
 fftools/resources/graph.css        |  353 +++++++++
 fftools/resources/graph.html       |   86 +++
 fftools/resources/resman.c         |  231 ++++++
 fftools/resources/resman.h         |   50 ++
 fftools/textformat/avtextformat.c  |  242 +++---
 fftools/textformat/avtextformat.h  |   78 +-
 fftools/textformat/avtextwriters.h |   16 +-
 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       |   64 +-
 fftools/textformat/tf_mermaid.c    |  658 ++++++++++++++++
 fftools/textformat/tf_mermaid.h    |   41 +
 fftools/textformat/tf_xml.c        |   68 +-
 fftools/textformat/tw_avio.c       |   18 +-
 fftools/textformat/tw_buffer.c     |    9 +-
 fftools/textformat/tw_stdout.c     |   10 +-
 libavfilter/avfilter.c             |    9 +
 libavfilter/avfilter.h             |   12 +
 38 files changed, 3729 insertions(+), 581 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: 33d0d1c672e8d21f625eeea42444a018dbc616bb
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-66%2Fsoftworkz%2Fsubmit_print_execution_graph-v10
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-66/softworkz/submit_print_execution_graph-v10
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/66

Range-diff vs v9:

  1:  7e8fddd1b8 =  1:  7e8fddd1b8 fftools/textformat: Formatting and whitespace changes
  2:  86ea1c4df5 =  2:  86ea1c4df5 fftools/textformat: Apply quality improvements
  3:  455c13c6ff =  3:  455c13c6ff fftools/textformat: Remove unused print_rational() pointer from AVTextFormatter
  4:  624ac50f29 =  4:  624ac50f29 fftools/textformat: Rename name param to key for API consistency
  5:  26af65e6f2 =  5:  26af65e6f2 fftools/avtextformat: Re-use BPrint in loop
  6:  3aa16bc39f =  6:  3aa16bc39f fftools/textformat: Introduce AVTextFormatOptions for avtext_context_open()
  7:  10c5e71cd1 =  7:  10c5e71cd1 fftools/textformat: Introduce common header and deduplicate code
  8:  4c1471f65c =  8:  4c1471f65c fftools/tf_internal: Use av_default_item_name
  9:  7d28b0f03c =  9:  7d28b0f03c fftools/textformat: Add flags param to function avtext_print_integer()
 10:  a0d38f429a = 10:  a0d38f429a fftools/ffmpeg_filter: Move some declaration to new header file
 11:  53db985728 = 11:  53db985728 avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()
 12:  abc273dd0a ! 12:  2405f535bf fftools/resources: Add resource manager files with build-time compression
     @@ fftools/resources/resman.c (new)
      +#endif
      +
      +#include "resman.h"
     -+#include <libavformat/url.h>
      +#include "fftools/ffmpeg_filter.h"
      +#include "libavutil/avassert.h"
      +#include "libavutil/pixdesc.h"
 13:  690752591e = 13:  a7576bbbfc fftools/ffmpeg_mux: Make ms_from_ost() inline
 14:  adbf4840ef ! 14:  1bdd305940 fftools/graphprint: Add execution graph printing
     @@ fftools/graph/graphprint.c (new)
      +
      +#include "graphprint.h"
      +
     -+#include <libavformat/url.h>
     -+
      +#include "fftools/ffmpeg_filter.h"
      +#include "fftools/ffmpeg_mux.h"
      +
     @@ fftools/graph/graphprint.c (new)
      +
      +static char *get_extension(const char *url)
      +{
     -+    const char *ext;
     -+    URLComponents uc;
     -+    int ret;
     -+    char scratchpad[128];
     ++    const char *dot = NULL;
     ++    const char *sep = NULL;
     ++    const char *end;
      +
      +    if (!url)
     -+        return 0;
     -+
     -+    ret = ff_url_decompose(&uc, url, NULL);
     -+    if (ret < 0)
      +        return NULL;
     -+    for (ext = uc.query; *ext != '.' && ext > uc.path; ext--) {
     ++
     ++    /* Stop at the first query ('?') or fragment ('#') delimiter so they
     ++     * are not considered part of the path. */
     ++    end = strpbrk(url, "?#");
     ++    if (!end)
     ++        end = url + strlen(url);
     ++
     ++    /* Scan the path component only. */
     ++    for (const char *p = url; p < end; p++) {
     ++        if (*p == '.')
     ++            dot = p;
     ++        else if (*p == '/' || *p == '\\')
     ++            sep = p;
      +    }
      +
     -+    if (*ext != '.')
     -+        return 0;
     -+    if (uc.query - ext > sizeof(scratchpad))
     -+        return NULL; //not enough memory in our scratchpad
     -+    av_strlcpy(scratchpad, ext + 1, uc.query - ext);
     ++    /* Validate that we have a proper extension. */
     ++    if (dot && dot != url && (!sep || dot > sep + 1) && (dot + 1) < end) {
     ++        /* Use FFmpeg helper to duplicate the substring. */
     ++        return av_strndup(dot + 1, end - (dot + 1));
     ++    }
      +
     -+    return av_strdup(scratchpad);
     ++    return NULL;
      +}
      +
      +static void print_hwdevicecontext(const GraphPrintContext *gpc, const AVHWDeviceContext *hw_device_context)
 15:  b4ca4db8fd ! 15:  6d7ec02265 fftools/graphprint: Now, make it a Killer-Feature!
     @@ Metadata
       ## Commit message ##
          fftools/graphprint: Now, make it a Killer-Feature!
      
     -    remember this: -sg   <= show-graph
     +    remember this: -sg   <= means Show Graph
      
          Signed-off-by: softworkz <softworkz@hotmail.com>
      

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