|
|
||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
11-16-2009, 11:27 PM
|
#1 |
|
Member
|
Post rating: rate
I have take a lot of time before release this one because I wanted to test it as much as possible to avoid fix and re-fix. Is perfectly stable and makes StepMania to behave with latest FFMpeg versions equally to the same that is included nowadays statically.
This don't fix bugs present in stepmania FFMpeg interaction, for example "Don't let me be misunderstood" song video included in "DjJavixxxxx 1.5 Mix" stutters all the time equally as StepMania with it's actually statically linked ffmpeg. video.m4 part of ffmpeg has been simplified but It could be simplest by checking ffmpeg using pkg_config, but it's loaded before gtk, so instead of messing with more m4 I left it with AC_SEARCH_LIBS. Perhaps a clean and update to a newer version in all the autogen related stuff could be fine. This patch will break the build of any platform with ffmpeg linked statically, so it's needed to update before the ffmpeg libs included in stepmania svn. Linux distro packagers will take more use of this patch actually. Patch: http://pastie.org/701873 DaVince you mean something like this? I don't see it necessary because the patches I do are very specific so I think if I just put that I have used code done by Petr Baudis is enough. Anyway, here you are. ChangeLog: Code:
Petr Baudis (3):
video.m4: Add libswscale checks.
MovieTexture_FFMpeg: Port img_convert to libswscale method.
MovieTexture_Theora: Port img_convert to libswscale method.
David Santamarķa Rogado (howl) (12):
video.m4: Simplify FFMpeg checks.
ArchHooks_Unix: Correct ffmpeg include.
MovieTexture_FFMpeg: Add and correct ffmpeg necessary includes.
MovieTexture_FFMpeg: Replace avcodec_build() with avcodec_version(), avcodec_build() now doesn't exists and avcodec_version() has always return the same value of avcodec_build().
MovieTexture_FFMpeg: Replace avcodec::offset_t type with int64_t type to complain the new FFMpeg API .
MovieTexture_FFMpeg: Corrected seek component of RageProtocol to complain the new FFMpeg, if not videos with malformed headers fails to play.
MovieTexture_FFMpeg: Fix compilation warning of RageProtocol.
MovieTexture_FFMpeg: Add destruction conditions for swscale context to avoid possible crashes.
MovieTexture_FFMpeg: Add initialization conditions for swscale context to avoid possible unused memory if there is no garbage collector and improve performance.
MovieTexture_Theora: Add and correct ffmpeg necessary includes.
MovieTexture_Theora: Add destruction conditions for swscale context to avoid possible crashes.
MovieTexture_Theora: Add initialization conditions for swscale context to avoid possible unused memory if there is no garbage collector and improve performance.
Last edited by howl; 11-17-2009 at 03:01 AM.. |
|
|
11-17-2009, 02:40 AM
|
#3 |
|
Member
|
Post rating: rate
Well, it shouldn't work on windows or mac, the API of the included ffmpeg libs in stepmania svn differs so much in a used function, img_convert has been replaced by libswscale.
Also benefits for windows or mac aren't so much, only possible bugs that could be solved between ffmpeg versions, but for linux it add the possibility to use VDPAU to make the video decode work to be done by an nvidia GPU for some codecs. |
|
|
11-17-2009, 07:19 PM
|
#4 |
|
Member
|
Post rating: rate
Yeah, that's what I meant. A lot of detail in the changelog. Could be simplified in the end to who contributed what quickly, but at least a quick detail on what you did is now available for the changelog editors. :)
Nice work! But if it currently only works on Linux it still needs to be fixed before being committed, or a workaround should be added for the Windows/Mac versions to still use the statically linked library. It's more important to keep having SM work on all platforms. |
|
|
11-17-2009, 09:57 PM
|
#5 |
|
Member
|
Post rating: rate
Is possible to make compiler conditions by checking ffmpeg version used to compile but that makes messy the code. I have done it anyway because the distro packagers will find it useful and when sm devs want to upgrade ffmpeg this leaves the work in a simple recompilation of win and mac libs included in the code, no need to do anything else.
PD: If you really want a code that can work with latest ffmpeg and the one included in sm I can do it, just check ffmpeg version, if img_convert exists and perhaps if offset_t type exists. |
|
|
11-18-2009, 10:34 PM
|
#6 |
|
Member
|
Post rating: rate
I was thinking of trying this one out. do i just patch and build like the pulseaudio patch? and it just uses the ffmpeg librarys that are installed?
I'd probably be trying it out now if i weren't chkdsk'ing my ntfs partitions. i wish i could just convert them to ext4. i had to boot to a windows install disk to chkdsk them for errors. |
|
|
11-18-2009, 11:41 PM
|
#7 |
|
Member
|
Post rating: rate
This patch also breaks the Utils/build.sh utility, but adds the possibility to compile StepMania with the traditional method on modern distributions.
Way to do it: First make sure you have the develop dependencies installed, they are the same as with the pulseaudio patch but you will need also: Code:
sudo apt-get install libavutil-dev libavformat-dev libavcodec-dev libswscale-dev Go to your directory where you take stepmania, and put this patch with the_name_you_want.patch and then: Code:
svn co https://svn.stepmania.com/svn/trunk/stepmania Code:
cd stepmania/ svn up And now this changes: Code:
cd stepmania/ <- if you didn't use the svn up method patch -p0 -i ../the_name_you_want.patch ./autogen.sh ./configure make cp src/stepmania src/GtkModule.so ./ Code:
./stepmania Note that you won't need the PulseAudio patch with latest StepMania svn versions because is included with them. Last edited by howl; 01-26-2010 at 10:27 PM.. Reason: ./make is really make |
|
|
11-19-2009, 07:00 AM
|
#8 |
|
Member
|
Post rating: rate
Code:
:~/Documents/stepmania$ patch -p0 -i ./pastie-701873.txt patching file autoconf/m4/video.m4 patching file src/arch/ArchHooks/ArchHooks_Unix.cpp patching file src/arch/MovieTexture/MovieTexture_FFMpeg.cpp patching file src/arch/MovieTexture/MovieTexture_Theora.cpp patch unexpectedly ends in middle of line Hunk #8 succeeded at 689 with fuzz 1. |
|
|
11-19-2009, 07:23 AM
|
#9 |
|
Member
|
Post rating: rate
Code:
MovieTexture_FFMpeg.o: In function `MovieDecoder_FFMpeg::Init()': MovieTexture_FFMpeg.cpp:(.text+0x82a): undefined reference to `av_free_packet' MovieTexture_FFMpeg.o: In function `MovieDecoder_FFMpeg::ReadPacket()': MovieTexture_FFMpeg.cpp:(.text+0x879): undefined reference to `av_free_packet' MovieTexture_FFMpeg.cpp:(.text+0x8b0): undefined reference to `av_free_packet' MovieTexture_FFMpeg.o: In function `MovieDecoder_FFMpeg::~MovieDecoder_FFMpeg()': MovieTexture_FFMpeg.cpp:(.text+0x923): undefined reference to `av_free_packet' MovieTexture_FFMpeg.o: In function `MovieDecoder_FFMpeg::~MovieDecoder_FFMpeg()': MovieTexture_FFMpeg.cpp:(.text+0x983): undefined reference to `av_free_packet' MovieTexture_FFMpeg.o:MovieTexture_FFMpeg.cpp:(.text+0x9e3): more undefined references to `av_free_packet' follow collect2: ld returned 1 exit status make[2]: *** [stepmania] Error 1 make[2]: Leaving directory `/home/robert/Documents/stepmania/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/robert/Documents/stepmania/src' make: *** [all-recursive] Error 1 |
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Patch] Make StepMania 4 alpha4 to manage the standard ogg extensions | howl | General questions | 5 | 11-14-2009 06:06 PM |
| Can't compile lastest cvs | satsuki_yatoshi | StepMania releases | 17 | 05-19-2008 09:13 PM |
| Which version of FFmpeg/libavcodec compiles with SM3.9? | Dro Kulix | General questions | 3 | 10-10-2007 02:12 AM |
| Lastest CVS for Linux CRASHES in Network Play | shigutso | Crash questions | 8 | 04-29-2007 06:46 PM |
| Use the latest ffmpeg with SM 4.0 | sonicbhoc | General questions | 0 | 01-11-2007 11:58 PM |