From nobody Thu Apr 27 12:04:29 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 4Q6ZCx5qJDz474Nh; Thu, 27 Apr 2023 12:04:29 +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 4Q6ZCx5JCgz3mmV; Thu, 27 Apr 2023 12:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682597069; 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=7lwXnP1L4Y5/Ip43lGYuqz6+m4jq8G2L/32z2zWWsOE=; b=YuQKt/bUdrzfCrEMz21vX6Nx7frJLzQy5fQAwdD+Rtpz8Jvn1KTZ1yehP/84eRstfnL24G SnTVSBKJDRGA9XI5r1/fbR8186RRx9rxBwWwTXt6Xx1eYSvamxyxno4fLsStRuesKBbpV5 7XKW+Lgoq9ZK4LA2An5hy6W+DIDj5y+XVu74t23wrzPMzrlnlk385IYeKAPAQe76BQ0JVa CvheocHksLeclN+bbvHxDs8YLBbG21jYUtcjI2WrIXv9y7LAnihrFfHQBabzcweggG/5iz haIN6kQpOOyUlaIV5hu0xeuN52xBS+PzKf0Ahi8koXHcxiWB3VIKnMcOOq+9EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682597069; 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=7lwXnP1L4Y5/Ip43lGYuqz6+m4jq8G2L/32z2zWWsOE=; b=jzBJ4TaVhQSPIT5KQLMQJ4DitySAByaVcx7LE+4MZZyu0zg1MmYQzuJfLauEV9AMgdQNsi wwlcuhvX5FfTDWmbD6fOWjkXB71RSX7s//DGVx3mJSBUUUTfuO25/UZaIAynXKo+KOo1on wtP8Q5te0X+xkhYzKa+Mc5biihOyCqy/DmSlB+da7LZ877jgzpoNJLIWlZGm0Ld6TCL641 ZmUgNWo65OnVcLM8lTBg+vaZmkJlL8mD/xKeOuosTkEUhyBAUoI01N2K+b/lwpCStLLBSf zbFV3xlsRlOo3EKf61pjIvuHk5doep+z2y7+jxQfF4xSoUeJ2zJwHm0aqPvdlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682597069; a=rsa-sha256; cv=none; b=rRCz1qamn0d0I0nKK6OZYvG9ksTL7K/4Qkt4aAvL1PSwXOx/SxrB63jS7lSToD07veLblv Sk+1e9uLtU6sAhI3DzYZEGG3qsqthM46alk5qRE6X+jmuuHozuDPIllpXNhgeLarG12+YM kEv9vEOw9EsyvcQSvcclcJUO1KGxPCkAXbjsnUXcOSfQN2fegi+1xuzyfDSm0BODizLm4z nhcU6Fewa9MvTnRxH7V12lMUcoR+HDDObFh4AKx2si/MtZctEbsg3wzBDmKPDbq1IAbjgh McOFZCCoAbh0ExLIpiOLF5t0dSSrpHSdo9eDz5Dl/AiO25GMS89r/rz7O9RD3Q== 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 4Q6ZCx3tNHzH3t; Thu, 27 Apr 2023 12:04:29 +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 33RC4T9Y046716; Thu, 27 Apr 2023 12:04:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33RC4TQj046715; Thu, 27 Apr 2023 12:04:29 GMT (envelope-from git) Date: Thu, 27 Apr 2023 12:04:29 GMT Message-Id: <202304271204.33RC4TQj046715@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: 9400fe748054 - main - www/qt5-webengine: Add support for 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: 9400fe7480540a0cdcbc6068fca8d3fc5144322d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=9400fe7480540a0cdcbc6068fca8d3fc5144322d commit 9400fe7480540a0cdcbc6068fca8d3fc5144322d Author: Kai Knoblich AuthorDate: 2023-04-27 11:20:21 +0000 Commit: Daniel Engberg CommitDate: 2023-04-27 12:01:46 +0000 www/qt5-webengine: Add support for FFmpeg 6 Import patches to fix build with FFmpeg 6 PR: 270209 --- .../files/patch-add-support-for-ffmpeg5-and-later | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/www/qt5-webengine/files/patch-add-support-for-ffmpeg5-and-later b/www/qt5-webengine/files/patch-add-support-for-ffmpeg5-and-later new file mode 100644 index 000000000000..de6185aba53d --- /dev/null +++ b/www/qt5-webengine/files/patch-add-support-for-ffmpeg5-and-later @@ -0,0 +1,140 @@ +Adds support for FFmpeg and later + +Obtained from: + +https://github.com/archlinux/svntogit-packages/blob/packages/qt5-webengine/trunk/qt5-webengine-ffmpeg5.patch + +--- src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h +@@ -29,6 +29,7 @@ extern "C" { + #include + #include + #include ++#include + #include + #include + #include +--- src/3rdparty/chromium/media/filters/audio_file_reader.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDecoder() { + } + + bool AudioFileReader::OpenDecoder() { +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (codec) { + // MP3 decodes to S16P which we don't support, tell it to use S16 instead. + if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P) +--- src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioD + } + } + +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || + avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) { + DLOG(ERROR) << "Could not initialize audio decoder: " +--- src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc +@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stre + + // Next try to use the first DTS value, for codecs where we know PTS == DTS + // (excludes all H26x codecs). The start time must be returned in PTS. +- if (stream->first_dts != kNoFFmpegTimestamp && ++ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && + stream->codecpar->codec_id != AV_CODEC_ID_HEVC && + stream->codecpar->codec_id != AV_CODEC_ID_H264 && + stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { + const base::TimeDelta first_pts = +- ConvertFromTimeBase(stream->time_base, stream->first_dts); ++ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); + if (first_pts < start_time) + start_time = first_pts; + } +@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket + scoped_refptr buffer; + + if (type() == DemuxerStream::TEXT) { +- int id_size = 0; ++ size_t id_size = 0; + uint8_t* id_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size); + +- int settings_size = 0; ++ size_t settings_size = 0; + uint8_t* settings_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size); + +@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket + buffer = DecoderBuffer::CopyFrom(packet->data, packet->size, + side_data.data(), side_data.size()); + } else { +- int side_data_size = 0; ++ size_t side_data_size = 0; + uint8_t* side_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); + +@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket + packet->size - data_offset); + } + +- int skip_samples_size = 0; ++ size_t skip_samples_size = 0; + const uint32_t* skip_samples_ptr = + reinterpret_cast(av_packet_get_side_data( + packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); +--- src/3rdparty/chromium/media/filters/ffmpeg_glue.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_glue.cc +@@ -59,7 +59,6 @@ void FFmpegGlue::InitializeFFmpeg() { + } + + void FFmpegGlue::InitializeFFmpeg() { +- av_register_all(); + } + + static void LogContainer(bool is_local_file, +@@ -94,9 +93,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) { + + // Enable fast, but inaccurate seeks for MP3. + format_context_->flags |= AVFMT_FLAG_FAST_SEEK; +- +- // Ensures we can read out various metadata bits like vp8 alpha. +- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; + + // Ensures format parsing errors will bail out. From an audit on 11/2017, all + // instances were real failures. Solves bugs like http://crbug.com/710791. +--- src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoD + if (decode_nalus_) + codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; + +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { + ReleaseFFmpegResources(); + return false; +--- src/3rdparty/chromium/media/filters/media_file_checker.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/media/filters/media_file_checker.cc +@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_tim + auto context = AVStreamToAVCodecContext(format_context->streams[i]); + if (!context) + continue; +- AVCodec* codec = avcodec_find_decoder(cp->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(cp->codec_id); + if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) { + auto loop = std::make_unique(context.get()); + stream_contexts[i] = {std::move(context), std::move(loop)}; +--- src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* + // a pointer |this|. + av_context_->opaque = this; + +- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); + if (!codec) { + // This is an indication that FFmpeg has not been initialized or it has not + // been compiled/initialized with the correct set of codecs.