diff --git a/apple/aclocal.m4 b/apple/aclocal.m4 index aef2b1c..e988809 100644 --- a/apple/aclocal.m4 +++ b/apple/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, +[m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' +[am__api_version='1.17' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], +m4_if([$1], [1.17], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl +[AM_AUTOMAKE_VERSION([1.17])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# Copyright (C) 2011-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -70,16 +70,18 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_BEFORE([$0], [AC_PROG_AR])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} +: ${ARFLAGS=cr} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], - [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + [am_ar_try='$AR $ARFLAGS libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar @@ -118,7 +120,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +172,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +203,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -333,7 +335,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: + # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -392,7 +394,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -460,7 +462,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -594,7 +596,7 @@ if test -z "$CSCOPE"; then fi AC_SUBST([CSCOPE]) -AC_REQUIRE([AM_SILENT_RULES])dnl +AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. @@ -602,47 +604,9 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. +AC_REQUIRE([_AM_PROG_RM_F]) +AC_REQUIRE([_AM_PROG_XARGS_N]) -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. @@ -675,7 +639,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -696,7 +660,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -718,7 +682,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -753,7 +717,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -796,7 +760,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -830,7 +794,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -859,7 +823,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -906,7 +870,23 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_RM_F +# --------------- +# Check whether 'rm -f' without any arguments works. +# https://bugs.gnu.org/10828 +AC_DEFUN([_AM_PROG_RM_F], +[am__rm_f_notfound= +AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) +AC_SUBST(am__rm_f_notfound) +]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -925,16 +905,169 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# _AM_SLEEP_FRACTIONAL_SECONDS +# ---------------------------- +AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl +AC_CACHE_CHECK([whether sleep supports fractional seconds], + am_cv_sleep_fractional_seconds, [dnl +AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], + [am_cv_sleep_fractional_seconds=no]) +])]) + +# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION +# ----------------------------------- +# Determine the filesystem's resolution for file modification +# timestamps. The coarsest we know of is FAT, with a resolution +# of only two seconds, even with the most recent "exFAT" extensions. +# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one +# nanosecond, matching clock_gettime. However, it is probably not +# possible to delay execution of a shell script for less than one +# millisecond, due to process creation overhead and scheduling +# granularity, so we don't check for anything finer than that. (See below.) +AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl +AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) +AC_CACHE_CHECK([filesystem timestamp resolution], + am_cv_filesystem_timestamp_resolution, [dnl +# Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# ; be careful, easy to get confused.) +if ( + set X `[ls -t conftest.ts[12]]` && + { + test "$[]*" != "X conftest.ts1 conftest.ts2" || + test "$[]*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + _AS_ECHO_UNQUOTED( + ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], + [AS_MESSAGE_LOG_FD]) + AC_MSG_FAILURE([ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment.]) +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$[]2" = conftest.ts3 && + test "$[]3" = conftest.ts2 && + test "$[]4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) +])]) + # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) +[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) +# This check should not be cached, as it may vary across builds of +# different projects. +AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -953,49 +1086,40 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[]*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$[]2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +AC_MSG_RESULT([$am_build_env_is_sane]) +if test "$am_build_env_is_sane" = no; then + AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT([yes]) + # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & +AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl + ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! -fi +]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then @@ -1006,18 +1130,18 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl +# _AM_SILENT_RULES +# ---------------- +# Enable less verbose build rules support. +AC_DEFUN([_AM_SILENT_RULES], +[AM_DEFAULT_VERBOSITY=1 +AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -1025,11 +1149,6 @@ AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. @@ -1048,14 +1167,6 @@ am__doit: else am_cv_make_support_nested_variables=no fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl @@ -1064,9 +1175,33 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls +dnl to AM_SILENT_RULES to change the default value. +AC_CONFIG_COMMANDS_PRE([dnl +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +])dnl ]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or +# empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_REQUIRE([_AM_SILENT_RULES]) +AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1094,7 +1229,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2006-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1113,7 +1248,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1159,15 +1294,19 @@ m4_if([$1], [v7], am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) + if test x$am_uid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) + elif test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - _am_tools=none + AC_MSG_RESULT([no]) + _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) + if test x$gm_gid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) + elif test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none @@ -1244,6 +1383,26 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_XARGS_N +# ---------------- +# Check whether 'xargs -n' works. It should work everywhere, so the fallback +# is not optimized at all as we never expect to use it. +AC_DEFUN([_AM_PROG_XARGS_N], +[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl +AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) +AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl + am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' +])dnl +AC_SUBST(am__xargs_n) +]) + m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff --git a/apple/ar-lib b/apple/ar-lib index c349042..1521987 100755 --- a/apple/ar-lib +++ b/apple/ar-lib @@ -2,9 +2,9 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2019-07-04.01; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 2010-2021 Free Software Foundation, Inc. +# Copyright (C) 2010-2024 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify @@ -105,11 +105,15 @@ case $1 in Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] Members may be specified in a file named with @FILE. + +Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "$me, version $scriptversion" + echo "$me (GNU Automake) $scriptversion" exit $? ;; esac @@ -135,6 +139,10 @@ do AR="$AR $1" shift ;; + -nologo | -NOLOGO) + # We always invoke AR with -nologo, so don't need to add it again. + shift + ;; *) action=$1 shift diff --git a/apple/compile b/apple/compile index df363c8..49b3d05 100755 --- a/apple/compile +++ b/apple/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -143,7 +143,7 @@ func_cl_wrapper () # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "compile $scriptversion" + echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; diff --git a/apple/config.guess b/apple/config.guess index e81d3ae..f6d217a 100755 --- a/apple/config.guess +++ b/apple/config.guess @@ -1,14 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-06-03' +timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -162,6 +165,8 @@ Linux|GNU|GNU/*) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm #else #include /* First heuristic to detect musl libc. */ @@ -169,6 +174,7 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" @@ -437,7 +443,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 @@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -904,7 +910,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; @@ -929,6 +935,9 @@ EOF i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) case $UNAME_MACHINE in x86) @@ -963,11 +972,37 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1033,7 +1068,16 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) @@ -1148,16 +1192,27 @@ EOF ;; x86_64:Linux:*:*) set_cc_for_build + CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI=${LIBC}x32 - fi + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac fi - GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC @@ -1177,7 +1232,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1318,7 +1373,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; @@ -1364,8 +1419,11 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; - x86_64:Haiku:*:*) - GUESS=x86_64-unknown-haiku + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE @@ -1522,6 +1580,9 @@ EOF i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; @@ -1534,6 +1595,9 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac # Do we have a guess based on uname results? diff --git a/apple/config.sub b/apple/config.sub index d74fb6d..2c6a07a 100755 --- a/apple/config.sub +++ b/apple/config.sub @@ -1,14 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-08-14' +timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1020,6 +1021,11 @@ case $cpu-$vendor in ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull @@ -1070,7 +1076,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1121,7 +1127,7 @@ case $cpu-$vendor in xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-*) + arm64-* | aarch64le-*) cpu=aarch64 ;; @@ -1175,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ @@ -1194,50 +1200,29 @@ case $cpu-$vendor in | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ - | loongarch32 | loongarch64 | loongarchx32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ + | nanomips* \ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ @@ -1269,6 +1254,7 @@ case $cpu-$vendor in | ubicom32 \ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ + | vc4 \ | visium \ | w65 \ | wasm32 | wasm64 \ @@ -1280,7 +1266,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1301,11 +1287,12 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then -# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux @@ -1336,6 +1323,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1501,10 +1492,16 @@ case $os in os=eabi ;; *) - os=elf + os= + obj=elf ;; esac ;; + aout* | coff* | elf* | pe*) + # These are machine code file formats, not OSes + obj=$os + os= + ;; *) # No normalization, but not necessarily accepted, that comes below. ;; @@ -1523,12 +1520,15 @@ else # system, and we'll never get to this point. kernel= +obj= case $cpu-$vendor in score-*) - os=elf + os= + obj=elf ;; spu-*) - os=elf + os= + obj=elf ;; *-acorn) os=riscix1.2 @@ -1538,28 +1538,35 @@ case $cpu-$vendor in os=gnu ;; arm*-semi) - os=aout + os= + obj=aout ;; c4x-* | tic4x-*) - os=coff + os= + obj=coff ;; c8051-*) - os=elf + os= + obj=elf ;; clipper-intergraph) os=clix ;; hexagon-*) - os=elf + os= + obj=elf ;; tic54x-*) - os=coff + os= + obj=coff ;; tic55x-*) - os=coff + os= + obj=coff ;; tic6x-*) - os=coff + os= + obj=coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1581,19 +1588,24 @@ case $cpu-$vendor in os=sunos3 ;; m68*-cisco) - os=aout + os= + obj=aout ;; mep-*) - os=elf + os= + obj=elf ;; mips*-cisco) - os=elf + os= + obj=elf ;; - mips*-*) - os=elf + mips*-*|nanomips*-*) + os= + obj=elf ;; or32-*) - os=coff + os= + obj=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 @@ -1602,7 +1614,8 @@ case $cpu-$vendor in os=sunos4.1.1 ;; pru-*) - os=elf + os= + obj=elf ;; *-be) os=beos @@ -1683,10 +1696,12 @@ case $cpu-$vendor in os=uxpv ;; *-rom68k) - os=coff + os= + obj=coff ;; *-*bug) - os=coff + os= + obj=coff ;; *-apple) os=macos @@ -1704,10 +1719,11 @@ esac fi -# Now, validate our (potentially fixed-up) OS. +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | relibc* | uclibc*) + llvm* | musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) @@ -1715,6 +1731,9 @@ case $os in # VxWorks passes extra cpu info in the 4th filed. simlinux | simwindows | spe) ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1723,7 +1742,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1732,11 +1751,11 @@ case $os in | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* | serenity* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ @@ -1748,49 +1767,117 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*) + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* | mlibc* | cos* | mbr* | ironclad* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; + # This refers to builds using the UEFI calling convention + # (which depends on the architecture) and PE file format. + # Note that this is both a different calling convention and + # different file format than that of GNU-EFI + # (x86_64-w64-mingw32). + uefi) + ;; none) ;; + kernel* | msvc* ) + # Restricted further below + ;; + '') + if test x"$obj" = x + then + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 + fi + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- ) + ;; + uclinux-uclibc*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) ;; - uclinux-uclibc* ) + windows*-msvc*-) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 ;; - nto-qnx*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - os2-emx) + kfreebsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) ;; - *-eabi* | *-gnueabi*) + *-eabi*- | *-gnueabi*-) ;; - -*) + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1873,7 +1960,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/apple/depcomp b/apple/depcomp index 715e343..1f0aa97 100755 --- a/apple/depcomp +++ b/apple/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,11 +47,13 @@ Environment variables: libtool Whether libtool is used (yes/no). Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "depcomp $scriptversion" + echo "depcomp (GNU Automake) $scriptversion" exit $? ;; esac @@ -113,7 +115,6 @@ nl=' # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then @@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" -# Avoid interferences from the environment. +# Avoid interference from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We @@ -198,8 +199,8 @@ gcc3) ;; gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. +## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: diff --git a/apple/install-sh b/apple/install-sh index ec298b5..b1d7a6f 100755 --- a/apple/install-sh +++ b/apple/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2024-06-19.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -124,9 +124,9 @@ it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ -" +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." while test $# -ne 0; do case $1 in @@ -170,7 +170,7 @@ while test $# -ne 0; do -T) is_target_a_directory=never;; - --version) echo "$0 $scriptversion"; exit $?;; + --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; --) shift break;; @@ -345,7 +345,7 @@ do ' 0 # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directly in world-writable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && @@ -353,7 +353,7 @@ do exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. + # Check for POSIX incompatibility with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. diff --git a/apple/missing b/apple/missing index 1fe1611..7e7d78e 100755 --- a/apple/missing +++ b/apple/missing @@ -1,9 +1,11 @@ #! /bin/sh -# Common wrapper for a few potentially missing GNU programs. +# Common wrapper for a few potentially missing GNU and other programs. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-07.14; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -54,18 +56,20 @@ Options: -v, --version output version information and exit Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man +aclocal autoconf autogen autoheader autom4te automake autoreconf +bison flex help2man lex makeinfo perl yacc Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. -Send bug reports to ." +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" + echo "missing (GNU Automake) $scriptversion" exit $? ;; @@ -108,7 +112,7 @@ gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in - aclocal|automake) + aclocal|automake|autoreconf) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" @@ -123,6 +127,9 @@ program_details () echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; + *) + : + ;; esac } @@ -137,48 +144,55 @@ give_advice () printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + autoheader_deps="'acconfig.h'" + automake_deps="'Makefile.am'" + aclocal_deps="'acinclude.m4'" case $normalized_program in + aclocal*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$configure_deps." + ;; autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' + echo "You should only need it if you modified $configure_deps." + ;; + autogen*) + echo "You should only need it if you modified a '.def' or '.tpl' file." + echo "You may want to install the GNU AutoGen package:" + echo "<$gnu_software_URL/autogen/>" ;; autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" + echo "You should only need it if you modified $autoheader_deps or" echo "$configure_deps." - program_details 'autoheader' ;; automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" + echo "You should only need it if you modified $automake_deps or" echo "$configure_deps." - program_details 'aclocal' ;; - autom4te*) + autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' + ;; + autoreconf*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$automake_deps or $autoheader_deps or $automake_deps or" + echo "$configure_deps." ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." @@ -189,6 +203,12 @@ give_advice () echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; + perl*) + echo "You should only need it to run GNU Autoconf, GNU Automake, " + echo " assorted other tools, or if you modified a Perl source file." + echo "You may want to install the Perl 5 language interpreter:" + echo "<$perl_URL>" + ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" @@ -197,6 +217,7 @@ give_advice () echo "case some other package contains this missing '$1' program." ;; esac + program_details "$normalized_program" } give_advice "$1" | sed -e '1s/^/WARNING: /' \ diff --git a/apple/src/Makefile.in b/apple/src/Makefile.in index b7580fb..44d15d0 100644 --- a/apple/src/Makefile.in +++ b/apple/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -71,6 +71,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -124,10 +126,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @@ -359,8 +360,10 @@ ac_ct_OBJC = @ac_ct_OBJC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -537,15 +540,13 @@ uninstall-libLTLIBRARIES: done clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + -$(am__rm_f) $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } + echo rm -f $${locs}; \ + $(am__rm_f) $${locs} libffmpegkit.la: $(libffmpegkit_la_OBJECTS) $(libffmpegkit_la_DEPENDENCIES) $(EXTRA_libffmpegkit_la_DEPENDENCIES) $(AM_V_OBJCLD)$(libffmpegkit_la_LINK) -rpath $(libdir) $(libffmpegkit_la_OBJECTS) $(libffmpegkit_la_LIBADD) $(LIBS) @@ -590,7 +591,7 @@ distclean-compile: $(am__depfiles_remade): @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + @: >>$@ am--depfiles: $(am__depfiles_remade) @@ -1001,8 +1002,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1013,7 +1014,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/libffmpegkit_la-AbstractSession.Plo + -rm -f ./$(DEPDIR)/libffmpegkit_la-AbstractSession.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-ArchDetect.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-AtomicLong.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-Chapter.Plo @@ -1089,7 +1090,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/libffmpegkit_la-AbstractSession.Plo + -rm -f ./$(DEPDIR)/libffmpegkit_la-AbstractSession.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-ArchDetect.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-AtomicLong.Plo -rm -f ./$(DEPDIR)/libffmpegkit_la-Chapter.Plo @@ -1162,3 +1163,10 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/Info.plist b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/Info.plist new file mode 100644 index 0000000..d7c7e34 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/Info.plist @@ -0,0 +1,27 @@ + + + + + AvailableLibraries + + + BinaryPath + ffmpegkit.framework/ffmpegkit + LibraryIdentifier + ios-arm64 + LibraryPath + ffmpegkit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AbstractSession.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AbstractSession.h new file mode 100644 index 0000000..e44ea5e --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AbstractSession.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_ABSTRACT_SESSION_H +#define FFMPEG_KIT_ABSTRACT_SESSION_H + +#import +#import "Session.h" + +/** + * Defines how long default "getAll" methods wait, in milliseconds. + */ +extern int const AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit; + +/** + * Abstract session implementation which includes common features shared by FFmpeg, + * FFprobe and MediaInformation sessions. + */ +@interface AbstractSession : NSObject + +/** + * Creates a new abstract session. + * + * @param arguments command arguments + * @param logCallback session specific log callback + * @param logRedirectionStrategy session specific log redirection strategy + */ +- (instancetype)init:(NSArray*)arguments withLogCallback:(LogCallback)logCallback withLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy; + +/** + * Waits for all asynchronous messages to be transmitted until the given timeout. + * + * @param timeout wait timeout in milliseconds + */ +- (void)waitForAsynchronousMessagesInTransmit:(int)timeout; + +@end + +#endif // FFMPEG_KIT_ABSTRACT_SESSION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ArchDetect.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ArchDetect.h new file mode 100644 index 0000000..25a6533 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ArchDetect.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_ARCH_DETECT_H +#define FFMPEG_KIT_ARCH_DETECT_H + +#import + +/** + * Detects the running architecture. + */ +@interface ArchDetect : NSObject + +/** + * Returns architecture name of the cpu running. + * + * @return architecture name of the cpu running + */ ++ (NSString*)getCpuArch; + +/** + * Returns architecture name loaded. + * + * @return architecture name loaded + */ ++ (NSString*)getArch; + +@end + +#endif // FFMPEG_KIT_ARCH_DETECT_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AtomicLong.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AtomicLong.h new file mode 100644 index 0000000..5acd5ae --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/AtomicLong.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_ATOMIC_LONG_H +#define FFMPEG_KIT_ATOMIC_LONG_H + +#import + +/** + * Represents an atomic long data type. + */ +@interface AtomicLong : NSObject + +- (instancetype)initWithValue:(long)value; + +- (long)incrementAndGet; + +- (long)getAndIncrement; + +@end + +#endif // FFMPEG_KIT_ATOMIC_LONG_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Chapter.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Chapter.h new file mode 100644 index 0000000..7cf1194 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Chapter.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_CHAPTER_H +#define FFMPEG_KIT_CHAPTER_H + +#import + +extern NSString* const ChapterKeyId; +extern NSString* const ChapterKeyTimeBase; +extern NSString* const ChapterKeyStart; +extern NSString* const ChapterKeyStartTime; +extern NSString* const ChapterKeyEnd; +extern NSString* const ChapterKeyEndTime; +extern NSString* const ChapterKeyTags; + +/** + * Chapter class. + */ +@interface Chapter : NSObject + +- (instancetype)init:(NSDictionary*)chapterDictionary; + +- (NSNumber*)getId; + +- (NSString*)getTimeBase; + +- (NSNumber*)getStart; + +- (NSString*)getStartTime; + +- (NSNumber*)getEnd; + +- (NSString*)getEndTime; + +- (NSDictionary*)getTags; + +/** + * Returns the chapter property associated with the key. + * + * @return chapter property as string or nil if the key is not found + */ +- (NSString*)getStringProperty:(NSString*)key; + +/** + * Returns the chapter property associated with the key. + * + * @return chapter property as number or nil if the key is not found + */ +- (NSNumber*)getNumberProperty:(NSString*)key; + +/** + * Returns the chapter property associated with the key. + * + * @return chapter property as id or nil if the key is not found +*/ +- (id)getProperty:(NSString*)key; + +/** + * Returns all chapter properties defined. + * + * @return all chapter properties in a dictionary or nil if no properties are defined +*/ +- (NSDictionary*)getAllProperties; + +@end + +#endif // FFMPEG_KIT_CHAPTER_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKit.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKit.h new file mode 100644 index 0000000..9ae4993 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKit.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_H +#define FFMPEG_KIT_H + +#import +#import +#import +#import "LogCallback.h" +#import "FFmpegSession.h" +#import "StatisticsCallback.h" + +/** + *

Main class to run FFmpeg commands. Supports executing commands both synchronously and + * asynchronously. + *

+ * FFmpegSession *session = [FFmpegKit execute:@"-i file1.mp4 -c:v libxvid file1.avi"];
+ *
+ * FFmpegSession *asyncSession = [FFmpegKit executeAsync:@"-i file1.mp4 -c:v libxvid file1.avi" withCompleteCallback:completeCallback];
+ * 
+ *

Provides overloaded execute methods to define session specific callbacks. + *

+ * FFmpegSession *asyncSession = [FFmpegKit executeAsync:@"-i file1.mp4 -c:v libxvid file1.avi" withCompleteCallback:completeCallback withLogCallback:logCallback withStatisticsCallback:statisticsCallback];
+ * 
+ */ +@interface FFmpegKit : NSObject + +/** + *

Synchronously executes FFmpeg with arguments provided. + * + * @param arguments FFmpeg command options/arguments as string array + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeWithArguments:(NSArray*)arguments; + +/** + *

Starts an asynchronous FFmpeg execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFmpeg command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback; + +/** + *

Starts an asynchronous FFmpeg execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFmpeg command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @param logCallback callback that will receive logs + * @param statisticsCallback callback that will receive statistics + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback; + +/** + *

Starts an asynchronous FFmpeg execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFmpeg command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFmpeg execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFmpeg command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @param logCallback callback that will receive logs + * @param statisticsCallback callback that will receive statistics + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Synchronously executes FFmpeg command provided. Space character is used to split command + * into arguments. You can use single or double quote characters to specify arguments inside + * your command. + * + * @param command FFmpeg command + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)execute:(NSString*)command; + +/** + *

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFmpeg command + * @param completeCallback callback that will be called when the execution has completed + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeAsync:(NSString*)command withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback; + +/** + *

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFmpeg command + * @param completeCallback callback that will be called when the execution has completed + * @param logCallback callback that will receive logs + * @param statisticsCallback callback that will receive statistics + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeAsync:(NSString*)command withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback; + +/** + *

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFmpeg command + * @param completeCallback callback that will be called when the execution has completed + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeAsync:(NSString*)command withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFmpeg command + * @param completeCallback callback that will be called when the execution has completed + * @param logCallback callback that will receive logs + * @param statisticsCallback callback that will receive statistics + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFmpeg session created for this execution + */ ++ (FFmpegSession*)executeAsync:(NSString*)command withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Cancels all running sessions. + * + *

This method does not wait for termination to complete and returns immediately. + */ ++ (void)cancel; + +/** + *

Cancels the session specified with sessionId. + * + *

This method does not wait for termination to complete and returns immediately. + * + * @param sessionId id of the session that will be cancelled + */ ++ (void)cancel:(long)sessionId; + +/** + *

Lists all FFmpeg sessions in the session history. + * + * @return all FFmpeg sessions in the session history + */ ++ (NSArray*)listSessions; + +@end + +#endif // FFMPEG_KIT_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKitConfig.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKitConfig.h new file mode 100644 index 0000000..acfad88 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegKitConfig.h @@ -0,0 +1,462 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_CONFIG_H +#define FFMPEG_KIT_CONFIG_H + +#import +#import +#import +#import +#import "FFmpegSession.h" +#import "FFprobeSession.h" +#import "LogCallback.h" +#import "MediaInformationSession.h" +#import "StatisticsCallback.h" + +/** Global library version */ +extern NSString* const FFmpegKitVersion; + +typedef NS_ENUM(NSUInteger, Signal) { + SignalInt = 2, + SignalQuit = 3, + SignalPipe = 13, + SignalTerm = 15, + SignalXcpu = 24 +}; + +/** + *

Configuration class of FFmpegKit library. Allows customizing the global library + * options. Provides helper methods to support additional resources. + */ +@interface FFmpegKitConfig : NSObject + +/** + *

Enables log and statistics redirection. + * + *

When redirection is enabled FFmpeg/FFprobe logs are redirected to NSLog and sessions + * collect log and statistics entries for the executions. It is possible to define global or + * session specific log/statistics callbacks as well. + * + *

Note that redirection is enabled by default. If you do not want to use its functionality + * please use disableRedirection method to disable it. + */ ++ (void)enableRedirection; + +/** + *

Disables log and statistics redirection. + * + *

When redirection is disabled logs are printed to stderr, all logs and statistics + * callbacks are disabled and FFprobe's getMediaInformation methods + * do not work. + */ ++ (void)disableRedirection; + +/** + *

Sets and overrides fontconfig configuration directory. + * + * @param path directory that contains fontconfig configuration (fonts.conf) + * @return zero on success, non-zero on error + */ ++ (int)setFontconfigConfigurationPath:(NSString*)path; + +/** + *

Registers the fonts inside the given path, so they become available to use in FFmpeg + * filters. + * + *

Note that you need to build FFmpegKit with fontconfig + * enabled or use a prebuilt package with fontconfig inside to be able to use + * fonts in FFmpeg. + * + * @param fontDirectoryPath directory that contains fonts (.ttf and .otf files) + * @param fontNameMapping custom font name mappings, useful to access your fonts with more + * friendly names + */ ++ (void)setFontDirectory:(NSString*)fontDirectoryPath with:(NSDictionary*)fontNameMapping; + +/** + *

Registers the fonts inside the given array of font directories, so they become available + * to use in FFmpeg filters. + * + *

Note that you need to build FFmpegKit with fontconfig + * enabled or use a prebuilt package with fontconfig inside to be able to use + * fonts in FFmpeg. + * + * @param fontDirectoryList array of directories that contain fonts (.ttf and .otf files) + * @param fontNameMapping custom font name mappings, useful to access your fonts with more + * friendly names + */ ++ (void)setFontDirectoryList:(NSArray*)fontDirectoryList with:(NSDictionary*)fontNameMapping; + +/** + *

Creates a new named pipe to use in FFmpeg operations. + * + *

Please note that creator is responsible of closing created pipes. + * + * @return the full path of the named pipe + */ ++ (NSString*)registerNewFFmpegPipe; + +/** + *

Closes a previously created FFmpeg pipe. + * + * @param ffmpegPipePath full path of the FFmpeg pipe + */ ++ (void)closeFFmpegPipe:(NSString*)ffmpegPipePath; + +/** + *

Returns the version of FFmpeg bundled within FFmpegKit library. + * + * @return the version of FFmpeg + */ ++ (NSString*)getFFmpegVersion; + +/** + * Returns FFmpegKit library version. + * + * @return FFmpegKit version + */ ++ (NSString*)getVersion; + +/** + *

Returns whether FFmpegKit release is a Long Term Release or not. + * + * @return true/yes or false/no + */ ++ (int)isLTSBuild; + +/** + * Returns FFmpegKit library build date. + * + * @return FFmpegKit library build date + */ ++ (NSString*)getBuildDate; + +/** + *

Sets an environment variable. + * + * @param variableName environment variable name + * @param variableValue environment variable value + * @return zero on success, non-zero on error + */ ++ (int)setEnvironmentVariable:(NSString*)variableName value:(NSString*)variableValue; + +/** + *

Registers a new ignored signal. Ignored signals are not handled by FFmpegKit + * library. + * + * @param signal signal to be ignored + */ ++ (void)ignoreSignal:(Signal)signal; + +/** + *

Synchronously executes the FFmpeg session provided. + * + * @param ffmpegSession FFmpeg session which includes command options/arguments + */ ++ (void)ffmpegExecute:(FFmpegSession*)ffmpegSession; + +/** + *

Synchronously executes the FFprobe session provided. + * + * @param ffprobeSession FFprobe session which includes command options/arguments + */ ++ (void)ffprobeExecute:(FFprobeSession*)ffprobeSession; + +/** + *

Synchronously executes the media information session provided. + * + * @param mediaInformationSession media information session which includes command options/arguments + * @param waitTimeout max time to wait until media information is transmitted + */ ++ (void)getMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout; + +/** + *

Starts an asynchronous FFmpeg execution for the given session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param ffmpegSession FFmpeg session which includes command options/arguments + */ ++ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession; + +/** + *

Starts an asynchronous FFmpeg execution for the given session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. + * + * @param ffmpegSession FFmpeg session which includes command options/arguments + * @param queue dispatch queue that will be used to run this asynchronous operation + */ ++ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFprobe execution for the given session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param ffprobeSession FFprobe session which includes command options/arguments + */ ++ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession; + +/** + *

Starts an asynchronous FFprobe execution for the given session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param ffprobeSession FFprobe session which includes command options/arguments + * @param queue dispatch queue that will be used to run this asynchronous operation + */ ++ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFprobe execution for the given media information session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param mediaInformationSession media information session which includes command options/arguments + * @param waitTimeout max time to wait until media information is transmitted + */ ++ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout; + +/** + *

Starts an asynchronous FFprobe execution for the given media information session. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param mediaInformationSession media information session which includes command options/arguments + * @param queue dispatch queue that will be used to run this asynchronous operation + * @param waitTimeout max time to wait until media information is transmitted + */ ++ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout; + +/** + *

Sets a global log callback to redirect FFmpeg/FFprobe logs. + * + * @param logCallback log callback or nil to disable a previously defined log callback + */ ++ (void)enableLogCallback:(LogCallback)logCallback; + +/** + *

Sets a global statistics callback to redirect FFmpeg statistics. + * + * @param statisticsCallback statistics callback or nil to disable a previously defined statistics callback + */ ++ (void)enableStatisticsCallback:(StatisticsCallback)statisticsCallback; + +/** + *

Sets a global FFmpegSessionCompleteCallback to receive execution results for FFmpeg sessions. + * + * @param ffmpegSessionCompleteCallback complete callback or nil to disable a previously defined callback + */ ++ (void)enableFFmpegSessionCompleteCallback:(FFmpegSessionCompleteCallback)ffmpegSessionCompleteCallback; + +/** + *

Returns the global FFmpegSessionCompleteCallback set. + * + * @return global FFmpegSessionCompleteCallback or nil if it is not set + */ ++ (FFmpegSessionCompleteCallback)getFFmpegSessionCompleteCallback; + +/** + *

Sets a global FFprobeSessionCompleteCallback to receive execution results for FFprobe sessions. + * + * @param ffprobeSessionCompleteCallback complete callback or nil to disable a previously defined callback + */ ++ (void)enableFFprobeSessionCompleteCallback:(FFprobeSessionCompleteCallback)ffprobeSessionCompleteCallback; + +/** + *

Returns the global FFprobeSessionCompleteCallback set. + * + * @return global FFprobeSessionCompleteCallback or nil if it is not set + */ ++ (FFprobeSessionCompleteCallback)getFFprobeSessionCompleteCallback; + +/** + *

Sets a global MediaInformationSessionCompleteCallback to receive execution results for MediaInformation sessions. + * + * @param mediaInformationSessionCompleteCallback complete callback or nil to disable a previously defined + * callback + */ ++ (void)enableMediaInformationSessionCompleteCallback:(MediaInformationSessionCompleteCallback)mediaInformationSessionCompleteCallback; + +/** + *

Returns the global MediaInformationSessionCompleteCallback set. + * + * @return global MediaInformationSessionCompleteCallback or nil if it is not set + */ ++ (MediaInformationSessionCompleteCallback)getMediaInformationSessionCompleteCallback; + +/** + * Returns the current log level. + * + * @return current log level + */ ++ (int)getLogLevel; + +/** + * Sets the log level. + * + * @param level new log level + */ ++ (void)setLogLevel:(int)level; + +/** + * Converts int log level to string. + * + * @param level value + * @return string value + */ ++ (NSString*)logLevelToString:(int)level; + +/** + * Returns the session history size. + * + * @return session history size + */ ++ (int)getSessionHistorySize; + +/** + * Sets the session history size. + * + * @param sessionHistorySize session history size, should be smaller than 1000 + */ ++ (void)setSessionHistorySize:(int)sessionHistorySize; + +/** + * Returns the session specified with sessionId from the session history. + * + * @param sessionId session identifier + * @return session specified with sessionId or nil if it is not found in the history + */ ++ (id)getSession:(long)sessionId; + +/** + * Returns the last session created from the session history. + * + * @return the last session created or nil if session history is empty + */ ++ (id)getLastSession; + +/** + * Returns the last session completed from the session history. + * + * @return the last session completed. If there are no completed sessions in the history this + * method will return nil + */ ++ (id)getLastCompletedSession; + +/** + *

Returns all sessions in the session history. + * + * @return all sessions in the session history + */ ++ (NSArray*)getSessions; + +/** + *

Clears all, including ongoing, sessions in the session history. + *

Note that callbacks cannot be triggered for deleted sessions. + */ ++ (void)clearSessions; + +/** + *

Returns all FFmpeg sessions in the session history. + * + * @return all FFmpeg sessions in the session history + */ ++ (NSArray*)getFFmpegSessions; + +/** + *

Returns all FFprobe sessions in the session history. + * + * @return all FFprobe sessions in the session history + */ ++ (NSArray*)getFFprobeSessions; + +/** + *

Returns all MediaInformation sessions in the session history. + * + * @return all MediaInformation sessions in the session history + */ ++ (NSArray*)getMediaInformationSessions; + +/** + *

Returns sessions that have the given state. + * + * @return sessions that have the given state from the session history + */ ++ (NSArray*)getSessionsByState:(SessionState)state; + +/** + * Returns the active log redirection strategy. + * + * @return log redirection strategy + */ ++ (LogRedirectionStrategy)getLogRedirectionStrategy; + +/** + *

Sets the log redirection strategy + * + * @param logRedirectionStrategy log redirection strategy + */ ++ (void)setLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy; + +/** + *

Returns the number of async messages that are not transmitted to the callbacks for + * this session. + * + * @param sessionId id of the session + * @return number of async messages that are not transmitted to the callbacks for this session + */ ++ (int)messagesInTransmit:(long)sessionId; + +/** + * Converts session state to string. + * + * @param state session state + * @return string value + */ ++ (NSString*)sessionStateToString:(SessionState)state; + +/** + *

Parses the given command into arguments. Uses space character to split the arguments. + * Supports single and double quote characters. + * + * @param command string command + * @return array of arguments + */ ++ (NSArray*)parseArguments:(NSString*)command; + +/** + *

Concatenates arguments into a string adding a space character between two arguments. + * + * @param arguments arguments + * @return concatenated string containing all arguments + */ ++ (NSString*)argumentsToString:(NSArray*)arguments; + +@end + +#endif // FFMPEG_KIT_CONFIG_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSession.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSession.h new file mode 100644 index 0000000..3523410 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSession.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2021-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_FFMPEG_SESSION_H +#define FFMPEG_KIT_FFMPEG_SESSION_H + +#import +#import "AbstractSession.h" +#import "StatisticsCallback.h" +#import "FFmpegSessionCompleteCallback.h" + +/** + *

An FFmpeg session. + */ +@interface FFmpegSession : AbstractSession + +/** + * Builds a new FFmpeg session. + * + * @param arguments command arguments + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments; + +/** + * Builds a new FFmpeg session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback; + +/** + * Builds a new FFmpeg session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @param logCallback session specific log callback + * @param statisticsCallback session specific statistics callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback; + +/** + * Builds a new FFmpeg session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @param logCallback session specific log callback + * @param statisticsCallback session specific statistics callback + * @param logRedirectionStrategy session specific log redirection strategy + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFmpegSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback withLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy; + +/** + * Returns the session specific statistics callback. + * + * @return session specific statistics callback + */ +- (StatisticsCallback)getStatisticsCallback; + +/** + * Returns the session specific complete callback. + * + * @return session specific complete callback + */ +- (FFmpegSessionCompleteCallback)getCompleteCallback; + +/** + * Returns all statistics entries generated for this session. If there are asynchronous + * messages that are not delivered yet, this method waits for them until the given timeout. + * + * @param waitTimeout wait timeout for asynchronous messages in milliseconds + * @return list of statistics entries generated for this session + */ +- (NSArray*)getAllStatisticsWithTimeout:(int)waitTimeout; + +/** + * Returns all statistics entries generated for this session. If there are asynchronous + * messages that are not delivered yet, this method waits for them until + * AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit expires. + * + * @return list of statistics entries generated for this session + */ +- (NSArray*)getAllStatistics; + +/** + * Returns all statistics entries delivered for this session. Note that if there are + * asynchronous messages that are not delivered yet, this method will not wait for + * them and will return immediately. + * + * @return list of statistics entries received for this session + */ +- (NSArray*)getStatistics; + +/** + * Returns the last received statistics entry. + * + * @return the last received statistics entry or nil if there are not any statistics entries + * received + */ +- (Statistics*)getLastReceivedStatistics; + +/** + * Adds a new statistics entry for this session. It is invoked internally by FFmpegKit library methods. + * Must not be used by user applications. + * + * @param statistics statistics entry + */ +- (void)addStatistics:(Statistics*)statistics; + +@end + +#endif // FFMPEG_KIT_FFMPEG_SESSION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSessionCompleteCallback.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSessionCompleteCallback.h new file mode 100644 index 0000000..b874966 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFmpegSessionCompleteCallback.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_FFMPEG_SESSION_COMPLETE_CALLBACK_H +#define FFMPEG_KIT_FFMPEG_SESSION_COMPLETE_CALLBACK_H + +@class FFmpegSession; + +/** + *

Callback function that is invoked when an asynchronous FFmpeg session has ended. + *

Session has either SessionStateCompleted or SessionStateFailed state when + * the callback is invoked. + *

If it has SessionStateCompleted state, ReturnCode should be checked to + * see the execution result. + *

If getState returns SessionStateFailed then + * getFailStackTrace should be used to get the failure reason. + *

+ *  switch ([session getState]) {
+ *      case SessionStateCompleted:
+ *          ReturnCode *returnCode = [session getReturnCode];
+ *          break;
+ *      case SessionStateFailed:
+ *          NSString *failStackTrace = [session getFailStackTrace];
+ *          break;
+ *  }
+ * 
+ * + * @param session session of the completed execution + */ +typedef void (^FFmpegSessionCompleteCallback)(FFmpegSession* session); + +#import "FFmpegSession.h" + +#endif // FFMPEG_KIT_FFMPEG_SESSION_COMPLETE_CALLBACK_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeKit.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeKit.h new file mode 100644 index 0000000..94ae47e --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeKit.h @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2020-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFPROBE_KIT_H +#define FFPROBE_KIT_H + +#import +#import +#import +#import "FFprobeSession.h" +#import "MediaInformationJsonParser.h" + +/** + *

Main class to run FFprobe commands. Supports executing commands both synchronously and + * asynchronously. + *

+ * FFprobeSession *session = [FFprobeKit execute:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4"];
+ *
+ * FFprobeSession *asyncSession = [FFprobeKit executeAsync:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4" withCompleteCallback:completeCallback];
+ * 
+ *

Provides overloaded execute methods to define session specific callbacks. + *

+ * FFprobeSession *session = [FFprobeKit executeAsync:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4" withCompleteCallback:completeCallback withLogCallback:logCallback];
+ * 
+ *

It can extract media information for a file or a url, using getMediaInformation method. + *

+ *      MediaInformationSession *session = [FFprobeKit getMediaInformation:@"file1.mp4"];
+ * 
+ */ +@interface FFprobeKit : NSObject + +/** + *

Synchronously executes FFprobe with arguments provided. + * + * @param arguments FFprobe command options/arguments as string array + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeWithArguments:(NSArray*)arguments; + +/** + *

Starts an asynchronous FFprobe execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFprobe command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback; + +/** + *

Starts an asynchronous FFprobe execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFprobe command options/arguments as string array + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback; + +/** + *

Starts an asynchronous FFprobe execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFprobe command options/arguments as string array + * @param completeCallback callback that will be called when the execution has completed + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFprobe execution with arguments provided. + * + *

Note that this method returns immediately and does not wait the execution to complete. + * You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFprobe command options/arguments as string array + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Synchronously executes FFprobe command provided. Space character is used to split command + * into arguments. You can use single or double quote characters to specify arguments inside + * your command. + * + * @param command FFprobe command + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)execute:(NSString*)command; + +/** + *

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFprobe command + * @param completeCallback callback that will be called when the execution has completed + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeAsync:(NSString*)command withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback; + +/** + *

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFprobe command + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeAsync:(NSString*)command withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback; + +/** + *

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFprobe command + * @param completeCallback callback that will be called when the execution has completed + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeAsync:(NSString*)command withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command + * into arguments. You can use single or double quote characters to specify arguments inside your command. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * FFprobeSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFprobe command + * @param completeCallback callback that will be called when the execution has completed + * @param logCallback callback that will receive logs + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return FFprobe session created for this execution + */ ++ (FFprobeSession*)executeAsync:(NSString*)command withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Extracts media information for the file specified with path. + * + * @param path path or uri of a media file + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformation:(NSString*)path; + +/** + *

Extracts media information for the file specified with path. + * + * @param path path or uri of a media file + * @param waitTimeout max time to wait until media information is transmitted + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformation:(NSString*)path withTimeout:(int)waitTimeout; + +/** + *

Starts an asynchronous FFprobe execution to extract the media information for the specified file. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param path path or uri of a media file + * @param completeCallback callback that will be called when the execution has completed + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback; + +/** + *

Starts an asynchronous FFprobe execution to extract the media information for the specified file. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param path path or uri of a media file + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @param waitTimeout max time to wait until media information is transmitted + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withTimeout:(int)waitTimeout; + +/** + *

Starts an asynchronous FFprobe execution to extract the media information for the specified file. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param path path or uri of a media file + * @param completeCallback callback that will be called when the execution has completed + * @param queue dispatch queue that will be used to run this asynchronous operation + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback onDispatchQueue:(dispatch_queue_t)queue; + +/** + *

Starts an asynchronous FFprobe execution to extract the media information for the specified file. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param path path or uri of a media file + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @param queue dispatch queue that will be used to run this asynchronous operation + * @param waitTimeout max time to wait until media information is transmitted + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout; + +/** + *

Extracts media information using the command provided asynchronously. + * + * @param command FFprobe command that prints media information for a file in JSON format + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationFromCommand:(NSString*)command; + +/** + *

Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to + * this method must generate the output in JSON format in order to successfully extract media information from it. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param command FFprobe command that prints media information for a file in JSON format + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @param queue dispatch queue that will be used to run this asynchronous operation + * @param waitTimeout max time to wait until media information is transmitted + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationFromCommandAsync:(NSString*)command withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout; + +/** + *

Starts an asynchronous FFprobe execution to extract media information using command arguments. The command + * passed to this method must generate the output in JSON format in order to successfully extract media information + * from it. + * + *

Note that this method returns immediately and does not wait the execution to complete. You must use an + * MediaInformationSessionCompleteCallback if you want to be notified about the result. + * + * @param arguments FFprobe command that prints media information for a file in JSON format + * @param completeCallback callback that will be notified when execution has completed + * @param logCallback callback that will receive logs + * @param queue dispatch queue that will be used to run this asynchronous operation + * @param waitTimeout max time to wait until media information is transmitted + * @return media information session created for this execution + */ ++ (MediaInformationSession*)getMediaInformationFromCommandArgumentsAsync:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback onDispatchQueue:(dispatch_queue_t)queue withTimeout:(int)waitTimeout; + +/** + *

Lists all FFprobe sessions in the session history. + * + * @return all FFprobe sessions in the session history + */ ++ (NSArray*)listFFprobeSessions; + +/** + *

Lists all MediaInformation sessions in the session history. + * + * @return all MediaInformation sessions in the session history + */ ++ (NSArray*)listMediaInformationSessions; + +@end + +#endif // FFPROBE_KIT_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSession.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSession.h new file mode 100644 index 0000000..490e7f2 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSession.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2021-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_FFPROBE_SESSION_H +#define FFMPEG_KIT_FFPROBE_SESSION_H + +#import +#import "AbstractSession.h" +#import "FFprobeSessionCompleteCallback.h" + +/** + *

An FFprobe session. + */ +@interface FFprobeSession : AbstractSession + +/** + * Builds a new FFprobe session. + * + * @param arguments command arguments + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments; + +/** + * Builds a new FFprobe session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback; + +/** + * Builds a new FFprobe session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @param logCallback session specific log callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback; + +/** + * Builds a new FFprobe session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @param logCallback session specific log callback + * @param logRedirectionStrategy session specific log redirection strategy + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(FFprobeSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback withLogRedirectionStrategy:(LogRedirectionStrategy)logRedirectionStrategy; + +/** + * Returns the session specific complete callback. + * + * @return session specific complete callback + */ +- (FFprobeSessionCompleteCallback)getCompleteCallback; + +@end + +#endif // FFMPEG_KIT_FFPROBE_SESSION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSessionCompleteCallback.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSessionCompleteCallback.h new file mode 100644 index 0000000..6189634 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/FFprobeSessionCompleteCallback.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_FFPROBE_SESSION_COMPLETE_CALLBACK_H +#define FFMPEG_KIT_FFPROBE_SESSION_COMPLETE_CALLBACK_H + +@class FFprobeSession; + +/** + *

Callback function that is invoked when an asynchronous FFprobe session has ended. + *

Session has either SessionStateCompleted or SessionStateFailed state when + * the callback is invoked. + *

If it has SessionStateCompleted state, ReturnCode should be checked to + * see the execution result. + *

If getState returns SessionStateFailed then + * getFailStackTrace should be used to get the failure reason. + *

+ *  switch ([session getState]) {
+ *      case SessionStateCompleted:
+ *          ReturnCode *returnCode = [session getReturnCode];
+ *          break;
+ *      case SessionStateFailed:
+ *          NSString *failStackTrace = [session getFailStackTrace];
+ *          break;
+ *  }
+ * 
+ * + * @param session session of the completed execution + */ +typedef void (^FFprobeSessionCompleteCallback)(FFprobeSession* session); + +#import "FFprobeSession.h" + +#endif // FFMPEG_KIT_FFPROBE_SESSION_COMPLETE_CALLBACK_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Level.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Level.h new file mode 100644 index 0000000..98cf43e --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Level.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_LEVEL_H +#define FFMPEG_KIT_LEVEL_H + +/** + *

Enumeration type for log levels. + */ +typedef NS_ENUM(NSUInteger, Level) { + + /** + * This log level is defined by FFmpegKit. It is used to specify logs printed to stderr by + * FFmpeg. Logs that has this level are not filtered and always redirected. + */ + LevelAVLogStdErr = -16, + + /** + * Print no output. + */ + LevelAVLogQuiet = -8, + + /** + * Something went really wrong and we will crash now. + */ + LevelAVLogPanic = 0, + + /** + * Something went wrong and recovery is not possible. + * For example, no header was found for a format which depends + * on headers or an illegal combination of parameters is used. + */ + LevelAVLogFatal = 8, + + /** + * Something went wrong and cannot losslessly be recovered. + * However, not all future data is affected. + */ + LevelAVLogError = 16, + + /** + * Something somehow does not look correct. This may or may not + * lead to problems. An example would be the use of '-vstrict -2'. + */ + LevelAVLogWarning = 24, + + /** + * Standard information. + */ + LevelAVLogInfo = 32, + + /** + * Detailed information. + */ + LevelAVLogVerbose = 40, + + /** + * Stuff which is only useful for libav* developers. + */ + LevelAVLogDebug = 48, + + /** + * Extremely verbose debugging, useful for libav* development. + */ + LevelAVLogTrace = 56 + +}; + +#endif // FFMPEG_KIT_LEVEL_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Log.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Log.h new file mode 100644 index 0000000..4199f92 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Log.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_LOG_H +#define FFMPEG_KIT_LOG_H + +#import + +/** + *

Log entry for an FFmpegKit session. + */ +@interface Log : NSObject + +- (instancetype)init:(long)sessionId :(int)level :(NSString*)message; + +- (long)getSessionId; + +- (int)getLevel; + +- (NSString*)getMessage; + +@end + +#endif // FFMPEG_KIT_LOG_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogCallback.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogCallback.h new file mode 100644 index 0000000..5505eb6 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogCallback.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_LOG_CALLBACK_H +#define FFMPEG_KIT_LOG_CALLBACK_H + +#import +#import "Log.h" + +/** + *

Callback that receives logs generated for FFmpegKit sessions. + * + * @param log log entry + */ +typedef void (^LogCallback)(Log* log); + +#endif // FFMPEG_KIT_LOG_CALLBACK_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogRedirectionStrategy.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogRedirectionStrategy.h new file mode 100644 index 0000000..1fd8b61 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/LogRedirectionStrategy.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_LOG_REDIRECTION_STRATEGY_H +#define FFMPEG_KIT_LOG_REDIRECTION_STRATEGY_H + +typedef NS_ENUM(NSUInteger, LogRedirectionStrategy) { + LogRedirectionStrategyAlwaysPrintLogs, + LogRedirectionStrategyPrintLogsWhenNoCallbacksDefined, + LogRedirectionStrategyPrintLogsWhenGlobalCallbackNotDefined, + LogRedirectionStrategyPrintLogsWhenSessionCallbackNotDefined, + LogRedirectionStrategyNeverPrintLogs +}; + +#endif // FFMPEG_KIT_LOG_REDIRECTION_STRATEGY_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformation.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformation.h new file mode 100644 index 0000000..d13810c --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformation.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2018-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_MEDIA_INFORMATION_H +#define FFMPEG_KIT_MEDIA_INFORMATION_H + +#import +#import "Chapter.h" +#import "StreamInformation.h" + +extern NSString* const MediaKeyMediaProperties; +extern NSString* const MediaKeyFilename; +extern NSString* const MediaKeyFormat; +extern NSString* const MediaKeyFormatLong; +extern NSString* const MediaKeyStartTime; +extern NSString* const MediaKeyDuration; +extern NSString* const MediaKeySize; +extern NSString* const MediaKeyBitRate; +extern NSString* const MediaKeyTags; + +/** + * Media information class. + */ +@interface MediaInformation : NSObject + +- (instancetype)init:(NSDictionary*)mediaDictionary withStreams:(NSArray*)streams withChapters:(NSArray*)chapters; + +/** + * Returns file name. + * + * @return media file name + */ +- (NSString*)getFilename; + +/** + * Returns format. + * + * @return media format + */ +- (NSString*)getFormat; + +/** + * Returns long format. + * + * @return media long format + */ +- (NSString*)getLongFormat; + +/** + * Returns duration. + * + * @return media duration in "seconds.microseconds" format + */ +- (NSString*)getDuration; + +/** + * Returns start time. + * + * @return media start time in milliseconds + */ +- (NSString*)getStartTime; + +/** + * Returns size. + * + * @return media size in bytes + */ +- (NSString*)getSize; + +/** + * Returns bitrate. + * + * @return media bitrate in kb/s + */ +- (NSString*)getBitrate; + +/** + * Returns all tags. + * + * @return tags dictionary + */ +- (NSDictionary*)getTags; + +/** + * Returns all streams. + * + * @return streams array + */ +- (NSArray*)getStreams; + +/** + * Returns all chapters. + * + * @return chapters array + */ +- (NSArray*)getChapters; + +/** + * Returns the property associated with the key. + * + * @return property as string or nil if the key is not found + */ +- (NSString*)getStringProperty:(NSString*)key; + +/** + * Returns the property associated with the key. + * + * @return property as number or nil if the key is not found + */ +- (NSNumber*)getNumberProperty:(NSString*)key; + +/** + * Returns the property associated with the key. + * + * @return property as id or nil if the key is not found +*/ +- (id)getProperty:(NSString*)key; + +/** + * Returns the format property associated with the key. + * + * @return format property as string or nil if the key is not found + */ +- (NSString*)getStringFormatProperty:(NSString*)key; + +/** + * Returns the format property associated with the key. + * + * @return format property as number or nil if the key is not found + */ +- (NSNumber*)getNumberFormatProperty:(NSString*)key; + +/** + * Returns the format property associated with the key. + * + * @return format property as id or nil if the key is not found +*/ +- (id)getFormatProperty:(NSString*)key; + +/** + * Returns all format properties defined. + * + * @return all format properties in a dictionary or nil if no format properties are defined +*/ +- (NSDictionary*)getFormatProperties; + +/** + * Returns all properties defined. + * + * @return all properties in a dictionary or nil if no properties are defined +*/ +- (NSDictionary*)getAllProperties; + +@end + +#endif // FFMPEG_KIT_MEDIA_INFORMATION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationJsonParser.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationJsonParser.h new file mode 100644 index 0000000..b78c2cb --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationJsonParser.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_MEDIA_INFORMATION_PARSER_H +#define FFMPEG_KIT_MEDIA_INFORMATION_PARSER_H + +#import +#import "MediaInformation.h" + +/** + * A parser that constructs MediaInformation from FFprobe's json output. + */ +@interface MediaInformationJsonParser : NSObject + +/** + * Extracts MediaInformation from the given FFprobe json output. + * + * @param ffprobeJsonOutput FFprobe json output + * @return created MediaInformation instance of nil if a parsing error occurs + */ ++ (MediaInformation*)from:(NSString*)ffprobeJsonOutput; + +/** + * Extracts MediaInformation from the given FFprobe json output. If a parsing error occurs an NSException + * is thrown. + * + * @param ffprobeJsonOutput FFprobe json output + * @return created MediaInformation instance + */ ++ (MediaInformation*)fromWithError:(NSString*)ffprobeJsonOutput; + +@end + +#endif // FFMPEG_KIT_MEDIA_INFORMATION_PARSER_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSession.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSession.h new file mode 100644 index 0000000..6a070ec --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSession.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_MEDIA_INFORMATION_SESSION_H +#define FFMPEG_KIT_MEDIA_INFORMATION_SESSION_H + +#import +#import "AbstractSession.h" +#import "MediaInformation.h" +#import "MediaInformationSessionCompleteCallback.h" + +/** + *

A custom FFprobe session, which produces a MediaInformation object using the + * FFprobe output. + */ +@interface MediaInformationSession : AbstractSession + +/** + * Creates a new media information session. + * + * @param arguments command arguments + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments; + +/** + * Creates a new media information session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback; + +/** + * Creates a new media information session. + * + * @param arguments command arguments + * @param completeCallback session specific complete callback + * @param logCallback session specific log callback + * @return created session + */ ++ (instancetype)create:(NSArray*)arguments withCompleteCallback:(MediaInformationSessionCompleteCallback)completeCallback withLogCallback:(LogCallback)logCallback; + +/** + * Returns the media information extracted in this session. + * + * @return media information extracted or nil if the command failed or the output can not be + * parsed + */ +- (MediaInformation*)getMediaInformation; + +/** + * Sets the media information extracted in this session. + * + * @param mediaInformation media information extracted + */ +- (void)setMediaInformation:(MediaInformation*)mediaInformation; + +/** + * Returns the session specific complete callback. + * + * @return session specific complete callback + */ +- (MediaInformationSessionCompleteCallback)getCompleteCallback; + +@end + +#endif // FFMPEG_KIT_MEDIA_INFORMATION_SESSION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSessionCompleteCallback.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSessionCompleteCallback.h new file mode 100644 index 0000000..aedbe7b --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/MediaInformationSessionCompleteCallback.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_MEDIA_INFORMATION_SESSION_COMPLETE_CALLBACK_H +#define FFMPEG_KIT_MEDIA_INFORMATION_SESSION_COMPLETE_CALLBACK_H + +@class MediaInformationSession; + +/** + *

Callback function that is invoked when an asynchronous MediaInformation session + * has ended. + *

Session has either SessionStateCompleted or SessionStateFailed state when + * the callback is invoked. + *

If it has SessionStateCompleted state, ReturnCode should be checked to + * see the execution result. + *

If getState returns SessionStateFailed then + * getFailStackTrace should be used to get the failure reason. + *

+ *  switch ([session getState]) {
+ *      case SessionStateCompleted:
+ *          ReturnCode *returnCode = [session getReturnCode];
+ *          break;
+ *      case SessionStateFailed:
+ *          NSString *failStackTrace = [session getFailStackTrace];
+ *          break;
+ *  }
+ * 
+ * + * @param session session of the completed execution + */ +typedef void (^MediaInformationSessionCompleteCallback)(MediaInformationSession* session); + +#import "MediaInformationSession.h" + +#endif // FFMPEG_KIT_MEDIA_INFORMATION_SESSION_COMPLETE_CALLBACK_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Packages.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Packages.h new file mode 100644 index 0000000..83d6068 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Packages.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_PACKAGES_H +#define FFMPEG_KIT_PACKAGES_H + +#import + +/** + *

Helper class to extract binary package information. + */ +@interface Packages : NSObject + +/** + * Returns the FFmpegKit binary package name. + * + * @return predicted FFmpegKit binary package name + */ ++ (NSString*)getPackageName; + +/** + * Returns enabled external libraries by FFmpeg. + * + * @return enabled external libraries + */ ++ (NSArray*)getExternalLibraries; + +@end + +#endif // FFMPEG_KIT_PACKAGES_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ReturnCode.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ReturnCode.h new file mode 100644 index 0000000..8047793 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ReturnCode.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_RETURN_CODE_H +#define FFMPEG_KIT_RETURN_CODE_H + +#import + +typedef NS_ENUM(NSUInteger, ReturnCodeEnum) { + ReturnCodeSuccess = 0, + ReturnCodeCancel = 255 +}; + +@interface ReturnCode : NSObject + +- (instancetype)init:(int)value; + ++ (BOOL)isSuccess:(ReturnCode*)value; + ++ (BOOL)isCancel:(ReturnCode*)value; + +- (int)getValue; + +- (BOOL)isValueSuccess; + +- (BOOL)isValueError; + +- (BOOL)isValueCancel; + +@end + +#endif // FFMPEG_KIT_RETURN_CODE_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Session.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Session.h new file mode 100644 index 0000000..980fad3 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Session.h @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_SESSION_H +#define FFMPEG_KIT_SESSION_H + +#import +#import "Log.h" +#import "LogCallback.h" +#import "LogRedirectionStrategy.h" +#import "ReturnCode.h" +#import "SessionState.h" + +/** + *

Common interface for all FFmpegKit sessions. + */ +@protocol Session + +@required + +/** + * Returns the session specific log callback. + * + * @return session specific log callback + */ +- (LogCallback)getLogCallback; + +/** + * Returns the session identifier. + * + * @return session identifier + */ +- (long)getSessionId; + +/** + * Returns session create time. + * + * @return session create time + */ +- (NSDate*)getCreateTime; + +/** + * Returns session start time. + * + * @return session start time + */ +- (NSDate*)getStartTime; + +/** + * Returns session end time. + * + * @return session end time + */ +- (NSDate*)getEndTime; + +/** + * Returns the time taken to execute this session. + * + * @return time taken to execute this session in milliseconds or zero (0) if the session is + * not over yet + */ +- (long)getDuration; + +/** + * Returns command arguments as an array. + * + * @return command arguments as an array + */ +- (NSArray*)getArguments; + +/** + * Returns command arguments as a concatenated string. + * + * @return command arguments as a concatenated string + */ +- (NSString*)getCommand; + +/** + * Returns all log entries generated for this session. If there are asynchronous + * messages that are not delivered yet, this method waits for them until the given timeout. + * + * @param waitTimeout wait timeout for asynchronous messages in milliseconds + * @return list of log entries generated for this session + */ +- (NSArray*)getAllLogsWithTimeout:(int)waitTimeout; + +/** + * Returns all log entries generated for this session. If there are asynchronous + * messages that are not delivered yet, this method waits for them. + * + * @return list of log entries generated for this session + */ +- (NSArray*)getAllLogs; + +/** + * Returns all log entries delivered for this session. Note that if there are asynchronous + * messages that are not delivered yet, this method will not wait for them and will return + * immediately. + * + * @return list of log entries received for this session + */ +- (NSArray*)getLogs; + +/** + * Returns all log entries generated for this session as a concatenated string. If there are + * asynchronous messages that are not delivered yet, this method waits for them until + * the given timeout. + * + * @param waitTimeout wait timeout for asynchronous messages in milliseconds + * @return all log entries generated for this session as a concatenated string + */ +- (NSString*)getAllLogsAsStringWithTimeout:(int)waitTimeout; + +/** + * Returns all log entries generated for this session as a concatenated string. If there are + * asynchronous messages that are not delivered yet, this method waits for them. + * + * @return all log entries generated for this session as a concatenated string + */ +- (NSString*)getAllLogsAsString; + +/** + * Returns all log entries delivered for this session as a concatenated string. Note that if + * there are asynchronous messages that are not delivered yet, this method will not wait + * for them and will return immediately. + * + * @return list of log entries received for this session + */ +- (NSString*)getLogsAsString; + +/** + * Returns the log output generated while running the session. + * + * @return log output generated + */ +- (NSString*)getOutput; + +/** + * Returns the state of the session. + * + * @return state of the session + */ +- (SessionState)getState; + +/** + * Returns the return code for this session. Note that return code is only set for sessions + * that end with SessionStateCompleted state. If a session is not started, still running or failed then + * this method returns nil. + * + * @return the return code for this session if the session has completed, nil if session is + * not started, still running or failed + */ +- (ReturnCode*)getReturnCode; + +/** + * Returns the stack trace of the exception received while executing this session. + *

+ * The stack trace is only set for sessions that end with SessionStateFailed state. For sessions that has + * SessionStateCompleted state this method returns nil. + * + * @return stack trace of the exception received while executing this session, nil if session + * is not started, still running or completed + */ +- (NSString*)getFailStackTrace; + +/** + * Returns session specific log redirection strategy. + * + * @return session specific log redirection strategy + */ +- (LogRedirectionStrategy)getLogRedirectionStrategy; + +/** + * Returns whether there are still asynchronous messages being transmitted for this + * session or not. + * + * @return true if there are still asynchronous messages being transmitted, false + * otherwise + */ +- (BOOL)thereAreAsynchronousMessagesInTransmit; + +/** + * Adds a new log entry for this session. + * + * It is invoked internally by FFmpegKit library methods. Must not be used by user + * applications. + * + * @param log log entry + */ +- (void)addLog:(Log*)log; + +/** + * Starts running the session. + */ +- (void)startRunning; + +/** + * Completes running the session with the provided return code. + * + * @param returnCode return code of the execution + */ +- (void)complete:(ReturnCode*)returnCode; + +/** + * Ends running the session with a failure. + * + * @param exception execution received + */ +- (void)fail:(NSException*)exception; + +/** + * Returns whether it is an FFmpeg session or not. + * + * @return true if it is an FFmpeg session, false otherwise + */ +- (BOOL)isFFmpeg; + +/** + * Returns whether it is an FFprobe session or not. + * + * @return true if it is an FFprobe session, false otherwise + */ +- (BOOL)isFFprobe; + +/** + * Returns whether it is a MediaInformation session or not. + * + * @return true if it is a MediaInformation session, false otherwise + */ +- (BOOL)isMediaInformation; + +/** + * Cancels running the session. + */ +- (void)cancel; + +@end + +#endif // FFMPEG_KIT_SESSION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/SessionState.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/SessionState.h new file mode 100644 index 0000000..46eec4d --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/SessionState.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_SESSION_STATE_H +#define FFMPEG_KIT_SESSION_STATE_H + +typedef NS_ENUM(NSUInteger, SessionState) { + SessionStateCreated, + SessionStateRunning, + SessionStateFailed, + SessionStateCompleted +}; + +#endif // FFMPEG_KIT_SESSION_STATE_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Statistics.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Statistics.h new file mode 100644 index 0000000..44221e1 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/Statistics.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_STATISTICS_H +#define FFMPEG_KIT_STATISTICS_H + +#import + +/** + * Statistics entry for an FFmpeg execute session. + */ +@interface Statistics : NSObject + +- (instancetype)init:(long)sessionId videoFrameNumber:(int)videoFrameNumber videoFps:(float)videoFps videoQuality:(float)videoQuality size:(int64_t)size time:(double)time bitrate:(double)bitrate speed:(double)speed; + +- (long)getSessionId; + +- (int)getVideoFrameNumber; + +- (float)getVideoFps; + +- (float)getVideoQuality; + +- (long)getSize; + +- (double)getTime; + +- (double)getBitrate; + +- (double)getSpeed; + +@end + +#endif // FFMPEG_KIT_STATISTICS_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StatisticsCallback.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StatisticsCallback.h new file mode 100644 index 0000000..420d9ef --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StatisticsCallback.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_STATISTICS_CALLBACK_H +#define FFMPEG_KIT_STATISTICS_CALLBACK_H + +#import +#import "Statistics.h" + +/** + *

Callback that receives statistics generated for FFmpegKit sessions. + * + * @param statistics statistics entry + */ +typedef void (^StatisticsCallback)(Statistics* statistics); + +#endif // FFMPEG_KIT_STATISTICS_CALLBACK_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StreamInformation.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StreamInformation.h new file mode 100644 index 0000000..6e98f99 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/StreamInformation.h @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2018-2022 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_STREAM_INFORMATION_H +#define FFMPEG_KIT_STREAM_INFORMATION_H + +#import + +extern NSString* const StreamKeyIndex; +extern NSString* const StreamKeyType; +extern NSString* const StreamKeyCodec; +extern NSString* const StreamKeyCodecLong; +extern NSString* const StreamKeyFormat; +extern NSString* const StreamKeyWidth; +extern NSString* const StreamKeyHeight; +extern NSString* const StreamKeyBitRate; +extern NSString* const StreamKeySampleRate; +extern NSString* const StreamKeySampleFormat; +extern NSString* const StreamKeyChannelLayout; +extern NSString* const StreamKeySampleAspectRatio; +extern NSString* const StreamKeyDisplayAspectRatio; +extern NSString* const StreamKeyAverageFrameRate; +extern NSString* const StreamKeyRealFrameRate; +extern NSString* const StreamKeyTimeBase; +extern NSString* const StreamKeyCodecTimeBase; +extern NSString* const StreamKeyTags; + +/** + * Stream information class. + */ +@interface StreamInformation : NSObject + +- (instancetype)init:(NSDictionary*)streamDictionary; + +/** + * Returns stream index. + * + * @return stream index, starting from zero + */ +- (NSNumber*)getIndex; + +/** + * Returns stream type. + * + * @return stream type; audio or video + */ +- (NSString*)getType; + +/** + * Returns stream codec. + * + * @return stream codec + */ +- (NSString*)getCodec; + +/** + * Returns stream codec in long format. + * + * @return stream codec with additional profile and mode information + */ +- (NSString*)getCodecLong; + +/** + * Returns stream format. + * + * @return stream format + */ +- (NSString*)getFormat; + +/** + * Returns width. + * + * @return width in pixels + */ +- (NSNumber*)getWidth; + +/** + * Returns height. + * + * @return height in pixels + */ +- (NSNumber*)getHeight; + +/** + * Returns bitrate. + * + * @return bitrate in kb/s + */ +- (NSString*)getBitrate; + +/** + * Returns sample rate. + * + * @return sample rate in hz + */ +- (NSString*)getSampleRate; + +/** + * Returns sample format. + * + * @return sample format + */ +- (NSString*)getSampleFormat; + +/** + * Returns channel layout. + * + * @return channel layout + */ +- (NSString*)getChannelLayout; + +/** + * Returns sample aspect ratio. + * + * @return sample aspect ratio + */ +- (NSString*)getSampleAspectRatio; + +/** + * Returns display aspect ratio. + * + * @return display aspect ratio + */ +- (NSString*)getDisplayAspectRatio; + +/** + * Returns average frame rate. + * + * @return average frame rate in fps + */ +- (NSString*)getAverageFrameRate; + +/** + * Returns real frame rate. + * + * @return real frame rate in tbr + */ +- (NSString*)getRealFrameRate; + +/** + * Returns time base. + * + * @return time base in tbn + */ +- (NSString*)getTimeBase; + +/** + * Returns codec time base. + * + * @return codec time base in tbc + */ +- (NSString*)getCodecTimeBase; + +/** + * Returns all tags. + * + * @return tags dictionary + */ +- (NSDictionary*)getTags; + +/** + * Returns the stream property associated with the key. + * + * @return stream property as string or nil if the key is not found + */ +- (NSString*)getStringProperty:(NSString*)key; + +/** + * Returns the stream property associated with the key. + * + * @return stream property as number or nil if the key is not found + */ +- (NSNumber*)getNumberProperty:(NSString*)key; + +/** + * Returns the stream property associated with the key. + * + * @return stream property as id or nil if the key is not found +*/ +- (id)getProperty:(NSString*)key; + +/** + * Returns all stream properties defined. + * + * @return all stream properties in a dictionary or nil if no properties are defined +*/ +- (NSDictionary*)getAllProperties; + +@end + +#endif // FFMPEG_KIT_STREAM_INFORMATION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ffmpegkit_exception.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ffmpegkit_exception.h new file mode 100644 index 0000000..daf3acc --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/ffmpegkit_exception.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018-2021 Taner Sener + * + * This file is part of FFmpegKit. + * + * FFmpegKit is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FFmpegKit is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpegKit. If not, see . + */ + +#ifndef FFMPEG_KIT_EXCEPTION_H +#define FFMPEG_KIT_EXCEPTION_H + +#include +#include + +/** Holds information to implement exception handling. */ +extern __thread jmp_buf ex_buf__; + +#endif // FFMPEG_KIT_EXCEPTION_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_cmdutils.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_cmdutils.h new file mode 100644 index 0000000..b925cf0 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_cmdutils.h @@ -0,0 +1,516 @@ +/* + * Various utilities for command line tools + * copyright (c) 2003 Fabrice Bellard + * copyright (c) 2018-2022 Taner Sener + * copyright (c) 2023 ARTHENICA LTD + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of cmdutils.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop mobile-ffmpeg and later ffmpeg-kit libraries. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + * + * mobile-ffmpeg / ffmpeg-kit changes by Taner Sener + * + * 09.2022 + * -------------------------------------------------------- + * - config.h include added back + * + * 01.2020 + * -------------------------------------------------------- + * - ffprobe support added (variables used by ffprobe marked with "__thread" specifier) + * - AV_LOG_STDERR log level added + * + * 12.2019 + * -------------------------------------------------------- + * - concurrent execution support ("__thread" specifier added to variables used by multiple threads) + * + * 03.2019 + * -------------------------------------------------------- + * - config.h include removed + * + * 08.2018 + * -------------------------------------------------------- + * - fftools_ prefix added to file name and include guards + * + * 07.2018 + * -------------------------------------------------------- + * - include guards renamed + * - unused headers removed + */ + +#ifndef FFTOOLS_CMDUTILS_H +#define FFTOOLS_CMDUTILS_H + +#include + +#include "config.h" +#include "libavcodec/avcodec.h" +#include "libavfilter/avfilter.h" +#include "libavformat/avformat.h" +#include "libswscale/swscale.h" + +#ifdef _WIN32 +#undef main /* We don't want SDL to override our main() */ +#endif + +/** + * Defines logs printed to stderr by ffmpeg. They are not filtered and always redirected. + */ +#define AV_LOG_STDERR -16 + +/** + * program name, defined by the program for show_version(). + */ +extern __thread char *program_name; + +/** + * program birth year, defined by the program for show_banner() + */ +extern __thread int program_birth_year; + +extern __thread AVDictionary *sws_dict; +extern __thread AVDictionary *swr_opts; +extern __thread AVDictionary *format_opts, *codec_opts; +extern __thread int hide_banner; +extern __thread int find_stream_info; + +/** + * Register a program-specific cleanup routine. + */ +void register_exit(void (*cb)(int ret)); + +/** + * Reports an error corresponding to the provided + * AVERROR code and calls exit_program() with the + * corresponding POSIX error code. + * @note ret must be an AVERROR-value of a POSIX error code + * (i.e. AVERROR(EFOO) and not AVERROR_FOO). + * library functions can return both, so call this only + * with AVERROR(EFOO) of your own. + */ +void report_and_exit(int ret) av_noreturn; + +/** + * Wraps exit with a program-specific cleanup routine. + */ +void exit_program(int ret) av_noreturn; + +/** + * Initialize dynamic library loading + */ +void init_dynload(void); + +/** + * Uninitialize the cmdutils option system, in particular + * free the *_opts contexts and their contents. + */ +void uninit_opts(void); + +/** + * Trivial log callback. + * Only suitable for opt_help and similar since it lacks prefix handling. + */ +void log_callback_help(void* ptr, int level, const char* fmt, va_list vl); + +/** + * Fallback for options that are not explicitly handled, these will be + * parsed through AVOptions. + */ +int opt_default(void *optctx, const char *opt, const char *arg); + +/** + * Limit the execution time. + */ +int opt_timelimit(void *optctx, const char *opt, const char *arg); + +/** + * Parse a string and return its corresponding value as a double. + * Exit from the application if the string cannot be correctly + * parsed or the corresponding value is invalid. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param numstr the string to be parsed + * @param type the type (OPT_INT64 or OPT_FLOAT) as which the + * string should be parsed + * @param min the minimum valid accepted value + * @param max the maximum valid accepted value + */ +double parse_number_or_die(const char *context, const char *numstr, int type, + double min, double max); + +/** + * Parse a string specifying a time and return its corresponding + * value as a number of microseconds. Exit from the application if + * the string cannot be correctly parsed. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param timestr the string to be parsed + * @param is_duration a flag which tells how to interpret timestr, if + * not zero timestr is interpreted as a duration, otherwise as a + * date + * + * @see av_parse_time() + */ +int64_t parse_time_or_die(const char *context, const char *timestr, + int is_duration); + +typedef struct SpecifierOpt { + char *specifier; /**< stream/chapter/program/... specifier */ + union { + uint8_t *str; + int i; + int64_t i64; + uint64_t ui64; + float f; + double dbl; + } u; +} SpecifierOpt; + +typedef struct OptionDef { + const char *name; + int flags; +#define HAS_ARG 0x0001 +#define OPT_BOOL 0x0002 +#define OPT_EXPERT 0x0004 +#define OPT_STRING 0x0008 +#define OPT_VIDEO 0x0010 +#define OPT_AUDIO 0x0020 +#define OPT_INT 0x0080 +#define OPT_FLOAT 0x0100 +#define OPT_SUBTITLE 0x0200 +#define OPT_INT64 0x0400 +#define OPT_EXIT 0x0800 +#define OPT_DATA 0x1000 +#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only). + implied by OPT_OFFSET or OPT_SPEC */ +#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ +#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. + Implies OPT_OFFSET. Next element after the offset is + an int containing element count in the array. */ +#define OPT_TIME 0x10000 +#define OPT_DOUBLE 0x20000 +#define OPT_INPUT 0x40000 +#define OPT_OUTPUT 0x80000 + union { + void *dst_ptr; + int (*func_arg)(void *, const char *, const char *); + size_t off; + } u; + const char *help; + const char *argname; +} OptionDef; + +/** + * Print help for all options matching specified flags. + * + * @param options a list of options + * @param msg title of this group. Only printed if at least one option matches. + * @param req_flags print only options which have all those flags set. + * @param rej_flags don't print options which have any of those flags set. + * @param alt_flags print only options that have at least one of those flags set + */ +void show_help_options(const OptionDef *options, const char *msg, int req_flags, + int rej_flags, int alt_flags); + +/** + * Show help for all options with given flags in class and all its + * children. + */ +void show_help_children(const AVClass *clazz, int flags); + +/** + * Per-fftool specific help handler. Implemented in each + * fftool, called by show_help(). + */ +void show_help_default_ffmpeg(const char *opt, const char *arg); +void show_help_default_ffprobe(const char *opt, const char *arg); + +/** + * Parse the command line arguments. + * + * @param optctx an opaque options context + * @param argc number of command line arguments + * @param argv values of command line arguments + * @param options Array with the definitions required to interpret every + * option of the form: -option_name [argument] + * @param parse_arg_function Name of the function called to process every + * argument without a leading option name flag. NULL if such arguments do + * not have to be processed. + */ +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (* parse_arg_function)(void *optctx, const char*)); + +/** + * Parse one given option. + * + * @return on success 1 if arg was consumed, 0 otherwise; negative number on error + */ +int parse_option(void *optctx, const char *opt, const char *arg, + const OptionDef *options); + +/** + * An option extracted from the commandline. + * Cannot use AVDictionary because of options like -map which can be + * used multiple times. + */ +typedef struct Option { + const OptionDef *opt; + const char *key; + const char *val; +} Option; + +typedef struct OptionGroupDef { + /**< group name */ + const char *name; + /** + * Option to be used as group separator. Can be NULL for groups which + * are terminated by a non-option argument (e.g. ffmpeg output files) + */ + const char *sep; + /** + * Option flags that must be set on each option that is + * applied to this group + */ + int flags; +} OptionGroupDef; + +typedef struct OptionGroup { + const OptionGroupDef *group_def; + const char *arg; + + Option *opts; + int nb_opts; + + AVDictionary *codec_opts; + AVDictionary *format_opts; + AVDictionary *sws_dict; + AVDictionary *swr_opts; +} OptionGroup; + +/** + * A list of option groups that all have the same group type + * (e.g. input files or output files) + */ +typedef struct OptionGroupList { + const OptionGroupDef *group_def; + + OptionGroup *groups; + int nb_groups; +} OptionGroupList; + +typedef struct OptionParseContext { + OptionGroup global_opts; + + OptionGroupList *groups; + int nb_groups; + + /* parsing state */ + OptionGroup cur_group; +} OptionParseContext; + +/** + * Parse an options group and write results into optctx. + * + * @param optctx an app-specific options context. NULL for global options group + * @param g option group + */ +int parse_optgroup(void *optctx, OptionGroup *g); + +/** + * Split the commandline into an intermediate form convenient for further + * processing. + * + * The commandline is assumed to be composed of options which either belong to a + * group (those with OPT_SPEC, OPT_OFFSET or OPT_PERFILE) or are global + * (everything else). + * + * A group (defined by an OptionGroupDef struct) is a sequence of options + * terminated by either a group separator option (e.g. -i) or a parameter that + * is not an option (doesn't start with -). A group without a separator option + * must always be first in the supplied groups list. + * + * All options within the same group are stored in one OptionGroup struct in an + * OptionGroupList, all groups with the same group definition are stored in one + * OptionGroupList in OptionParseContext.groups. The order of group lists is the + * same as the order of group definitions. + */ +int split_commandline(OptionParseContext *octx, int argc, char *argv[], + const OptionDef *options, + const OptionGroupDef *groups, int nb_groups); + +/** + * Free all allocated memory in an OptionParseContext. + */ +void uninit_parse_context(OptionParseContext *octx); + +/** + * Find the '-loglevel' option in the command line args and apply it. + */ +void parse_loglevel(int argc, char **argv, const OptionDef *options); + +/** + * Return index of option opt in argv or 0 if not found. + */ +int locate_option(int argc, char **argv, const OptionDef *options, + const char *optname); + +/** + * Check if the given stream matches a stream specifier. + * + * @param s Corresponding format context. + * @param st Stream from s to be checked. + * @param spec A stream specifier of the [v|a|s|d]:[\] form. + * + * @return 1 if the stream matches, 0 if it doesn't, <0 on error + */ +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); + +/** + * Filter out options for given codec. + * + * Create a new options dictionary containing only the options from + * opts which apply to the codec with ID codec_id. + * + * @param opts dictionary to place options in + * @param codec_id ID of the codec that should be filtered for + * @param s Corresponding format context. + * @param st A stream from s for which the options should be filtered. + * @param codec The particular codec for which the options should be filtered. + * If null, the default one is looked up according to the codec id. + * @return a pointer to the created dictionary + */ +AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, const AVCodec *codec); + +/** + * Setup AVCodecContext options for avformat_find_stream_info(). + * + * Create an array of dictionaries, one dictionary for each stream + * contained in s. + * Each dictionary will contain the options from codec_opts which can + * be applied to the corresponding stream codec context. + * + * @return pointer to the created array of dictionaries. + * Calls exit() on failure. + */ +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts); + +/** + * Print an error message to stderr, indicating filename and a human + * readable description of the error code err. + * + * If strerror_r() is not available the use of this function in a + * multithreaded application may be unsafe. + * + * @see av_strerror() + */ +void print_error(const char *filename, int err); + +/** + * Print the program banner to stderr. The banner contents depend on the + * current version of the repository and of the libav* libraries used by + * the program. + */ +void show_banner(int argc, char **argv, const OptionDef *options); + +/** + * Return a positive value if a line read from standard input + * starts with [yY], otherwise return 0. + */ +int read_yesno(void); + +/** + * Get a file corresponding to a preset file. + * + * If is_path is non-zero, look for the file in the path preset_name. + * Otherwise search for a file named arg.ffpreset in the directories + * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined + * at configuration time or in a "ffpresets" folder along the executable + * on win32, in that order. If no such file is found and + * codec_name is defined, then search for a file named + * codec_name-preset_name.avpreset in the above-mentioned directories. + * + * @param filename buffer where the name of the found filename is written + * @param filename_size size in bytes of the filename buffer + * @param preset_name name of the preset to search + * @param is_path tell if preset_name is a filename path + * @param codec_name name of the codec for which to look for the + * preset, may be NULL + */ +FILE *get_preset_file(char *filename, size_t filename_size, + const char *preset_name, int is_path, const char *codec_name); + +/** + * Realloc array to hold new_size elements of elem_size. + * Calls exit() on failure. + * + * @param array array to reallocate + * @param elem_size size in bytes of each element + * @param size new element count will be written here + * @param new_size number of elements to place in reallocated array + * @return reallocated array + */ +void *grow_array(void *array, int elem_size, int *size, int new_size); + +/** + * Atomically add a new element to an array of pointers, i.e. allocate + * a new entry, reallocate the array of pointers and make the new last + * member of this array point to the newly allocated buffer. + * Calls exit() on failure. + * + * @param array array of pointers to reallocate + * @param elem_size size of the new element to allocate + * @param nb_elems pointer to the number of elements of the array array; + * *nb_elems will be incremented by one by this function. + * @return pointer to the newly allocated entry + */ +void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); + +#define GROW_ARRAY(array, nb_elems)\ + array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) + +#define ALLOC_ARRAY_ELEM(array, nb_elems)\ + allocate_array_elem(&array, sizeof(*array[0]), &nb_elems) + +#define GET_PIX_FMT_NAME(pix_fmt)\ + const char *name = av_get_pix_fmt_name(pix_fmt); + +#define GET_CODEC_NAME(id)\ + const char *name = avcodec_descriptor_get(id)->name; + +#define GET_SAMPLE_FMT_NAME(sample_fmt)\ + const char *name = av_get_sample_fmt_name(sample_fmt) + +#define GET_SAMPLE_RATE_NAME(rate)\ + char name[16];\ + snprintf(name, sizeof(name), "%d", rate); + +double get_rotation(int32_t *displaymatrix); + +#endif /* FFTOOLS_CMDUTILS_H */ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg.h new file mode 100644 index 0000000..66b254f --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg.h @@ -0,0 +1,912 @@ +/* + * This file is part of FFmpeg. + * Copyright (c) 2018-2022 Taner Sener + * Copyright (c) 2023 ARTHENICA LTD + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of ffmpeg.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop mobile-ffmpeg and later ffmpeg-kit libraries. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + * - WARN_MULTIPLE_OPT_USAGE, MATCH_PER_STREAM_OPT, MATCH_PER_TYPE_OPT, SPECIFIER_OPT_FMT declarations migrated to + * ffmpeg_mux.h + * - "class" member field renamed as clazz + * - time field in set_report_callback updated as double + * + * mobile-ffmpeg / ffmpeg-kit changes by Taner Sener + * + * 09.2022 + * -------------------------------------------------------- + * - config.h include added back + * - volatile dropped from thread local variables + * - dropped signatures of ffmpeg_opt.c methods called by both ffmpeg and ffprobe + * + * 06.2020 + * -------------------------------------------------------- + * - cancel_operation() method signature updated with id + * + * 12.2019 + * -------------------------------------------------------- + * - concurrent execution support ("__thread" specifier added to variables used by multiple threads, + * signatures of ffmpeg_opt.c methods called by both ffmpeg and ffprobe added) + * + * 03.2019 + * -------------------------------------------------------- + * - config.h include removed + * + * 08.2018 + * -------------------------------------------------------- + * - fftools_ prefix added to file name and include guards + * - set_report_callback() method declared + * - cancel_operation() method declared + * + * 07.2018 + * -------------------------------------------------------- + * - include guards renamed + */ + +#ifndef FFTOOLS_FFMPEG_H +#define FFTOOLS_FFMPEG_H + +#include "config.h" + +#include +#include +#include +#include + +#include "fftools_cmdutils.h" +#include "fftools_sync_queue.h" + +#include "libavformat/avformat.h" +#include "libavformat/avio.h" + +#include "libavcodec/avcodec.h" +#include "libavcodec/bsf.h" + +#include "libavfilter/avfilter.h" + +#include "libavutil/avutil.h" +#include "libavutil/dict.h" +#include "libavutil/eval.h" +#include "libavutil/fifo.h" +#include "libavutil/hwcontext.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "libavutil/thread.h" +#include "libavutil/threadmessage.h" + +#include "libswresample/swresample.h" + +// deprecated features +#define FFMPEG_OPT_PSNR 1 +#define FFMPEG_OPT_MAP_CHANNEL 1 +#define FFMPEG_OPT_MAP_SYNC 1 +#define FFMPEG_ROTATION_METADATA 1 + +enum VideoSyncMethod { + VSYNC_AUTO = -1, + VSYNC_PASSTHROUGH, + VSYNC_CFR, + VSYNC_VFR, + VSYNC_VSCFR, + VSYNC_DROP, +}; + +#define MAX_STREAMS 1024 /* arbitrary sanity check value */ + +enum HWAccelID { + HWACCEL_NONE = 0, + HWACCEL_AUTO, + HWACCEL_GENERIC, +}; + +typedef struct HWDevice { + const char *name; + enum AVHWDeviceType type; + AVBufferRef *device_ref; +} HWDevice; + +/* select an input stream for an output stream */ +typedef struct StreamMap { + int disabled; /* 1 is this mapping is disabled by a negative map */ + int file_index; + int stream_index; + char *linklabel; /* name of an output link, for mapping lavfi outputs */ +} StreamMap; + +#if FFMPEG_OPT_MAP_CHANNEL +typedef struct { + int file_idx, stream_idx, channel_idx; // input + int ofile_idx, ostream_idx; // output +} AudioChannelMap; +#endif + +typedef struct OptionsContext { + OptionGroup *g; + + /* input/output options */ + int64_t start_time; + int64_t start_time_eof; + int seek_timestamp; + const char *format; + + SpecifierOpt *codec_names; + int nb_codec_names; + SpecifierOpt *audio_ch_layouts; + int nb_audio_ch_layouts; + SpecifierOpt *audio_channels; + int nb_audio_channels; + SpecifierOpt *audio_sample_rate; + int nb_audio_sample_rate; + SpecifierOpt *frame_rates; + int nb_frame_rates; + SpecifierOpt *max_frame_rates; + int nb_max_frame_rates; + SpecifierOpt *frame_sizes; + int nb_frame_sizes; + SpecifierOpt *frame_pix_fmts; + int nb_frame_pix_fmts; + + /* input options */ + int64_t input_ts_offset; + int loop; + int rate_emu; + float readrate; + int accurate_seek; + int thread_queue_size; + int input_sync_ref; + int find_stream_info; + + SpecifierOpt *ts_scale; + int nb_ts_scale; + SpecifierOpt *dump_attachment; + int nb_dump_attachment; + SpecifierOpt *hwaccels; + int nb_hwaccels; + SpecifierOpt *hwaccel_devices; + int nb_hwaccel_devices; + SpecifierOpt *hwaccel_output_formats; + int nb_hwaccel_output_formats; + SpecifierOpt *autorotate; + int nb_autorotate; + + /* output options */ + StreamMap *stream_maps; + int nb_stream_maps; +#if FFMPEG_OPT_MAP_CHANNEL + AudioChannelMap *audio_channel_maps; /* one info entry per -map_channel */ + int nb_audio_channel_maps; /* number of (valid) -map_channel settings */ +#endif + const char **attachments; + int nb_attachments; + + int chapters_input_file; + + int64_t recording_time; + int64_t stop_time; + int64_t limit_filesize; + float mux_preload; + float mux_max_delay; + float shortest_buf_duration; + int shortest; + int bitexact; + + int video_disable; + int audio_disable; + int subtitle_disable; + int data_disable; + + /* indexed by output file stream index */ + int *streamid_map; + int nb_streamid_map; + + SpecifierOpt *metadata; + int nb_metadata; + SpecifierOpt *max_frames; + int nb_max_frames; + SpecifierOpt *bitstream_filters; + int nb_bitstream_filters; + SpecifierOpt *codec_tags; + int nb_codec_tags; + SpecifierOpt *sample_fmts; + int nb_sample_fmts; + SpecifierOpt *qscale; + int nb_qscale; + SpecifierOpt *forced_key_frames; + int nb_forced_key_frames; + SpecifierOpt *fps_mode; + int nb_fps_mode; + SpecifierOpt *force_fps; + int nb_force_fps; + SpecifierOpt *frame_aspect_ratios; + int nb_frame_aspect_ratios; + SpecifierOpt *display_rotations; + int nb_display_rotations; + SpecifierOpt *display_hflips; + int nb_display_hflips; + SpecifierOpt *display_vflips; + int nb_display_vflips; + SpecifierOpt *rc_overrides; + int nb_rc_overrides; + SpecifierOpt *intra_matrices; + int nb_intra_matrices; + SpecifierOpt *inter_matrices; + int nb_inter_matrices; + SpecifierOpt *chroma_intra_matrices; + int nb_chroma_intra_matrices; + SpecifierOpt *top_field_first; + int nb_top_field_first; + SpecifierOpt *metadata_map; + int nb_metadata_map; + SpecifierOpt *presets; + int nb_presets; + SpecifierOpt *copy_initial_nonkeyframes; + int nb_copy_initial_nonkeyframes; + SpecifierOpt *copy_prior_start; + int nb_copy_prior_start; + SpecifierOpt *filters; + int nb_filters; + SpecifierOpt *filter_scripts; + int nb_filter_scripts; + SpecifierOpt *reinit_filters; + int nb_reinit_filters; + SpecifierOpt *fix_sub_duration; + int nb_fix_sub_duration; + SpecifierOpt *fix_sub_duration_heartbeat; + int nb_fix_sub_duration_heartbeat; + SpecifierOpt *canvas_sizes; + int nb_canvas_sizes; + SpecifierOpt *pass; + int nb_pass; + SpecifierOpt *passlogfiles; + int nb_passlogfiles; + SpecifierOpt *max_muxing_queue_size; + int nb_max_muxing_queue_size; + SpecifierOpt *muxing_queue_data_threshold; + int nb_muxing_queue_data_threshold; + SpecifierOpt *guess_layout_max; + int nb_guess_layout_max; + SpecifierOpt *apad; + int nb_apad; + SpecifierOpt *discard; + int nb_discard; + SpecifierOpt *disposition; + int nb_disposition; + SpecifierOpt *program; + int nb_program; + SpecifierOpt *time_bases; + int nb_time_bases; + SpecifierOpt *enc_time_bases; + int nb_enc_time_bases; + SpecifierOpt *autoscale; + int nb_autoscale; + SpecifierOpt *bits_per_raw_sample; + int nb_bits_per_raw_sample; + SpecifierOpt *enc_stats_pre; + int nb_enc_stats_pre; + SpecifierOpt *enc_stats_post; + int nb_enc_stats_post; + SpecifierOpt *mux_stats; + int nb_mux_stats; + SpecifierOpt *enc_stats_pre_fmt; + int nb_enc_stats_pre_fmt; + SpecifierOpt *enc_stats_post_fmt; + int nb_enc_stats_post_fmt; + SpecifierOpt *mux_stats_fmt; + int nb_mux_stats_fmt; +} OptionsContext; + +typedef struct InputFilter { + AVFilterContext *filter; + struct InputStream *ist; + struct FilterGraph *graph; + uint8_t *name; + enum AVMediaType type; // AVMEDIA_TYPE_SUBTITLE for sub2video + + AVFifo *frame_queue; + + // parameters configured for this input + int format; + + int width, height; + AVRational sample_aspect_ratio; + + int sample_rate; + AVChannelLayout ch_layout; + + AVBufferRef *hw_frames_ctx; + int32_t *displaymatrix; + + int eof; +} InputFilter; + +typedef struct OutputFilter { + AVFilterContext *filter; + struct OutputStream *ost; + struct FilterGraph *graph; + uint8_t *name; + + /* temporary storage until stream maps are processed */ + AVFilterInOut *out_tmp; + enum AVMediaType type; + + /* desired output stream properties */ + int width, height; + AVRational frame_rate; + int format; + int sample_rate; + AVChannelLayout ch_layout; + + // those are only set if no format is specified and the encoder gives us multiple options + // They point directly to the relevant lists of the encoder. + const int *formats; + const AVChannelLayout *ch_layouts; + const int *sample_rates; +} OutputFilter; + +typedef struct FilterGraph { + int index; + const char *graph_desc; + + AVFilterGraph *graph; + int reconfiguration; + // true when the filtergraph contains only meta filters + // that do not modify the frame data + int is_meta; + + InputFilter **inputs; + int nb_inputs; + OutputFilter **outputs; + int nb_outputs; +} FilterGraph; + +typedef struct InputStream { + int file_index; + AVStream *st; + int discard; /* true if stream data should be discarded */ + int user_set_discard; + int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ +#define DECODING_FOR_OST 1 +#define DECODING_FOR_FILTER 2 + int processing_needed; /* non zero if the packets must be processed */ + // should attach FrameData as opaque_ref after decoding + int want_frame_data; + + /** + * Codec parameters - to be used by the decoding/streamcopy code. + * st->codecpar should not be accessed, because it may be modified + * concurrently by the demuxing thread. + */ + AVCodecParameters *par; + AVCodecContext *dec_ctx; + const AVCodec *dec; + AVFrame *decoded_frame; + AVPacket *pkt; + + AVRational framerate_guessed; + + int64_t prev_pkt_pts; + int64_t start; /* time when read started */ + /* predicted dts of the next packet read for this stream or (when there are + * several frames in a packet) of the next frame in current packet (in AV_TIME_BASE units) */ + int64_t next_dts; + int64_t first_dts; ///< dts of the first packet read for this stream (in AV_TIME_BASE units) + int64_t dts; ///< dts of the last packet read for this stream (in AV_TIME_BASE units) + + int64_t next_pts; ///< synthetic pts for the next decode frame (in AV_TIME_BASE units) + int64_t pts; ///< current pts of the decoded frame (in AV_TIME_BASE units) + int wrap_correction_done; + + // the value of AVCodecParserContext.repeat_pict from the AVStream parser + // for the last packet returned from ifile_get_packet() + // -1 if unknown + // FIXME: this is a hack, the avstream parser should not be used + int last_pkt_repeat_pict; + + int64_t filter_in_rescale_delta_last; + + int64_t min_pts; /* pts with the smallest value in a current stream */ + int64_t max_pts; /* pts with the higher value in a current stream */ + + // when forcing constant input framerate through -r, + // this contains the pts that will be given to the next decoded frame + int64_t cfr_next_pts; + + int64_t nb_samples; /* number of samples in the last decoded audio frame before looping */ + + double ts_scale; + int saw_first_ts; + AVDictionary *decoder_opts; + AVRational framerate; /* framerate forced with -r */ + int top_field_first; + int guess_layout_max; + + int autorotate; + + int fix_sub_duration; + struct { /* previous decoded subtitle and related variables */ + int got_output; + int ret; + AVSubtitle subtitle; + } prev_sub; + + struct sub2video { + int64_t last_pts; + int64_t end_pts; + AVFifo *sub_queue; ///< queue of AVSubtitle* before filter init + AVFrame *frame; + int w, h; + unsigned int initialize; ///< marks if sub2video_update should force an initialization + } sub2video; + + /* decoded data from this stream goes into all those filters + * currently video and audio only */ + InputFilter **filters; + int nb_filters; + + int reinit_filters; + + /* hwaccel options */ + enum HWAccelID hwaccel_id; + enum AVHWDeviceType hwaccel_device_type; + char *hwaccel_device; + enum AVPixelFormat hwaccel_output_format; + + int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame); + enum AVPixelFormat hwaccel_pix_fmt; + + /* stats */ + // combined size of all the packets read + uint64_t data_size; + /* number of packets successfully read for this stream */ + uint64_t nb_packets; + // number of frames/samples retrieved from the decoder + uint64_t frames_decoded; + uint64_t samples_decoded; + + int64_t *dts_buffer; + int nb_dts_buffer; + + int got_output; +} InputStream; + +typedef struct LastFrameDuration { + int stream_idx; + int64_t duration; +} LastFrameDuration; + +typedef struct InputFile { + int index; + + AVFormatContext *ctx; + int eof_reached; /* true if eof reached */ + int eagain; /* true if last read attempt returned EAGAIN */ + int64_t input_ts_offset; + int input_sync_ref; + /** + * Effective format start time based on enabled streams. + */ + int64_t start_time_effective; + int64_t ts_offset; + /** + * Extra timestamp offset added by discontinuity handling. + */ + int64_t ts_offset_discont; + int64_t last_ts; + int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */ + int64_t recording_time; + + /* streams that ffmpeg is aware of; + * there may be extra streams in ctx that are not mapped to an InputStream + * if new streams appear dynamically during demuxing */ + InputStream **streams; + int nb_streams; + + int rate_emu; + float readrate; + int accurate_seek; + + /* when looping the input file, this queue is used by decoders to report + * the last frame duration back to the demuxer thread */ + AVThreadMessageQueue *audio_duration_queue; + int audio_duration_queue_size; +} InputFile; + +enum forced_keyframes_const { + FKF_N, + FKF_N_FORCED, + FKF_PREV_FORCED_N, + FKF_PREV_FORCED_T, + FKF_T, + FKF_NB +}; + +#define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0) +#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1) + +enum EncStatsType { + ENC_STATS_LITERAL = 0, + ENC_STATS_FILE_IDX, + ENC_STATS_STREAM_IDX, + ENC_STATS_FRAME_NUM, + ENC_STATS_FRAME_NUM_IN, + ENC_STATS_TIMEBASE, + ENC_STATS_TIMEBASE_IN, + ENC_STATS_PTS, + ENC_STATS_PTS_TIME, + ENC_STATS_PTS_IN, + ENC_STATS_PTS_TIME_IN, + ENC_STATS_DTS, + ENC_STATS_DTS_TIME, + ENC_STATS_SAMPLE_NUM, + ENC_STATS_NB_SAMPLES, + ENC_STATS_PKT_SIZE, + ENC_STATS_BITRATE, + ENC_STATS_AVG_BITRATE, +}; + +typedef struct EncStatsComponent { + enum EncStatsType type; + + uint8_t *str; + size_t str_len; +} EncStatsComponent; + +typedef struct EncStats { + EncStatsComponent *components; + int nb_components; + + AVIOContext *io; +} EncStats; + +extern const char *const forced_keyframes_const_names[]; + +typedef enum { + ENCODER_FINISHED = 1, + MUXER_FINISHED = 2, +} OSTFinished ; + +enum { + KF_FORCE_SOURCE = 1, + KF_FORCE_SOURCE_NO_DROP = 2, +}; + +typedef struct KeyframeForceCtx { + int type; + + int64_t ref_pts; + + // timestamps of the forced keyframes, in AV_TIME_BASE_Q + int64_t *pts; + int nb_pts; + int index; + + AVExpr *pexpr; + double expr_const_values[FKF_NB]; + + int dropped_keyframe; +} KeyframeForceCtx; + +typedef struct OutputStream { + const AVClass *clazz; + + int file_index; /* file index */ + int index; /* stream index in the output file */ + + /* input stream that is the source for this output stream; + * may be NULL for streams with no well-defined source, e.g. + * attachments or outputs from complex filtergraphs */ + InputStream *ist; + + AVStream *st; /* stream in the output file */ + /* number of frames emitted by the video-encoding sync code */ + int64_t vsync_frame_number; + /* predicted pts of the next frame to be encoded + * audio/video encoding only */ + int64_t next_pts; + /* dts of the last packet sent to the muxing queue, in AV_TIME_BASE_Q */ + int64_t last_mux_dts; + /* pts of the last frame received from the filters, in AV_TIME_BASE_Q */ + int64_t last_filter_pts; + + // timestamp from which the streamcopied streams should start, + // in AV_TIME_BASE_Q; + // everything before it should be discarded + int64_t ts_copy_start; + + // the timebase of the packets sent to the muxer + AVRational mux_timebase; + AVRational enc_timebase; + + AVCodecContext *enc_ctx; + AVFrame *filtered_frame; + AVFrame *last_frame; + AVFrame *sq_frame; + AVPacket *pkt; + int64_t last_dropped; + int64_t last_nb0_frames[3]; + + /* video only */ + AVRational frame_rate; + AVRational max_frame_rate; + enum VideoSyncMethod vsync_method; + int is_cfr; + int force_fps; + int top_field_first; +#if FFMPEG_ROTATION_METADATA + int rotate_overridden; +#endif + int autoscale; + int bitexact; + int bits_per_raw_sample; +#if FFMPEG_ROTATION_METADATA + double rotate_override_value; +#endif + + AVRational frame_aspect_ratio; + + KeyframeForceCtx kf; + + /* audio only */ +#if FFMPEG_OPT_MAP_CHANNEL + int *audio_channels_map; /* list of the channels id to pick from the source stream */ + int audio_channels_mapped; /* number of channels in audio_channels_map */ +#endif + + char *logfile_prefix; + FILE *logfile; + + OutputFilter *filter; + char *avfilter; + char *filters; ///< filtergraph associated to the -filter option + char *filters_script; ///< filtergraph script associated to the -filter_script option + + AVDictionary *encoder_opts; + AVDictionary *sws_dict; + AVDictionary *swr_opts; + char *apad; + OSTFinished finished; /* no more packets should be written for this stream */ + int unavailable; /* true if the steram is unavailable (possibly temporarily) */ + + // init_output_stream() has been called for this stream + // The encoder and the bitstream filters have been initialized and the stream + // parameters are set in the AVStream. + int initialized; + + int inputs_done; + + const char *attachment_filename; + int streamcopy_started; + int copy_initial_nonkeyframes; + int copy_prior_start; + + int keep_pix_fmt; + + /* stats */ + // combined size of all the packets sent to the muxer + uint64_t data_size_mux; + // combined size of all the packets received from the encoder + uint64_t data_size_enc; + // number of packets send to the muxer + atomic_uint_least64_t packets_written; + // number of frames/samples sent to the encoder + uint64_t frames_encoded; + uint64_t samples_encoded; + // number of packets received from the encoder + uint64_t packets_encoded; + + /* packet quality factor */ + int quality; + + /* packet picture type */ + int pict_type; + + /* frame encode sum of squared error values */ + int64_t error[4]; + + int sq_idx_encode; + int sq_idx_mux; + + EncStats enc_stats_pre; + EncStats enc_stats_post; + + /* + * bool on whether this stream should be utilized for splitting + * subtitles utilizing fix_sub_duration at random access points. + */ + unsigned int fix_sub_duration_heartbeat; +} OutputStream; + +typedef struct OutputFile { + const AVClass *clazz; + + int index; + + const AVOutputFormat *format; + const char *url; + + OutputStream **streams; + int nb_streams; + + SyncQueue *sq_encode; + + int64_t recording_time; ///< desired length of the resulting file in microseconds == AV_TIME_BASE units + int64_t start_time; ///< start time in microseconds == AV_TIME_BASE units + + int shortest; + int bitexact; +} OutputFile; + +extern __thread InputFile **input_files; +extern __thread int nb_input_files; + +extern __thread OutputFile **output_files; +extern __thread int nb_output_files; + +extern __thread FilterGraph **filtergraphs; +extern __thread int nb_filtergraphs; + +extern __thread char *vstats_filename; +extern __thread char *sdp_filename; + +extern __thread float audio_drift_threshold; +extern __thread float dts_delta_threshold; +extern __thread float dts_error_threshold; + +extern __thread enum VideoSyncMethod video_sync_method; +extern __thread float frame_drop_threshold; +extern __thread int do_benchmark; +extern __thread int do_benchmark_all; +extern __thread int do_hex_dump; +extern __thread int do_pkt_dump; +extern __thread int copy_ts; +extern __thread int start_at_zero; +extern __thread int copy_tb; +extern __thread int debug_ts; +extern __thread int exit_on_error; +extern __thread int abort_on_flags; +extern __thread int print_stats; +extern __thread int64_t stats_period; +extern __thread int qp_hist; +extern __thread int stdin_interaction; +extern __thread AVIOContext *progress_avio; +extern __thread float max_error_rate; + +extern __thread char *filter_nbthreads; +extern __thread int filter_complex_nbthreads; +extern __thread int vstats_version; +extern __thread int auto_conversion_filters; + +extern __thread const AVIOInterruptCB int_cb; + +extern __thread HWDevice *filter_hw_device; + +extern __thread unsigned nb_output_dumped; +extern __thread int main_ffmpeg_return_code; + +extern __thread int ignore_unknown_streams; +extern __thread int copy_unknown_streams; + +extern __thread int recast_media; + +#if FFMPEG_OPT_PSNR +extern __thread int do_psnr; +#endif + +void term_init(void); +void term_exit(void); + +void show_usage(void); + +void remove_avoptions(AVDictionary **a, AVDictionary *b); +void assert_avoptions(AVDictionary *m); + +void assert_file_overwrite(const char *filename); +char *file_read(const char *filename); +AVDictionary *strip_specifiers(const AVDictionary *dict); +const AVCodec *find_codec_or_die(void *logctx, const char *name, + enum AVMediaType type, int encoder); +int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global); + +int configure_filtergraph(FilterGraph *fg); +void check_filter_outputs(void); +int filtergraph_is_simple(FilterGraph *fg); +int init_simple_filtergraph(InputStream *ist, OutputStream *ost); +int init_complex_filtergraph(FilterGraph *fg); + +void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub); + +int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); + +int ffmpeg_parse_options(int argc, char **argv); + +void enc_stats_write(OutputStream *ost, EncStats *es, + const AVFrame *frame, const AVPacket *pkt, + uint64_t frame_num); + +HWDevice *hw_device_get_by_name(const char *name); +int hw_device_init_from_string(const char *arg, HWDevice **dev); +void hw_device_free_all(void); + +int hw_device_setup_for_decode(InputStream *ist); +int hw_device_setup_for_encode(OutputStream *ost); +int hw_device_setup_for_filter(FilterGraph *fg); + +int hwaccel_decode_init(AVCodecContext *avctx); + +/* + * Initialize muxing state for the given stream, should be called + * after the codec/streamcopy setup has been done. + * + * Open the muxer once all the streams have been initialized. + */ +int of_stream_init(OutputFile *of, OutputStream *ost); +int of_write_trailer(OutputFile *of); +int of_open(const OptionsContext *o, const char *filename); +void of_close(OutputFile **pof); + +void of_enc_stats_close(void); + +/* + * Send a single packet to the output, applying any bitstream filters + * associated with the output stream. This may result in any number + * of packets actually being written, depending on what bitstream + * filters are applied. The supplied packet is consumed and will be + * blank (as if newly-allocated) when this function returns. + * + * If eof is set, instead indicate EOF to all bitstream filters and + * therefore flush any delayed packets to the output. A blank packet + * must be supplied in this case. + */ +void of_output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof); +int64_t of_filesize(OutputFile *of); + +int ifile_open(const OptionsContext *o, const char *filename); +void ifile_close(InputFile **f); + +/** + * Get next input packet from the demuxer. + * + * @param pkt the packet is written here when this function returns 0 + * @return + * - 0 when a packet has been read successfully + * - 1 when stream end was reached, but the stream is looped; + * caller should flush decoders and read from this demuxer again + * - a negative error code on failure + */ +int ifile_get_packet(InputFile *f, AVPacket **pkt); + +/* iterate over all input streams in all input files; + * pass NULL to start iteration */ +InputStream *ist_iter(InputStream *prev); + +extern const char * const opt_name_codec_names[]; +extern const char * const opt_name_codec_tags[]; +extern const char * const opt_name_frame_rates[]; +extern const char * const opt_name_top_field_first[]; + +void set_report_callback(void (*callback)(int, float, float, int64_t, double, double, double)); +void cancel_operation(long id); + +#endif /* FFTOOLS_FFMPEG_H */ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg_mux.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg_mux.h new file mode 100644 index 0000000..c1c7abd --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_ffmpeg_mux.h @@ -0,0 +1,165 @@ +/* + * Muxer internal APIs - should not be included outside of ffmpeg_mux* + * Copyright (c) 2023 ARTHENICA LTD + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of ffmpeg_mux.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop ffmpeg-kit library. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + * - fftools header names updated + * - want_sdp made thread-local + * - EncStatsFile declaration migrated from ffmpeg_mux_init.c + * - WARN_MULTIPLE_OPT_USAGE, MATCH_PER_STREAM_OPT, MATCH_PER_TYPE_OPT, SPECIFIER_OPT_FMT declarations migrated from + * ffmpeg.h + * - ms_from_ost migrated to ffmpeg_mux.c + */ + +#ifndef FFTOOLS_FFMPEG_MUX_H +#define FFTOOLS_FFMPEG_MUX_H + +#include +#include + +#include "fftools_thread_queue.h" + +#include "libavformat/avformat.h" + +#include "libavcodec/packet.h" + +#include "libavutil/dict.h" +#include "libavutil/fifo.h" +#include "libavutil/thread.h" + +#define SPECIFIER_OPT_FMT_str "%s" +#define SPECIFIER_OPT_FMT_i "%i" +#define SPECIFIER_OPT_FMT_i64 "%"PRId64 +#define SPECIFIER_OPT_FMT_ui64 "%"PRIu64 +#define SPECIFIER_OPT_FMT_f "%f" +#define SPECIFIER_OPT_FMT_dbl "%lf" + +#define WARN_MULTIPLE_OPT_USAGE(name, type, so, st)\ +{\ + char namestr[128] = "";\ + const char *spec = so->specifier && so->specifier[0] ? so->specifier : "";\ + for (int _i = 0; opt_name_##name[_i]; _i++)\ + av_strlcatf(namestr, sizeof(namestr), "-%s%s", opt_name_##name[_i], opt_name_##name[_i+1] ? (opt_name_##name[_i+2] ? ", " : " or ") : "");\ + av_log(NULL, AV_LOG_WARNING, "Multiple %s options specified for stream %d, only the last option '-%s%s%s "SPECIFIER_OPT_FMT_##type"' will be used.\n",\ + namestr, st->index, opt_name_##name[0], spec[0] ? ":" : "", spec, so->u.type);\ +} + +#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\ +{\ + int _ret, _matches = 0;\ + SpecifierOpt *so;\ + for (int _i = 0; _i < o->nb_ ## name; _i++) {\ + char *spec = o->name[_i].specifier;\ + if ((_ret = check_stream_specifier(fmtctx, st, spec)) > 0) {\ + outvar = o->name[_i].u.type;\ + so = &o->name[_i];\ + _matches++;\ + } else if (_ret < 0)\ + exit_program(1);\ + }\ + if (_matches > 1)\ + WARN_MULTIPLE_OPT_USAGE(name, type, so, st);\ +} + +#define MATCH_PER_TYPE_OPT(name, type, outvar, fmtctx, mediatype)\ +{\ + int i;\ + for (i = 0; i < o->nb_ ## name; i++) {\ + char *spec = o->name[i].specifier;\ + if (!strcmp(spec, mediatype))\ + outvar = o->name[i].u.type;\ + }\ +} + +typedef struct MuxStream { + OutputStream ost; + + // name used for logging + char log_name[32]; + + /* the packets are buffered here until the muxer is ready to be initialized */ + AVFifo *muxing_queue; + + AVBSFContext *bsf_ctx; + + EncStats stats; + + int64_t max_frames; + + /* + * The size of the AVPackets' buffers in queue. + * Updated when a packet is either pushed or pulled from the queue. + */ + size_t muxing_queue_data_size; + + int max_muxing_queue_size; + + /* Threshold after which max_muxing_queue_size will be in effect */ + size_t muxing_queue_data_threshold; + + /* dts of the last packet sent to the muxer, in the stream timebase + * used for making up missing dts values */ + int64_t last_mux_dts; +} MuxStream; + +typedef struct Muxer { + OutputFile of; + + // name used for logging + char log_name[32]; + + AVFormatContext *fc; + + pthread_t thread; + ThreadQueue *tq; + + AVDictionary *opts; + + int thread_queue_size; + + /* filesize limit expressed in bytes */ + int64_t limit_filesize; + atomic_int_least64_t last_filesize; + int header_written; + + SyncQueue *sq_mux; + AVPacket *sq_pkt; +} Muxer; + +typedef struct EncStatsFile { + char *path; + AVIOContext *io; +} EncStatsFile; + +/* whether we want to print an SDP, set in of_open() */ +extern __thread int want_sdp; + +int mux_check_init(Muxer *mux); + +#endif /* FFTOOLS_FFMPEG_MUX_H */ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_fopen_utf8.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_fopen_utf8.h new file mode 100644 index 0000000..c0b6b43 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_fopen_utf8.h @@ -0,0 +1,79 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of fopen_utf8.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop the ffmpeg-kit library. + * + * ffmpeg-kit changes by Taner Sener + */ + +#ifndef FFTOOLS_FOPEN_UTF8_H +#define FFTOOLS_FOPEN_UTF8_H + +#include + +/* The fopen_utf8 function here is essentially equivalent to avpriv_fopen_utf8, + * except that it doesn't set O_CLOEXEC, and that it isn't exported + * from a different library. (On Windows, each DLL might use a different + * CRT, and FILE* handles can't be shared across them.) */ + +#ifdef _WIN32 +#include "libavutil/wchar_filename.h" + +static inline FILE *fopen_utf8(const char *path_utf8, const char *mode) +{ + wchar_t *path_w, *mode_w; + FILE *f; + + /* convert UTF-8 to wide chars */ + if (get_extended_win32_path(path_utf8, &path_w)) /* This sets errno on error. */ + return NULL; + if (!path_w) + goto fallback; + + if (utf8towchar(mode, &mode_w)) + return NULL; + if (!mode_w) { + /* If failing to interpret the mode string as utf8, it is an invalid + * parameter. */ + av_freep(&path_w); + errno = EINVAL; + return NULL; + } + + f = _wfopen(path_w, mode_w); + av_freep(&path_w); + av_freep(&mode_w); + + return f; +fallback: + /* path may be in CP_ACP */ + return fopen(path_utf8, mode); +} + +#else + +static inline FILE *fopen_utf8(const char *path, const char *mode) +{ + return fopen(path, mode); +} +#endif + +#endif /* FFTOOLS_FOPEN_UTF8_H */ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_objpool.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_objpool.h new file mode 100644 index 0000000..29cf2b0 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_objpool.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * Copyright (c) 2023 ARTHENICA LTD + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of objpool.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop ffmpeg-kit library. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + */ + +#ifndef FFTOOLS_OBJPOOL_H +#define FFTOOLS_OBJPOOL_H + +typedef struct ObjPool ObjPool; + +typedef void* (*ObjPoolCBAlloc)(void); +typedef void (*ObjPoolCBReset)(void *); +typedef void (*ObjPoolCBFree)(void **); + +void objpool_free(ObjPool **op); +ObjPool *objpool_alloc(ObjPoolCBAlloc cb_alloc, ObjPoolCBReset cb_reset, + ObjPoolCBFree cb_free); +ObjPool *objpool_alloc_packets(void); +ObjPool *objpool_alloc_frames(void); + +int objpool_get(ObjPool *op, void **obj); +void objpool_release(ObjPool *op, void **obj); + +#endif // FFTOOLS_OBJPOOL_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_opt_common.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_opt_common.h new file mode 100644 index 0000000..1b466cb --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_opt_common.h @@ -0,0 +1,202 @@ +/* + * Option handlers shared between the tools. + * Copyright (c) 2022 Taner Sener + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of opt_common.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop the ffmpeg-kit library. + * + * ffmpeg-kit changes by Taner Sener + * + * 09.2022 + * -------------------------------------------------------- + * - CMDUTILS_COMMON_OPTIONS and CMDUTILS_COMMON_OPTIONS_AVDEVICE defines dropped + * - fftools_ prefix added to fftools headers + */ + +#ifndef FFTOOLS_OPT_COMMON_H +#define FFTOOLS_OPT_COMMON_H + +#include "config.h" + +#include "fftools_cmdutils.h" + +#if CONFIG_AVDEVICE +/** + * Print a listing containing autodetected sinks of the output device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sinks(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing autodetected sources of the input device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sources(void *optctx, const char *opt, const char *arg); +#endif + +/** + * Print the license of the program to stdout. The license depends on + * the license of the libraries compiled into the program. + * This option processing function does not utilize the arguments. + */ +int show_license(void *optctx, const char *opt, const char *arg); + +/** + * Generic -h handler common to all fftools. + */ +int show_help(void *optctx, const char *opt, const char *arg); + +/** + * Print the version of the program to stdout. The version message + * depends on the current versions of the repository and of the libav* + * libraries. + * This option processing function does not utilize the arguments. + */ +int show_version(void *optctx, const char *opt, const char *arg); + +/** + * Print the build configuration of the program to stdout. The contents + * depend on the definition of FFMPEG_CONFIGURATION. + * This option processing function does not utilize the arguments. + */ +int show_buildconf(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the formats supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_formats(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the muxers supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_muxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the demuxer supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_demuxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the devices supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_devices(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the codecs supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_codecs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the decoders supported by the + * program. + */ +int show_decoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the encoders supported by the + * program. + */ +int show_encoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the bit stream filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_bsfs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the protocols supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_protocols(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_filters(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the pixel formats supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_pix_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the standard channel layouts supported by + * the program. + * This option processing function does not utilize the arguments. + */ +int show_layouts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the sample formats supported by the + * program. + */ +int show_sample_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all supported stream dispositions. + */ +int show_dispositions(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the color names and values recognized + * by the program. + */ +int show_colors(void *optctx, const char *opt, const char *arg); + +/** + * Set the libav* libraries log level. + */ +int opt_loglevel(void *optctx, const char *opt, const char *arg); + +int opt_report(void *optctx, const char *opt, const char *arg); +int init_report(const char *env, FILE **file); + +int opt_max_alloc(void *optctx, const char *opt, const char *arg); + +/** + * Override the cpuflags. + */ +int opt_cpuflags(void *optctx, const char *opt, const char *arg); + +/** + * Override the cpucount. + */ +int opt_cpucount(void *optctx, const char *opt, const char *arg); + +#endif /* FFTOOLS_OPT_COMMON_H */ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_sync_queue.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_sync_queue.h new file mode 100644 index 0000000..0fd7b3c --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_sync_queue.h @@ -0,0 +1,122 @@ +/* + * This file is part of FFmpeg. + * Copyright (c) 2023 ARTHENICA LTD + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of sync_queue.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop ffmpeg-kit library. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + */ + +#ifndef FFTOOLS_SYNC_QUEUE_H +#define FFTOOLS_SYNC_QUEUE_H + +#include + +#include "libavcodec/packet.h" + +#include "libavutil/frame.h" + +enum SyncQueueType { + SYNC_QUEUE_PACKETS, + SYNC_QUEUE_FRAMES, +}; + +typedef union SyncQueueFrame { + AVFrame *f; + AVPacket *p; +} SyncQueueFrame; + +#define SQFRAME(frame) ((SyncQueueFrame){ .f = (frame) }) +#define SQPKT(pkt) ((SyncQueueFrame){ .p = (pkt) }) + +typedef struct SyncQueue SyncQueue; + +/** + * Allocate a sync queue of the given type. + * + * @param buf_size_us maximum duration that will be buffered in microseconds + */ +SyncQueue *sq_alloc(enum SyncQueueType type, int64_t buf_size_us); +void sq_free(SyncQueue **sq); + +/** + * Add a new stream to the sync queue. + * + * @param limiting whether the stream is limiting, i.e. no other stream can be + * longer than this one + * @return + * - a non-negative stream index on success + * - a negative error code on error + */ +int sq_add_stream(SyncQueue *sq, int limiting); + +/** + * Set the timebase for the stream with index stream_idx. Should be called + * before sending any frames for this stream. + */ +void sq_set_tb(SyncQueue *sq, unsigned int stream_idx, AVRational tb); + +/** + * Limit the number of output frames for stream with index stream_idx + * to max_frames. + */ +void sq_limit_frames(SyncQueue *sq, unsigned int stream_idx, + uint64_t max_frames); + +/** + * Submit a frame for the stream with index stream_idx. + * + * On success, the sync queue takes ownership of the frame and will reset the + * contents of the supplied frame. On failure, the frame remains owned by the + * caller. + * + * Sending a frame with NULL contents marks the stream as finished. + * + * @return + * - 0 on success + * - AVERROR_EOF when no more frames should be submitted for this stream + * - another a negative error code on failure + */ +int sq_send(SyncQueue *sq, unsigned int stream_idx, SyncQueueFrame frame); + +/** + * Read a frame from the queue. + * + * @param stream_idx index of the stream to read a frame for. May be -1, then + * try to read a frame from any stream that is ready for + * output. + * @param frame output frame will be written here on success. The frame is owned + * by the caller. + * + * @return + * - a non-negative index of the stream to which the returned frame belongs + * - AVERROR(EAGAIN) when more frames need to be submitted to the queue + * - AVERROR_EOF when no more frames will be available for this stream (for any + * stream if stream_idx is -1) + * - another negative error code on failure + */ +int sq_receive(SyncQueue *sq, int stream_idx, SyncQueueFrame frame); + +#endif // FFTOOLS_SYNC_QUEUE_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_thread_queue.h b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_thread_queue.h new file mode 100644 index 0000000..b8736dd --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Headers/fftools_thread_queue.h @@ -0,0 +1,94 @@ +/* + * This file is part of FFmpeg. + * Copyright (c) 2023 ARTHENICA LTD + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This file is the modified version of thread_queue.h file living in ffmpeg source code under the fftools folder. We + * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied + * by us to develop ffmpeg-kit library. + * + * ffmpeg-kit changes by ARTHENICA LTD + * + * 07.2023 + * -------------------------------------------------------- + * - FFmpeg 6.0 changes migrated + */ + +#ifndef FFTOOLS_THREAD_QUEUE_H +#define FFTOOLS_THREAD_QUEUE_H + +#include + +#include "fftools_objpool.h" + +typedef struct ThreadQueue ThreadQueue; + +/** + * Allocate a queue for sending data between threads. + * + * @param nb_streams number of streams for which a distinct EOF state is + * maintained + * @param queue_size number of items that can be stored in the queue without + * blocking + * @param obj_pool object pool that will be used to allocate items stored in the + * queue; the pool becomes owned by the queue + * @param callback that moves the contents between two data pointers + */ +ThreadQueue *tq_alloc(unsigned int nb_streams, size_t queue_size, + ObjPool *obj_pool, void (*obj_move)(void *dst, void *src)); +void tq_free(ThreadQueue **tq); + +/** + * Send an item for the given stream to the queue. + * + * @param data the item to send, its contents will be moved using the callback + * provided to tq_alloc(); on failure the item will be left + * untouched + * @return + * - 0 the item was successfully sent + * - AVERROR(ENOMEM) could not allocate an item for writing to the FIFO + * - AVERROR(EINVAL) the sending side has previously been marked as finished + * - AVERROR_EOF the receiving side has marked the given stream as finished + */ +int tq_send(ThreadQueue *tq, unsigned int stream_idx, void *data); +/** + * Mark the given stream finished from the sending side. + */ +void tq_send_finish(ThreadQueue *tq, unsigned int stream_idx); + +/** + * Read the next item from the queue. + * + * @param stream_idx the index of the stream that was processed or -1 will be + * written here + * @param data the data item will be written here on success using the + * callback provided to tq_alloc() + * @return + * - 0 a data item was successfully read; *stream_idx contains a non-negative + * stream index + * - AVERROR_EOF When *stream_idx is non-negative, this signals that the sending + * side has marked the given stream as finished. This will happen at most once + * for each stream. When *stream_idx is -1, all streams are done. + */ +int tq_receive(ThreadQueue *tq, int *stream_idx, void *data); +/** + * Mark the given stream finished from the receiving side. + */ +void tq_receive_finish(ThreadQueue *tq, unsigned int stream_idx); + +#endif // FFTOOLS_THREAD_QUEUE_H diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Info.plist b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Info.plist new file mode 100644 index 0000000..8484f07 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ffmpegkit + CFBundleIdentifier + com.arthenica.ffmpegkit.FFmpegKit + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ffmpegkit + CFBundlePackageType + FMWK + CFBundleShortVersionString + 6.0 + CFBundleVersion + 6.0 + CFBundleSignature + ???? + MinimumOSVersion + 12.1 + CFBundleSupportedPlatforms + + iPhoneOS + + NSPrincipalClass + + + diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/LICENSE b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/LICENSE new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Modules/module.modulemap b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Modules/module.modulemap new file mode 100644 index 0000000..0144b24 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/Modules/module.modulemap @@ -0,0 +1,32 @@ +framework module ffmpegkit { + + header "AbstractSession.h" + header "ArchDetect.h" + header "AtomicLong.h" + header "Chapter.h" + header "FFmpegKit.h" + header "FFmpegKitConfig.h" + header "FFmpegSession.h" + header "FFmpegSessionCompleteCallback.h" + header "FFprobeKit.h" + header "FFprobeSession.h" + header "FFprobeSessionCompleteCallback.h" + header "Level.h" + header "Log.h" + header "LogCallback.h" + header "LogRedirectionStrategy.h" + header "MediaInformation.h" + header "MediaInformationJsonParser.h" + header "MediaInformationSession.h" + header "MediaInformationSessionCompleteCallback.h" + header "Packages.h" + header "ReturnCode.h" + header "Session.h" + header "SessionState.h" + header "Statistics.h" + header "StatisticsCallback.h" + header "StreamInformation.h" + header "ffmpegkit_exception.h" + + export * +} diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/SOURCE b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/SOURCE new file mode 100644 index 0000000..96a425d --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/SOURCE @@ -0,0 +1,14 @@ +The source code of "FFmpegKit", "FFmpeg" and external libraries enabled within +"FFmpeg" for this release can be downloaded from +https://github.com/arthenica/ffmpeg-kit/wiki/Source page. + +If you want to receive the source code on physical media submit your request +to "open-source@arthenica.com" email address. + +Your request should include "FFmpegKit" version, "FFmpegKit" platform, your +name, your company name, your mailing address, the phone number and the date +you started using "FFmpegKit". + +Note that we may charge you a fee to cover physical media printing and +shipping costs. Your request must be sent within the first three years of the +date you received "FFmpegKit" with "GPL v3.0" license. diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/ffmpegkit b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/ffmpegkit new file mode 100755 index 0000000..c95627e Binary files /dev/null and b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/ffmpegkit differ diff --git a/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/strip-frameworks.sh b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/strip-frameworks.sh new file mode 100755 index 0000000..2c23237 --- /dev/null +++ b/ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/strip-frameworks.sh @@ -0,0 +1,62 @@ +################################################################################ +# +# Copyright 2015 Realm Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +# This script strips all non-valid architectures from dynamic libraries in +# the application's `Frameworks` directory. +# +# The following environment variables are required: +# +# BUILT_PRODUCTS_DIR +# FRAMEWORKS_FOLDER_PATH +# VALID_ARCHS +# EXPANDED_CODE_SIGN_IDENTITY + + +# Signs a framework with the provided identity +code_sign() { +# Use the current code_sign_identitiy +echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" +echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" +/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" +} + +echo "Stripping frameworks" +cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +for file in $(find . -type f -perm +111); do +# Skip non-dynamic libraries +if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then +continue +fi +# Get architectures for current file +archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)" +stripped="" +for arch in $archs; do +if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then +# Strip non-valid architectures in-place +lipo -remove "$arch" -output "$file" "$file" || exit 1 +stripped="$stripped $arch" +fi +done +if [[ "$stripped" != "" ]]; then +echo "Stripped $file of architectures:$stripped" +if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then +code_sign "${file}" +fi +fi +done diff --git a/ios.sh b/ios.sh index 17ed291..7c3bc93 100755 --- a/ios.sh +++ b/ios.sh @@ -1,5 +1,8 @@ #!/bin/bash +echo "当前使用的sed路径: $(which sed)" +sed --version | head -1 + # CHECK IF XCODE IS INSTALLED if [ ! -x "$(command -v xcrun)" ]; then echo -e "\n(*) xcrun command not found. Please check your Xcode installation\n" diff --git a/ll100-ffmpeg-kit-ios-https.podspec b/ll100-ffmpeg-kit-ios-https.podspec new file mode 100644 index 0000000..8a9cb77 --- /dev/null +++ b/ll100-ffmpeg-kit-ios-https.podspec @@ -0,0 +1,31 @@ +Pod::Spec.new do |s| + s.name = 'ffmpeg-kit-ios-min' + s.version = '6.0.0' # 与编译版本严格对应 + s.summary = 'Minimal FFmpegKit build for iOS' + s.description = <<-DESC + Custom minimal build of FFmpegKit for iOS arm64 architecture. + Contains core ffmpeg libraries without external dependencies. + DESC + s.homepage = 'https://github.com/ZhuYilin10/ffmpeg-kit' + s.license = { + :type => 'LGPL-3.0', + :file => 'ffmpeg-kit-ios-min/ffmpegkit.xcframework/ios-arm64/ffmpegkit.framework/LICENSE' # 确保LICENSE文件存在于此路径 + } + s.author = { 'zhuyl' => 'zhuyl.cn' } + + # 平台配置 + s.platform = :ios + s.ios.deployment_target = '12.1' # 与你的编译目标一致 + s.requires_arc = true + + # 源码配置 + s.source = { + :git => 'https://github.com/ZhuYilin10/ffmpeg-kit.git', + :tag => s.version.to_s + } + + # 框架配置 + s.vendored_frameworks = [ + 'ffmpeg-kit-ios-min/ffmpegkit.xcframework' # 指向xcframework根目录 + ] + end \ No newline at end of file diff --git a/scripts/function.sh b/scripts/function.sh index 06e3565..02afc45 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -2326,11 +2326,7 @@ library_is_installed() { } prepare_inline_sed() { - if [ "$(uname)" == "Darwin" ]; then - export SED_INLINE="sed -i .tmp" - else - export SED_INLINE="sed -i" - fi + export SED_INLINE="/opt/homebrew/opt/gnu-sed/libexec/gnubin/sed -i" } to_capital_case() {