Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140944 - stepmania-3.9_rc3 and stepmania-3.9 fail to build with ffmpeg-0.4.9_p20051216
Summary: stepmania-3.9_rc3 and stepmania-3.9 fail to build with ffmpeg-0.4.9_p20051216
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 140943 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-18 10:32 UTC by Matt Mullins
Modified: 2006-10-30 01:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
`emerge --info` for the system on which it fails (emerge --info,2.92 KB, text/plain)
2006-07-18 10:38 UTC, Matt Mullins
Details
Patch to make stepmania-3.9_rc3 build (patch,2.58 KB, patch)
2006-07-18 18:20 UTC, Matt Mullins
Details | Diff
A slightly cleaned patch, still builds. (patch,2.50 KB, patch)
2006-07-18 18:26 UTC, Matt Mullins
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Mullins 2006-07-18 10:32:43 UTC
While emerging stepmania, it fails to build.  I believe this could be related to FFmpeg changing APIs, but I am not sure myself, as I have not tracked FFmpeg lately.  I have previously built stepmania successfully on another system, when I used ffmpeg-0.4.9_p20050226-r5.  That version is no longer available in portage, and ffmpeg-0.4.9_p20050226-r3 also fails to build, apparently because of a missing patch specified in its ebuild.  However, even with the version of stepmania I have been able to build on my other system, videos have never worked properly, which does not bother me (it actually aids gameplay, that "bug" ("feature"?)).

Steps to reproduce:
1) build ffmpeg-0.4.9_p20051216
2) build stepmania (either 3.9_rc3 or 3.9)

Actual results:
G++ fails with the following:
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `int FFMpeg_Helper::DecodePacket()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:331: error: cannot convert `avcodec::AVCodecContext**' to `avcodec::AVCodecContext*' for argument `1' to `int avcodec::avcodec_decode_video(avcodec::AVCodecContext*, avcodec::AVFrame*, int*, uint8_t*, int)'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:363: error: request for member `frame_rate_base' in `((FFMpeg_Helper*)this)->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:363: error: request for member `frame_rate' in `((FFMpeg_Helper*)this)->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `void MovieTexture_FFMpeg::ConvertFrame()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:381: error: request for member `pix_fmt' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:382: error: request for member `width' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:382: error: request for member `height' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In function `avcodec::AVStream* FindVideoStream(avcodec::AVFormatContext*)':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:392: error: request for member `codec_type' in `enc->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In constructor `MovieTexture_FFMpeg::MovieTexture_FFMpeg(RageTextureID)':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:421: error: request for member `bit_rate' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:422: error: request for member `pix_fmt' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `void MovieTexture_FFMpeg::CreateDecoder()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:576: error: request for member `codec_id' in `stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:577: error: request for member `codec_tag' in `stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:579: error: request for member `codec_id' in `stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:581: error: request for member `codec_id' in `stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:584: error: cannot convert `avcodec::AVCodecContext**' to `avcodec::AVCodecContext*' for argument `1' to `int avcodec::avcodec_open(avcodec::AVCodecContext*, avcodec::AVCodec*)'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `void MovieTexture_FFMpeg::DestroyDecoder()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:599: error: cannot convert `avcodec::AVCodecContext**' to `avcodec::AVCodecContext*' for argument `1' to `int avcodec::avcodec_close(avcodec::AVCodecContext*)'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `void MovieTexture_FFMpeg::CreateTexture()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:640: error: request for member `width' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp:641: error: request for member `height' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
arch/MovieTexture/MovieTexture_FFMpeg.cpp: In member function `float MovieTexture_FFMpeg::CheckFrameTime()':
arch/MovieTexture/MovieTexture_FFMpeg.cpp:821: error: request for member `frame_number' in `((MovieTexture_FFMpeg*)this)->MovieTexture_FFMpeg::decoder->FFMpeg_Helper::m_stream->avcodec::AVStream::codec', which is of non-class type `avcodec::AVCodecContext*'
make[2]: *** [MovieTexture_FFMpeg.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/stepmania-3.9_rc3/work/StepMania-3.9-rc3-src/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/stepmania-3.9_rc3/work/StepMania-3.9-rc3-src/src'
make: *** [all-recursive] Error 1

Expected results:
Successful compile.

Note: I have been successful in alleviating the first of the compile errors (at line 331), but I became stuck trying to fix line 363, as it seems the frame_rate and frame_rate_base members have disappeared in recent versions of ffmpeg.

emerge --info: see attachment
Comment 1 Matt Mullins 2006-07-18 10:38:03 UTC
Created attachment 92144 [details]
`emerge --info` for the system on which it fails

I couldn't fit emerge --info into the original report, so I'm attaching it here.
Comment 2 Matt Mullins 2006-07-18 10:42:02 UTC
*** Bug 140943 has been marked as a duplicate of this bug. ***
Comment 3 Matt Mullins 2006-07-18 18:20:45 UTC
Created attachment 92173 [details, diff]
Patch to make stepmania-3.9_rc3 build
Comment 4 Matt Mullins 2006-07-18 18:22:01 UTC
I have now made it build... see the above patch.  It seems the biggest problem was AVStream::codec changing from being an AVCodecContext to an AVCodecContext*.  I also had to substitute (float)m_stream->r_frame_rate.den / m_stream->r_frame_rate.num instead of (float)m_stream->codec.frame_rate_base / m_stream->codec.frame_rate, which I am not still completely sure whether or not it is correct.  Now it plays the videos, but plays them *much* too fast.  I'm thoroughly confused by how video playing works, and I'm out of ideas as to where the bug might be, so I'm going to leave it to someone else to help me with that.

Sorry for being completely incompetent with bugzilla, this comment probably should have been with the patch instead of separately...

Thanks.
Comment 5 Matt Mullins 2006-07-18 18:26:41 UTC
Created attachment 92174 [details, diff]
A slightly cleaned patch, still builds.

Oops, I left my #include <iostream> in there from when I was attempting to debug the video speed problem... that's the only difference between the two patches.
Comment 6 Christian Axelsson 2006-08-05 02:51:09 UTC
(In reply to comment #5)
> Created an attachment (id=92174) [edit]
> A slightly cleaned patch, still builds.
> 
> Oops, I left my #include <iostream> in there from when I was attempting to
> debug the video speed problem... that's the only difference between the two
> patches.

Can you post this as a unified diff? (diff -U)
When I just add this patch using epatch to the ebuild I get errors about that it cant find the file to patch.
Comment 7 Christian Axelsson 2006-08-05 03:20:29 UTC
Actually I would now suggest to just get rid of this ebuild in favour for the final 3.9 one (that works flawless).
Comment 8 Tristan Heaven (RETIRED) gentoo-dev 2006-10-30 01:40:09 UTC
3.9 works for me with ffmpeg 0.4.9_p20060530