New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffmpeg] libavresample is deprecated #1120

Closed
orbea opened this Issue Jul 8, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@orbea
Contributor

orbea commented Jul 8, 2018

I'm not sure this is something you want to fix, but I figure its worth pointing out.

Basically when I try to build mgba cmake tells me ffmpeg support is disabled because I'm missing libavresample.

-- Checking for one of the modules 'libedit'
-- Checking for one of the modules 'libavcodec'
-- Checking for one of the modules 'libavformat'
-- Checking for one of the modules 'libavresample'
CMake Warning at CMakeLists.txt:144 (message):
  Requested module libavresample missing for feature USE_FFMPEG.  Feature
  disabled.
Call Stack (most recent call first):
  CMakeLists.txt:441 (find_feature)

However this is because ffmpeg has disabled this module by default upstream, ./configure --help in ffmpeg shows this.

--enable-avresample      enable libavresample build (deprecated) [no]

So far mgba is the only program I use that has failed because libavresample is missing.

@endrift

This comment has been minimized.

Show comment
Hide comment
@endrift

endrift Jul 8, 2018

Member

Guess I'll need to fix https://mgba.io/b/123 then.

Member

endrift commented Jul 8, 2018

Guess I'll need to fix https://mgba.io/b/123 then.

@endrift endrift closed this in 31e0642 Jul 9, 2018

@orbea

This comment has been minimized.

Show comment
Hide comment
@orbea

orbea Jul 9, 2018

Contributor

Thanks, but there seems to be a problem, cmake now fails to configure.

-- Checking for one of the modules 'libavcodec'
-- Checking for one of the modules 'libavformat'
-- Checking for one of the modules 'libavutil'
-- Checking for one of the modules 'libswscale'
-- Checking for one of the modules 'minizip'
CMake Warning at CMakeLists.txt:144 (message):
  Requested module minizip missing for feature USE_MINIZIP.  Feature
  disabled.
Call Stack (most recent call first):
  CMakeLists.txt:443 (find_feature)


-- Checking for one of the modules 'libzip'
-- Checking for one of the modules 'MagickWand'
-- Checking for one of the modules 'epoxy'
-- Checking for one of the modules 'sqlite3'
-- Checking for one of the modules 'libelf'
-- Checking for one of the modules 'libavresample'
CMake Warning at CMakeLists.txt:144 (message):
  Requested module libavresample missing for feature USE_LIBAVRESAMPLE.
  Feature disabled.
Call Stack (most recent call first):
  CMakeLists.txt:456 (find_feature)


-- Checking for one of the modules 'libswresample'
CMake Error at CMakeLists.txt:506 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.


-- Checking for one of the modules 'sdl2'
-- Build type: Release
-- Platforms:
-- 	Game Boy Advance: ON
-- 	Game Boy: ON
-- Features:
-- 	Debuggers: ON
-- 	CLI debugger: ON
-- 	GDB stub: ON
-- 	Video recording: ON
-- 	GIF recording: ON
-- 	Screenshot/advanced savestate support: ON
-- 	ZIP support: libzip
-- 	7-Zip support: ON
-- 	SQLite3 game database: ON
-- 	ELF loading support: ON
-- 	OpenGL support: libepoxy
-- Frontends:
-- 	Qt: ON
-- 	SDL (2): ON
-- 	Profiling: OFF
-- 	Test harness: OFF
-- 	Test suite: OFF
-- 	Python bindings: OFF
-- 	Examples: OFF
-- Cores:
-- 	Libretro core: ON
-- Libraries:
-- 	Static: OFF
-- 	Shared: ON
-- Configuring incomplete, errors occurred!
See also "/tmp/SBo/mgba/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/SBo/mgba/build/CMakeFiles/CMakeError.log".
Contributor

orbea commented Jul 9, 2018

Thanks, but there seems to be a problem, cmake now fails to configure.

-- Checking for one of the modules 'libavcodec'
-- Checking for one of the modules 'libavformat'
-- Checking for one of the modules 'libavutil'
-- Checking for one of the modules 'libswscale'
-- Checking for one of the modules 'minizip'
CMake Warning at CMakeLists.txt:144 (message):
  Requested module minizip missing for feature USE_MINIZIP.  Feature
  disabled.
Call Stack (most recent call first):
  CMakeLists.txt:443 (find_feature)


-- Checking for one of the modules 'libzip'
-- Checking for one of the modules 'MagickWand'
-- Checking for one of the modules 'epoxy'
-- Checking for one of the modules 'sqlite3'
-- Checking for one of the modules 'libelf'
-- Checking for one of the modules 'libavresample'
CMake Warning at CMakeLists.txt:144 (message):
  Requested module libavresample missing for feature USE_LIBAVRESAMPLE.
  Feature disabled.
Call Stack (most recent call first):
  CMakeLists.txt:456 (find_feature)


-- Checking for one of the modules 'libswresample'
CMake Error at CMakeLists.txt:506 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.


-- Checking for one of the modules 'sdl2'
-- Build type: Release
-- Platforms:
-- 	Game Boy Advance: ON
-- 	Game Boy: ON
-- Features:
-- 	Debuggers: ON
-- 	CLI debugger: ON
-- 	GDB stub: ON
-- 	Video recording: ON
-- 	GIF recording: ON
-- 	Screenshot/advanced savestate support: ON
-- 	ZIP support: libzip
-- 	7-Zip support: ON
-- 	SQLite3 game database: ON
-- 	ELF loading support: ON
-- 	OpenGL support: libepoxy
-- Frontends:
-- 	Qt: ON
-- 	SDL (2): ON
-- 	Profiling: OFF
-- 	Test harness: OFF
-- 	Test suite: OFF
-- 	Python bindings: OFF
-- 	Examples: OFF
-- Cores:
-- 	Libretro core: ON
-- Libraries:
-- 	Static: OFF
-- 	Shared: ON
-- Configuring incomplete, errors occurred!
See also "/tmp/SBo/mgba/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/SBo/mgba/build/CMakeFiles/CMakeError.log".

@endrift endrift reopened this Jul 9, 2018

@orbea

This comment has been minimized.

Show comment
Hide comment
@orbea

orbea Jul 9, 2018

Contributor

Something like this seems to work?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c2efeb9..3b5b1128 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -503,9 +503,12 @@ if(USE_FFMPEG)
        list(APPEND FEATURE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/feature/ffmpeg/ffmpeg-encoder.c")
        string(REGEX MATCH "^[0-9]+" LIBAVCODEC_VERSION_MAJOR ${libavcodec_VERSION})
        string(REGEX MATCH "^[0-9]+" LIBAVFORMAT_VERSION_MAJOR ${libavformat_VERSION})
-       string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
+       if(USE_LIBSWRESAMPLE)
+               string(REGEX MATCH "^[0-9]+" LIBSWRESAMPLE_VERSION_MAJOR ${libswresample_VERSION})
+       else()
+               string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
+       endif()
        string(REGEX MATCH "^[0-9]+" LIBAVUTIL_VERSION_MAJOR ${libavutil_VERSION})
-       string(REGEX MATCH "^[0-9]+" LIBSWRESAMPLE_VERSION_MAJOR ${libswresample_VERSION})
        string(REGEX MATCH "^[0-9]+" LIBSWSCALE_VERSION_MAJOR ${libswscale_VERSION})
        math(EXPR LIBSWRESAMPLE_VERSION_DEBIAN "${LIBSWRESAMPLE_VERSION_MAJOR} - 1")
        list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVRESAMPLE_LIBRARIES} ${LIBAVUTIL_LIBRARIES} ${LIBSWSCALE_LIBRARIES} ${LIBSWRESAMPLE_LIBRARIES})
Contributor

orbea commented Jul 9, 2018

Something like this seems to work?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c2efeb9..3b5b1128 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -503,9 +503,12 @@ if(USE_FFMPEG)
        list(APPEND FEATURE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/feature/ffmpeg/ffmpeg-encoder.c")
        string(REGEX MATCH "^[0-9]+" LIBAVCODEC_VERSION_MAJOR ${libavcodec_VERSION})
        string(REGEX MATCH "^[0-9]+" LIBAVFORMAT_VERSION_MAJOR ${libavformat_VERSION})
-       string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
+       if(USE_LIBSWRESAMPLE)
+               string(REGEX MATCH "^[0-9]+" LIBSWRESAMPLE_VERSION_MAJOR ${libswresample_VERSION})
+       else()
+               string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
+       endif()
        string(REGEX MATCH "^[0-9]+" LIBAVUTIL_VERSION_MAJOR ${libavutil_VERSION})
-       string(REGEX MATCH "^[0-9]+" LIBSWRESAMPLE_VERSION_MAJOR ${libswresample_VERSION})
        string(REGEX MATCH "^[0-9]+" LIBSWSCALE_VERSION_MAJOR ${libswscale_VERSION})
        math(EXPR LIBSWRESAMPLE_VERSION_DEBIAN "${LIBSWRESAMPLE_VERSION_MAJOR} - 1")
        list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVRESAMPLE_LIBRARIES} ${LIBAVUTIL_LIBRARIES} ${LIBSWSCALE_LIBRARIES} ${LIBSWRESAMPLE_LIBRARIES})
@endrift

This comment has been minimized.

Show comment
Hide comment
@endrift

endrift Jul 9, 2018

Member

Yup, I just need to commit the patch, which I'm probably not going to do tonight because it's late and I need to sleep.

Member

endrift commented Jul 9, 2018

Yup, I just need to commit the patch, which I'm probably not going to do tonight because it's late and I need to sleep.

@orbea

This comment has been minimized.

Show comment
Hide comment
@orbea

orbea Jul 9, 2018

Contributor

No worries, it can wait till tomorrow. :)

Contributor

orbea commented Jul 9, 2018

No worries, it can wait till tomorrow. :)

@endrift

This comment has been minimized.

Show comment
Hide comment
@endrift

endrift Jul 10, 2018

Member

Should be all set now.

Member

endrift commented Jul 10, 2018

Should be all set now.

@orbea

This comment has been minimized.

Show comment
Hide comment
@orbea

orbea Jul 10, 2018

Contributor

Yep, seems good here. Thanks!

Contributor

orbea commented Jul 10, 2018

Yep, seems good here. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment