UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStar™
https://usdx.eu
GNU General Public License v2.0
812 stars 160 forks source link

Enhancement: support ffmpeg-3.0 and ffmpeg-3.1 #178

Closed nanu-c closed 7 years ago

nanu-c commented 7 years ago

Ubuntu mint 16.10

/home/nanu/progs/USDX/src/media/UVideo.pas(428,18) Error: identifier idents no member "get_buffer"
/home/nanu/progs/USDX/src/media/UVideo.pas(429,18) Error: identifier idents no member "release_buffer"
/home/nanu/progs/USDX/src/media/UVideo.pas(450,29) Warning: Symbol "avpicture_get_size" is deprecated
/home/nanu/progs/USDX/src/media/UVideo.pas(462,13) Warning: Symbol "avpicture_fill" is deprecated
/home/nanu/progs/USDX/src/media/UVideo.pas(793,5) Warning: Symbol "av_free_packet" is deprecated

This is happening on this lines:

function TVideo_FFmpeg.Open(const FileName : IPath): boolean;
[...]
  // register custom callbacks for pts-determination
  fCodecContext^.get_buffer := PtsGetBuffer;
  fCodecContext^.release_buffer := PtsReleaseBuffer;

This are my libraries

./configure 
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for fpc... fpc
checking for fpcmake... fpcmake
checking version of fpc... [3.0.0]
checking whether the Free Pascal Compiler works... yes
checking whether the Free Pascal Compiler can link... yes
checking whether FPC supports -k"-z noexecstack"... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpng12... no
checking for libpng >= 1.2... yes
checking version of libpng... [1.6.25]
checking for sdl2... yes
checking for SDL2_image... yes
checking for freetype2... yes
checking for sqlite3... yes
checking for lua5.3... no
checking for lua5.2... no
checking for lua5.1... yes
checking version of lua... [5.1.5]
checking for libavcodec... yes
checking version of libavcodec... [57.24.102]
checking for avcodec_decode_audio in -lavcodec... no
checking for avcodec_decode_audio2 in -lavcodec... no
checking for img_convert in -lavcodec... no
checking for libavformat... yes
checking version of libavformat... [57.25.100]
checking for libavutil... yes
checking version of libavutil... [55.17.103]
checking version of ffmpeg... [3.0]
checking for libswscale... yes
checking version of libswscale... [4.0.100]
checking for libprojectM >= 0.98... no
checking for portaudio-2.0... yes
checking version of portaudio... [19]
checking for libpcre... yes
checking version of libpcre... [8.39]
checking for portmixer... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config-linux.inc
nanu-c commented 7 years ago

version 1.3.2 from sf compiles just fine but mourns about jack not found but thats okey

AlexanderS commented 7 years ago

@nanu-c Could you please show the output of the ./configure from version 1.3.2?

AlexanderS commented 7 years ago

Seems like get_buffer was deprecated in ffmpeg-2.8 and is dropped in ffmpeg-3.0. Very unlikely that an older version of USDX still supports it. (But maybe the old version detected a wrong version for ffmpeg.)

basisbit commented 7 years ago

currently, only ffmpeg up to 2.8.x is supported by this game.

nanu-c commented 7 years ago

the 1.3.2 configure

checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for fpc... fpc
checking for fpcmake... fpcmake
checking version of fpc... [3.0.0]
checking whether the Free Pascal Compiler works... yes
checking whether the Free Pascal Compiler can link... yes
checking whether FPC supports -k"-z noexecstack"... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpng12... no
checking for libpng >= 1.2... yes
checking version of libpng... [1.6.25]
checking for sdl2... yes
checking for SDL2_image... yes
checking for freetype2... yes
checking for sqlite3... yes
checking for lua5.3... no
checking for lua5.2... no
checking for lua5.1... yes
checking version of lua... [5.1.5]
checking for libavcodec... yes
checking version of libavcodec... [57.24.102]
checking for avcodec_decode_audio in -lavcodec... no
checking for avcodec_decode_audio2 in -lavcodec... no
checking for img_convert in -lavcodec... no
checking for libavformat... yes
checking version of libavformat... [57.25.100]
checking for libavutil... yes
checking version of libavutil... [55.17.103]
checking version of ffmpeg... [3.0]
checking for libswscale... yes
checking version of libswscale... [4.0.100]
checking for libprojectM >= 0.98... no
checking for portaudio-2.0... yes
checking version of portaudio... [19]
checking for libpcre... yes
checking version of libpcre... [8.39]
checking for portmixer... no

And when i start it

$ultrastardx 
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
Cannot lock down 107341338 byte memory area (Nicht genügend Hauptspeicher verfügbar)

this is kind of a jackd error. If stop jackd I get

$ultrastardx 
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
An unhandled exception occurred at $000000000044FD3B:
EAccessViolation: Access violation
  $000000000044FD3B

An unhandled exception occurred at $000000000042ACBA:
EInOutError: Invalid file handle
  $000000000042ACBA

But it compiles without errors

AlexanderS commented 7 years ago

@basisbit Duplicate to what issue? If ffmpeg-3.0 and ffmpeg-3.1 is currently not supported we should drop the versions from the configure script.

brianch commented 7 years ago

@AlexanderS Ok, I removed the versions not working from the configure script (and made the error message a bit more specific): 9968abaf3718426e04bcff4cb1f7cd0c45960c03

I think the duplicated label is because of issue #181 (although technically that one is the duplication).

AlexanderS commented 7 years ago

@brianch Thanks for the commit.

Note: The duplicate label was added before #181 was created. But ok, don't mind.