From nobody Thu Apr 27 12:04:24 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q6ZCs1CW8z474PR; Thu, 27 Apr 2023 12:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q6ZCs0L5Tz3mj3; Thu, 27 Apr 2023 12:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682597065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LStmEDpdeM6W8j4q+2P9cPE7MXnXSGYc8N2hkbqPQLM=; b=HN0VTr6BVSTnQ52dP9RBQjsZExpoY7Ih3ZkvbPkwFqJ174E3mp8oUjcntAxktMS4yuKa5+ bupKZw/i/bw1+C8dBHEekJCD9nTt28qKYmkCf4ZIaOcObXBc5o+kIo8a7kIREt84uZsPRB MPgn/tFxj/wUIqAjQe0/dCxzWmU3wVcate2/U3fTyyf1ooIZY1v5GMjdA8ECl1a1SAR5tF MkOL+4pIVSyUDSIdIjls7mYTKzFpdE2L0OJH2AiG6UPqWjTzhEAvgLIZcpC+ghcvWBGEhz r9BNXzwj3fkXLHUv7vRFf/bZgl20OqrpqNnnURmlvL6+nchqsNN6l/EyVKf21A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682597065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LStmEDpdeM6W8j4q+2P9cPE7MXnXSGYc8N2hkbqPQLM=; b=iB5ym3nNIH/SlmyRJ8hxe6OMQiHz7tp2C7a0K5sKS8xtRttcxf9+3W/5nRz53Q6/LXEBb3 2O3pIAuLB+IDmoO6AgoNU4sqLhA+DmZAbD8mZfiEw5nUtVuu+nc2CTGjVDPBGsmdkFUO4B OlR2WSQ3wvtumvEciIZWWkXUiQt+OMeFkLJfd0xLjn/G4MZq1qr27ZeeMSIWuUsjRWQ08z YPsp0gV7sWaMC9YbQHFo40KkKcLS3+sRCehm+3ex7DKNgBPsFHZcMqVWtVjVeNEJDCXXyy Jmaj2X8YOlGr6Y5mSxjTu4z3pMLirReCEsvJZ6Kh3rVSPnNLS2LnB6ixUzzYmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682597065; a=rsa-sha256; cv=none; b=RCmNJQwvpUGWcvqdqA78sG5UbIJx1ZrTchhdaA+oD7Dz5w/ui17iqQ4aH3bAQmg6UU/wj9 h+C9LRKk4HoV9U0cHZGwG1YmLWoJUfi9BAyzcESieIN5jVQ0wYEhT20bHjcLVeq+SQ9MEF ua1PmtQIbEiaE6ZBXNJ8ea6gIr4iiGTTLQm87tsR3XoqPXXgsCxTuD13h6UQZq9v0B5t5h KOfoY82vZvSVqY4mycNRhFfjJZH9HggmWhybl7Wbl2leTbnZ0bzGm7Oc79XYt+OPtIeLu8 6vFeKEjaFfUmCk6NFwwrRYbMiE2aPDKt+VzAjR+CK2TwuDih1Qv50ONZ4qcYhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q6ZCr6WhRzGR0; Thu, 27 Apr 2023 12:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33RC4Oc3046640; Thu, 27 Apr 2023 12:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33RC4OL7046639; Thu, 27 Apr 2023 12:04:24 GMT (envelope-from git) Date: Thu, 27 Apr 2023 12:04:24 GMT Message-Id: <202304271204.33RC4OL7046639@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 390ed23a4df4 - main - multimedia/py-av: Fix build with FFmpeg 6 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 390ed23a4df4b6075f7ae83a6b85f589a5d4b770 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=390ed23a4df4b6075f7ae83a6b85f589a5d4b770 commit 390ed23a4df4b6075f7ae83a6b85f589a5d4b770 Author: Daniel Engberg AuthorDate: 2023-04-27 11:01:59 +0000 Commit: Daniel Engberg CommitDate: 2023-04-27 12:01:45 +0000 multimedia/py-av: Fix build with FFmpeg 6 Backport upstream PR #1110 Reference: https://github.com/PyAV-Org/PyAV/pull/1110 PR: 270310 --- multimedia/py-av/files/patch-git-upstream-PR-1110 | 238 ++++++++++++++++++++++ 1 file changed, 238 insertions(+) diff --git a/multimedia/py-av/files/patch-git-upstream-PR-1110 b/multimedia/py-av/files/patch-git-upstream-PR-1110 new file mode 100644 index 000000000000..fbfa494326e7 --- /dev/null +++ b/multimedia/py-av/files/patch-git-upstream-PR-1110 @@ -0,0 +1,238 @@ +From 8871e13848cbf78615ba7b429d301adc071841ea Mon Sep 17 00:00:00 2001 +From: Mattias Wadman +Date: Tue, 21 Mar 2023 17:01:22 +0100 +Subject: [PATCH] Update to ffmpeg 6.0 + +Removed and renamed constants with entry from API changes +https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/doc/APIchanges + +Remove use of AVCodecContext.sub_text_format + 2021-09-20 - 176b8d785bf - lavc 59.9.100 - avcodec.h + Deprecate AVCodecContext.sub_text_format and the corresponding + AVOptions. It is unused since the last major bump. + +AV_CODEC_CAP_TRUNCATED removed: + 2021-09-20 - dd846bc4a91 - lavc 59.8.100 - avcodec.h codec.h + Deprecate AV_CODEC_FLAG_TRUNCATED and AV_CODEC_CAP_TRUNCATED, + as they are redundant with parsers. + +AV_CODEC_CAP_AUTO_THREADS renamed to AV_CODEC_CAP_AUTO_THREADS + 2021-03-16 - 7d09579190 - lavc 58.132.100 - codec.h + Add AV_CODEC_CAP_OTHER_THREADS as a new name for + AV_CODEC_CAP_AUTO_THREADS. AV_CODEC_CAP_AUTO_THREADS + is now deprecated. + +AV_CODEC_CAP_INTRA_ONLY removed (use AV_CODEC_PROP_INTRA_ONLY instead): +AV_CODEC_CAP_LOSSLESS removed (use AV_CODEC_PROP_LOESSNES instead): + 2020-05-21 - 13b1bbff0b - lavc 58.86.101 - avcodec.h + Deprecated AV_CODEC_CAP_INTRA_ONLY and AV_CODEC_CAP_LOSSLESS. + +AV_CODEC_FLAG_TRUNCATED removed: +AV_CODEC_CAP_TRUNCATED removed: + 2021-09-20 - dd846bc4a91 - lavc 59.8.100 - avcodec.h codec.h + Deprecate AV_CODEC_FLAG_TRUNCATED and AV_CODEC_CAP_TRUNCATED, + as they are redundant with parsers. + +AV_CODEC_FLAG2_DROP_FRAME_TIMECODE removed: + Not API changelog but was removed in f843460eb790d37e444e5946628f228421916537: + avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE + + It has been deprecated in 94d68a4 + and can't be set via AVOptions. The only codecs that use it + (the MPEG-1/2 encoders) have private options for this. + So remove it. + +AVFMT_FLAG_PRIV_OPT removed: + 2021-03-03 - 2ff40b98ec - lavf 58.70.100 - avformat.h + Deprecate AVFMT_FLAG_PRIV_OPT. It will do nothing + as soon as av_demuxer_open() is removed. + +Related to #1106 +--- + av/codec/codec.pyx | 12 ++++-------- + av/codec/context.pyx | 11 ----------- + av/container/core.pyx | 3 --- + include/libavcodec/avcodec.pxd | 10 +--------- + include/libavformat/avformat.pxd | 1 - + scripts/activate.sh | 2 +- + 6 files changed, 6 insertions(+), 33 deletions(-) + +diff --git a/av/codec/codec.pyx b/av/codec/codec.pyx +index ad3198fd..978d4277 100644 +--- av/codec/codec.pyx ++++ av/codec/codec.pyx +@@ -52,7 +52,6 @@ Capabilities = define_enum('Capabilities', 'av.codec', ( + """Codec uses get_buffer() for allocating buffers and supports custom allocators. + If not set, it might not use get_buffer() at all or use operations that + assume the buffer was allocated by avcodec_default_get_buffer."""), +- ('TRUNCATED', lib.AV_CODEC_CAP_TRUNCATED), + ('HWACCEL', 1 << 4), + ('DELAY', lib.AV_CODEC_CAP_DELAY, + """Encoder or decoder requires flushing with NULL input at the end in order to +@@ -102,8 +101,10 @@ Capabilities = define_enum('Capabilities', 'av.codec', ( + """Codec supports slice-based (or partition-based) multithreading."""), + ('PARAM_CHANGE', lib.AV_CODEC_CAP_PARAM_CHANGE, + """Codec supports changed parameters at any point."""), +- ('AUTO_THREADS', lib.AV_CODEC_CAP_AUTO_THREADS, +- """Codec supports avctx->thread_count == 0 (auto)."""), ++ ('AUTO_THREADS', lib.AV_CODEC_CAP_OTHER_THREADS, ++ """Codec supports multithreading through a method other than slice- or ++ frame-level multithreading. Typically this marks wrappers around ++ multithreading-capable external libraries."""), + ('VARIABLE_FRAME_SIZE', lib.AV_CODEC_CAP_VARIABLE_FRAME_SIZE, + """Audio encoder supports receiving a different number of samples in each call."""), + ('AVOID_PROBING', lib.AV_CODEC_CAP_AVOID_PROBING, +@@ -114,10 +115,6 @@ Capabilities = define_enum('Capabilities', 'av.codec', ( + the stream. + A decoder marked with this flag should only be used as last resort + choice for probing."""), +- ('INTRA_ONLY', lib.AV_CODEC_CAP_INTRA_ONLY, +- """Codec is intra only."""), +- ('LOSSLESS', lib.AV_CODEC_CAP_LOSSLESS, +- """Codec is lossless."""), + ('HARDWARE', lib.AV_CODEC_CAP_HARDWARE, + """Codec is backed by a hardware implementation. Typically used to + identify a non-hwaccel hardware decoder. For information about hwaccels, use +@@ -312,7 +309,6 @@ cdef class Codec(object): + + draw_horiz_band = capabilities.flag_property('DRAW_HORIZ_BAND') + dr1 = capabilities.flag_property('DR1') +- truncated = capabilities.flag_property('TRUNCATED') + hwaccel = capabilities.flag_property('HWACCEL') + delay = capabilities.flag_property('DELAY') + small_last_frame = capabilities.flag_property('SMALL_LAST_FRAME') +diff --git a/av/codec/context.pyx b/av/codec/context.pyx +index 5c831461..2cdf7ef5 100644 +--- av/codec/context.pyx ++++ av/codec/context.pyx +@@ -96,9 +96,6 @@ Flags = define_enum('Flags', __name__, ( + """Only decode/encode grayscale."""), + ('PSNR', lib.AV_CODEC_FLAG_PSNR, + """error[?] variables will be set during encoding."""), +- ('TRUNCATED', lib.AV_CODEC_FLAG_TRUNCATED, +- """Input bitstream might be truncated at a random location +- instead of only at frame boundaries."""), + ('INTERLACED_DCT', lib.AV_CODEC_FLAG_INTERLACED_DCT, + """Use interlaced DCT."""), + ('LOW_DELAY', lib.AV_CODEC_FLAG_LOW_DELAY, +@@ -122,8 +119,6 @@ Flags2 = define_enum('Flags2', __name__, ( + """Skip bitstream encoding."""), + ('LOCAL_HEADER', lib.AV_CODEC_FLAG2_LOCAL_HEADER, + """Place global headers at every keyframe instead of in extradata."""), +- ('DROP_FRAME_TIMECODE', lib.AV_CODEC_FLAG2_DROP_FRAME_TIMECODE, +- """Timecode is in drop frame format. DEPRECATED!!!!"""), + ('CHUNKS', lib.AV_CODEC_FLAG2_CHUNKS, + """Input bitstream might be truncated at a packet boundaries + instead of only at frame boundaries."""), +@@ -168,10 +163,6 @@ cdef class CodecContext(object): + self.ptr.thread_count = 0 + self.ptr.thread_type = 2 + +- # Use "ass" format for subtitles (default as of FFmpeg 5.0), not the +- # deprecated "ass_with_timings" formats. +- self.ptr.sub_text_format = 0 +- + def _get_flags(self): + return self.ptr.flags + +@@ -195,7 +186,6 @@ cdef class CodecContext(object): + loop_filter = flags.flag_property('LOOP_FILTER') + gray = flags.flag_property('GRAY') + psnr = flags.flag_property('PSNR') +- truncated = flags.flag_property('TRUNCATED') + interlaced_dct = flags.flag_property('INTERLACED_DCT') + low_delay = flags.flag_property('LOW_DELAY') + global_header = flags.flag_property('GLOBAL_HEADER') +@@ -219,7 +209,6 @@ cdef class CodecContext(object): + fast = flags2.flag_property('FAST') + no_output = flags2.flag_property('NO_OUTPUT') + local_header = flags2.flag_property('LOCAL_HEADER') +- drop_frame_timecode = flags2.flag_property('DROP_FRAME_TIMECODE') + chunks = flags2.flag_property('CHUNKS') + ignore_crop = flags2.flag_property('IGNORE_CROP') + show_all = flags2.flag_property('SHOW_ALL') +diff --git a/av/container/core.pyx b/av/container/core.pyx +index d21893c4..1c5c75b8 100755 +--- av/container/core.pyx ++++ av/container/core.pyx +@@ -157,8 +157,6 @@ Flags = define_enum('Flags', __name__, ( + This flag is mainly intended for testing."""), + ('SORT_DTS', lib.AVFMT_FLAG_SORT_DTS, + "Try to interleave outputted packets by dts (using this flag can slow demuxing down)."), +- ('PRIV_OPT', lib.AVFMT_FLAG_PRIV_OPT, +- "Enable use of private options by delaying codec open (this could be made default once all code is converted)."), + ('FAST_SEEK', lib.AVFMT_FLAG_FAST_SEEK, + "Enable fast, but inaccurate seeks for some formats."), + ('SHORTEST', lib.AVFMT_FLAG_SHORTEST, +@@ -329,7 +327,6 @@ cdef class Container(object): + flush_packets = flags.flag_property('FLUSH_PACKETS') + bit_exact = flags.flag_property('BITEXACT') + sort_dts = flags.flag_property('SORT_DTS') +- priv_opt = flags.flag_property('PRIV_OPT') + fast_seek = flags.flag_property('FAST_SEEK') + shortest = flags.flag_property('SHORTEST') + auto_bsf = flags.flag_property('AUTO_BSF') +diff --git a/include/libavcodec/avcodec.pxd b/include/libavcodec/avcodec.pxd +index 1e611180..0334b18e 100644 +--- include/libavcodec/avcodec.pxd ++++ include/libavcodec/avcodec.pxd +@@ -39,7 +39,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: + cdef enum: + AV_CODEC_CAP_DRAW_HORIZ_BAND + AV_CODEC_CAP_DR1 +- AV_CODEC_CAP_TRUNCATED + # AV_CODEC_CAP_HWACCEL + AV_CODEC_CAP_DELAY + AV_CODEC_CAP_SMALL_LAST_FRAME +@@ -51,11 +50,9 @@ cdef extern from "libavcodec/avcodec.h" nogil: + AV_CODEC_CAP_FRAME_THREADS + AV_CODEC_CAP_SLICE_THREADS + AV_CODEC_CAP_PARAM_CHANGE +- AV_CODEC_CAP_AUTO_THREADS ++ AV_CODEC_CAP_OTHER_THREADS + AV_CODEC_CAP_VARIABLE_FRAME_SIZE + AV_CODEC_CAP_AVOID_PROBING +- AV_CODEC_CAP_INTRA_ONLY +- AV_CODEC_CAP_LOSSLESS + AV_CODEC_CAP_HARDWARE + AV_CODEC_CAP_HYBRID + AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE +@@ -76,7 +73,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: + AV_CODEC_FLAG_LOOP_FILTER + AV_CODEC_FLAG_GRAY + AV_CODEC_FLAG_PSNR +- AV_CODEC_FLAG_TRUNCATED + AV_CODEC_FLAG_INTERLACED_DCT + AV_CODEC_FLAG_LOW_DELAY + AV_CODEC_FLAG_GLOBAL_HEADER +@@ -89,7 +85,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: + AV_CODEC_FLAG2_FAST + AV_CODEC_FLAG2_NO_OUTPUT + AV_CODEC_FLAG2_LOCAL_HEADER +- AV_CODEC_FLAG2_DROP_FRAME_TIMECODE + AV_CODEC_FLAG2_CHUNKS + AV_CODEC_FLAG2_IGNORE_CROP + AV_CODEC_FLAG2_SHOW_ALL +@@ -224,9 +219,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: + int frame_size + int channel_layout + +- # Subtitles. +- int sub_text_format +- + #: .. todo:: ``get_buffer`` is deprecated for get_buffer2 in newer versions of FFmpeg. + int get_buffer(AVCodecContext *ctx, AVFrame *frame) + void release_buffer(AVCodecContext *ctx, AVFrame *frame) +diff --git a/include/libavformat/avformat.pxd b/include/libavformat/avformat.pxd +index ed3e503f..06029d9f 100644 +--- include/libavformat/avformat.pxd ++++ include/libavformat/avformat.pxd +@@ -146,7 +146,6 @@ cdef extern from "libavformat/avformat.h" nogil: + AVFMT_FLAG_FLUSH_PACKETS + AVFMT_FLAG_BITEXACT + AVFMT_FLAG_SORT_DTS +- AVFMT_FLAG_PRIV_OPT + AVFMT_FLAG_FAST_SEEK + AVFMT_FLAG_SHORTEST + AVFMT_FLAG_AUTO_BSF +