Summary: | media-sound/moc-2.6_alpha3-r5 with ffmpeg-5.0: ffmpeg.c:69:9: error: unknown type name ‘AVCodecContext’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kobboi <gentoo> |
Component: | Current packages | Assignee: | Gentoo Sound Team <sound> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | esavier, jy6x2b32pie9, leonchik1976, mgorny, pacho, treecleaner, xdch47, Xeha |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=930009 https://bugs.gentoo.org/show_bug.cgi?id=831179 |
||
Whiteboard: | Workaround dep applied; could disable ffmpeg support entirely | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 831437 | ||
Attachments: |
build.log.gz
emerge-info.txt patch for ffmpeg6 |
Description
Kobboi
2022-02-28 20:21:30 UTC
Created attachment 766047 [details]
build.log.gz
Created attachment 766048 [details]
emerge-info.txt
Compiles fine with: * USE=ffmpeg and ffmpeg-4.4.1 * USE=-ffmpeg and ffmpeg-5.0 I have mixed feelings about this. On one hand, we can just mask USE=ffmpeg (and get rid of one patch while at it). On the other, we're on alpha from ~2016. On the third, I'm sure it has spoken out users. I'm a long time user of moc and I have contributed features and fixes to it in the past. I would be sad to see it go as it is the only terminal music client left to my knowledge that allows the user to do the old school "the folder contents is the playlist" kind of playback. @Michał I did see that there are some unreleased updates in the svn repo that other distributions are packaging and shipping. The svn log does state that some of those updates are ffmpeg related, so perhaps this might already be fixed upstream in those versions. If that is the case, then I can try to contact the upstream maintainer and see if we can get an other point release. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37ecc67590a8204f78b24402b096d3dd73dabbc6 commit 37ecc67590a8204f78b24402b096d3dd73dabbc6 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-05-29 20:50:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-29 20:50:36 +0000 media-sound/moc: depend on <ffmpeg-5 Bug: https://bugs.gentoo.org/834393 Signed-off-by: Sam James <sam@gentoo.org> media-sound/moc/moc-2.6_alpha3-r6.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Created attachment 872289 [details, diff]
patch for ffmpeg6
This patch is a combination of latest svn version of ffmpeg and
removing functions which have been dropped with ffmpeg6 as follows:
diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c
index c043b5a..3029001 100644
--- a/decoder_plugins/ffmpeg/ffmpeg.c
+++ b/decoder_plugins/ffmpeg/ffmpeg.c
@@ -32,6 +32,7 @@
#include <stdint.h>
#include <errno.h>
+#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/mathematics.h>
#if HAVE_LIBAVUTIL_CHANNEL_LAYOUT_H
@@ -761,8 +762,10 @@ static void *ffmpeg_open_internal (struct ffmpeg_data *data)
}
set_downmixing (data);
+#if LIBAVCODEC_VERSION_MAJOR < 60
if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+#endif
if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
{
@@ -1197,8 +1200,10 @@ static bool seek_in_stream (struct ffmpeg_data *data, int sec)
seek_ts += data->stream->start_time;
}
+#if LIBAVCODEC_VERSION_MAJOR < 60
if (data->stream->cur_dts > seek_ts)
flags |= AVSEEK_FLAG_BACKWARD;
+#endif
rc = av_seek_frame (data->ic, data->stream->index, seek_ts, flags);
if (rc < 0) {
--
The upstream bug report - http://moc.daper.net/comment/6590#comment-6590 - says: > Yes, I Know > It's a known issue and at first look it doesn't seem to be a major fix. But my > time is very limited at present and it may not be addressed for a short while. Perhaps Felix's patch could be submitted there as a pull request? I started collecting and bring-in some patches - See here https://github.com/xdch47/moc/compare/svn-trunk...patches-trunk. Not sure how stable those are and how to bring those upstream. For those, who want to give it try, at my overlay (gpo-xdch47) there is an ebuild <https://github.com/xdch47/gpo-xdch47/blob/c98be0428644d1051b86e44df03f49d7ae9f1a7b/media-sound/moc/moc-2.6_alpha3_p2.ebuild > For those, who want to give it try, at my overlay (gpo-xdch47) there is an
> ebuild
> <https://github.com/xdch47/gpo-xdch47/blob/
> c98be0428644d1051b86e44df03f49d7ae9f1a7b/media-sound/moc/moc-2.6_alpha3_p2.
> ebuild
Your ebuild is able to build with ffmpeg-6.0-r7 and "works for me (tm)": mocp is starting and able to play an mp3.
Thank you!
(In reply to Felix Neumärker from comment #9) > I started collecting and bring-in some patches - See here > https://github.com/xdch47/moc/compare/svn-trunk...patches-trunk. > > Not sure how stable those are and how to bring those upstream. > > For those, who want to give it try, at my overlay (gpo-xdch47) there is an > ebuild > <https://github.com/xdch47/gpo-xdch47/blob/ > c98be0428644d1051b86e44df03f49d7ae9f1a7b/media-sound/moc/moc-2.6_alpha3_p2. > ebuild Supposedly upstream uses the forum for those contributions: https://moc.daper.net/forum/21 But I have no idea about how responsive will he be. Maybe you could try to maintain this package via proxy maintainers project and migrate to your patched version: https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers Last fmpeg-5.0 blocker. Maybe it is time to declare this package dead? The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32a39b07ef8aaee4f30bb731cac5fe7faa1617ba commit 32a39b07ef8aaee4f30bb731cac5fe7faa1617ba Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-03-09 16:06:49 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-03-11 09:03:23 +0000 media-sound/moc: migrate to ffmpeg-compat.eclass For what it's worth anyway... more of a proof of concept given ffmpeg-compat-4.4.x likely won't stay around for that long. Seems to work fine, was able to play opus files despite USE=-opus through ffmpeg. This package will still need to be properly handled to avoid last-rites (does have a few users). I know there are ffmpeg-6+ patches going around, or could also remove/mask USE=ffmpeg, but not planning to handle this package myself. Bug: https://bugs.gentoo.org/834393 Closes: https://github.com/gentoo/gentoo/pull/40942 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> media-sound/moc/moc-2.6_alpha3-r8.ebuild | 110 +++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) |