diff options
Diffstat (limited to 'sci-libs/ignition-common')
-rw-r--r-- | sci-libs/ignition-common/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/ignition-common/files/ffmpeg5.patch | 93 | ||||
-rw-r--r-- | sci-libs/ignition-common/ignition-common-3.14.0.ebuild (renamed from sci-libs/ignition-common/ignition-common-3.11.1.ebuild) | 3 |
3 files changed, 98 insertions, 3 deletions
diff --git a/sci-libs/ignition-common/Manifest b/sci-libs/ignition-common/Manifest index a2b50432dbf3..d4cd12b55371 100644 --- a/sci-libs/ignition-common/Manifest +++ b/sci-libs/ignition-common/Manifest @@ -1,3 +1,4 @@ -DIST ignition-common3_3.11.1.tar.gz 7130569 BLAKE2B c352c4750e6ec865dbe2ec08c32166235e167eaf33ed3be0ab31bd530e1f45b9449eb19733685d61a480c2d2e8b812a3a3bb72fdf184a08fd1813303bfab5947 SHA512 7521df7719163e7d2cf835857b068bb6aab62fd326ca6938c681dd3737c8391e467ad6a00ec96685310e1c8bb2fc853631346620f527bd008191ed8f8255932a -EBUILD ignition-common-3.11.1.ebuild 925 BLAKE2B 0f02c25ed808c59a9155d7971c91c2ad338e8f78fb66018ac574df05fdd01a407dda2f0e64081db1dc2b04df66acd8a5cd52c5edfb2a9429b238155b0904cc74 SHA512 328b18f874536b2c71567ea2f4a76ad11b3e88a571d456b910188bc6979fef9ca430042b4b1c53bcd3902099e0e676b94d62170d87655dffdf68b9b3cff49bfd +AUX ffmpeg5.patch 4216 BLAKE2B 4f7c4067b09a609f77c919e4d5d1cbe6b0545d0be208157509d2165d4c8d8f202863fcc53b490fd9494255185e43d262a0a3013429df07c518c5bdedaadaafad SHA512 a558ce55b2ee200e23aba45e0994730b7da50fb419dfdea8348c156cef5f7840043a9905580233c7ee8e5dea665ff486d4f034b333feef140dcf8c53853071d7 +DIST ignition-common3_3.14.0.tar.gz 7171404 BLAKE2B be77615c2b44d446625a2e90302e127dae579137cd150dd66e6e93434f7c345f72b76a6be180303f336ff8b30a45880b64bc8dd148001184b57af1a538531d7a SHA512 53e001751074f69bbe481b27f18da7e8ce9110e4682e9947b88201ca8f0511b20744b6629e2da9914d16144916599ab5b20e56da16115e742739220c9732306b +EBUILD ignition-common-3.14.0.ebuild 965 BLAKE2B 981699831597a4536ff586f43ab3a7d6aee9e12de7a8b3c6f70d64e54e6faaf3c763873b0c7305507bdc04d448981ba2da04dccda0d17dc3c78071bcb1aad5a2 SHA512 7e1b18189c0974a789b65def6818b1c6d96757ffb3e83c5b8967c16e9ae31a30fdf5fc112d5152fe4fbac7c70ce9b725cb2354e5ddaf15744b3c4369b7e55a2a MISC metadata.xml 342 BLAKE2B d5a6fb81442fbf553f05a28de85f698d01e61f34c784ab4cf30c9dce02715a976fa39376c47155d98f144fa4031613c9749605b2eae0af7f03690fed35981398 SHA512 c9394c6ade1913a0785c8018bd6076a403042bc9430c1ba6b6407d701a9a55bd155be17a09c0b1bfdd6b112250818a823e670ef482776a0090e67f49b05166e8 diff --git a/sci-libs/ignition-common/files/ffmpeg5.patch b/sci-libs/ignition-common/files/ffmpeg5.patch new file mode 100644 index 000000000000..668b2befeb74 --- /dev/null +++ b/sci-libs/ignition-common/files/ffmpeg5.patch @@ -0,0 +1,93 @@ +Index: ign-common-ignition-common3_3.14.0/av/src/AudioDecoder.cc +=================================================================== +--- ign-common-ignition-common3_3.14.0.orig/av/src/AudioDecoder.cc ++++ ign-common-ignition-common3_3.14.0/av/src/AudioDecoder.cc +@@ -35,7 +35,7 @@ class ignition::common::AudioDecoderPriv + public: AVCodecContext *codecCtx; + + /// \brief libavcodec audio codec. +- public: AVCodec *codec; ++ public: const AVCodec *codec; + + /// \brief Index of the audio stream. + public: int audioStream; +@@ -132,8 +132,12 @@ bool AudioDecoder::Decode(uint8_t **_out + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif +- bytesDecoded = avcodec_decode_audio4(this->data->codecCtx, decodedFrame, +- &gotFrame, &packet1); ++ bytesDecoded = avcodec_send_packet(this->data->codecCtx, &packet1); ++ if (bytesDecoded >= 0 || bytesDecoded == AVERROR_EOF) { ++ bytesDecoded = avcodec_receive_frame(this->data->codecCtx, decodedFrame); ++ gotFrame = bytesDecoded >= 0; ++ if (bytesDecoded == AVERROR(EAGAIN) || bytesDecoded == AVERROR_EOF) bytesDecoded = 0; ++ } + #ifndef _WIN32 + # pragma GCC diagnostic pop + #endif +@@ -224,7 +228,7 @@ bool AudioDecoder::SetFile(const std::st + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif +- if (this->data->formatCtx->streams[i]->codec->codec_type == // NOLINT(*) ++ if (this->data->formatCtx->streams[i]->codecpar->codec_type == // NOLINT(*) + AVMEDIA_TYPE_AUDIO) + #ifndef _WIN32 + # pragma GCC diagnostic pop +@@ -249,8 +253,9 @@ bool AudioDecoder::SetFile(const std::st + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif +- this->data->codecCtx = this->data->formatCtx->streams[ +- this->data->audioStream]->codec; ++ this->data->codecCtx = avcodec_alloc_context3(nullptr); ++ avcodec_parameters_to_context(this->data->codecCtx, this->data->formatCtx->streams[ ++ this->data->audioStream]->codecpar); + #ifndef _WIN32 + # pragma GCC diagnostic pop + #endif +Index: ign-common-ignition-common3_3.14.0/av/src/Video.cc +=================================================================== +--- ign-common-ignition-common3_3.14.0.orig/av/src/Video.cc ++++ ign-common-ignition-common3_3.14.0/av/src/Video.cc +@@ -91,7 +91,7 @@ void Video::Cleanup() + ///////////////////////////////////////////////// + bool Video::Load(const std::string &_filename) + { +- AVCodec *codec = nullptr; ++ const AVCodec *codec = nullptr; + this->dataPtr->videoStream = -1; + + if (this->dataPtr->formatCtx || this->dataPtr->avFrame || +Index: ign-common-ignition-common3_3.14.0/av/src/VideoEncoder.cc +=================================================================== +--- ign-common-ignition-common3_3.14.0.orig/av/src/VideoEncoder.cc ++++ ign-common-ignition-common3_3.14.0/av/src/VideoEncoder.cc +@@ -106,7 +106,7 @@ class IGNITION_COMMON_AV_HIDDEN ignition + /// Find a suitable encoder for the given codec ID. + /// \param[in] _codecId ID of the codec we seek the encoder for. + /// \return The matched encoder (or nullptr on failure). +- public: AVCodec* FindEncoder(AVCodecID _codecId); ++ public: const AVCodec* FindEncoder(AVCodecID _codecId); + + /// \brief Get a pointer to the frame that contains the encoder input. This + /// mainly serves for uploading the frame to GPU buffer if HW acceleration is +@@ -123,7 +123,7 @@ class IGNITION_COMMON_AV_HIDDEN ignition + }; + + ///////////////////////////////////////////////// +-AVCodec* VideoEncoderPrivate::FindEncoder(AVCodecID _codecId) ++const AVCodec* VideoEncoderPrivate::FindEncoder(AVCodecID _codecId) + { + #ifdef IGN_COMMON_BUILD_HW_VIDEO + if (this->hwEncoder) +@@ -367,7 +367,7 @@ bool VideoEncoder::Start( + } + else + { +- AVOutputFormat *outputFormat = av_guess_format(nullptr, ++ const AVOutputFormat *outputFormat = av_guess_format(nullptr, + this->dataPtr->filename.c_str(), nullptr); + + if (!outputFormat) diff --git a/sci-libs/ignition-common/ignition-common-3.11.1.ebuild b/sci-libs/ignition-common/ignition-common-3.14.0.ebuild index 5cdee005071d..0d31e9ce6c0c 100644 --- a/sci-libs/ignition-common/ignition-common-3.11.1.ebuild +++ b/sci-libs/ignition-common/ignition-common-3.14.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -34,6 +34,7 @@ BDEPEND=" dev-util/ignition-cmake:2" S="${WORKDIR}/ign-common-${PN}${IGN_MAJOR}_${PV}" +PATCHES=( "${FILESDIR}/ffmpeg5.patch" ) src_configure() { local mycmakeargs=( |