Implement libswresample in place of libavresample which is deprecated
This commit is contained in:
parent
62ce3c1f65
commit
53c66e44db
|
@ -607,23 +607,6 @@ if(NOT ZM_NO_FFMPEG)
|
|||
set(optlibsnotfound "${optlibsnotfound} SWScale")
|
||||
endif(SWSCALE_LIBRARIES)
|
||||
|
||||
# AVresample (using find_library and find_path)
|
||||
find_library(AVRESAMPLE_LIBRARIES avresample)
|
||||
if(AVRESAMPLE_LIBRARIES)
|
||||
set(HAVE_LIBAVRESAMPLE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}")
|
||||
find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg)
|
||||
if(AVRESAMPLE_INCLUDE_DIR)
|
||||
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
|
||||
endif(AVRESAMPLE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
|
||||
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
|
||||
set(optlibsfound "${optlibsfound} AVResample")
|
||||
else(AVRESAMPLE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVResample")
|
||||
endif(AVRESAMPLE_LIBRARIES)
|
||||
|
||||
# SWresample (using find_library and find_path)
|
||||
find_library(SWRESAMPLE_LIBRARIES swresample)
|
||||
if(SWRESAMPLE_LIBRARIES)
|
||||
|
@ -639,6 +622,24 @@ if(NOT ZM_NO_FFMPEG)
|
|||
set(optlibsfound "${optlibsfound} SWResample")
|
||||
else(SWRESAMPLE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} SWResample")
|
||||
|
||||
# AVresample (using find_library and find_path)
|
||||
find_library(AVRESAMPLE_LIBRARIES avresample)
|
||||
if(AVRESAMPLE_LIBRARIES)
|
||||
set(HAVE_LIBAVRESAMPLE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}")
|
||||
find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg)
|
||||
if(AVRESAMPLE_INCLUDE_DIR)
|
||||
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
|
||||
endif(AVRESAMPLE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
|
||||
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
|
||||
set(optlibsfound "${optlibsfound} AVResample")
|
||||
else(AVRESAMPLE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVResample")
|
||||
endif(AVRESAMPLE_LIBRARIES)
|
||||
|
||||
endif(SWRESAMPLE_LIBRARIES)
|
||||
|
||||
# Find the path to the ffmpeg executable
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
#cmakedefine HAVE_LIBAVUTIL_HWCONTEXT_H 0
|
||||
#cmakedefine HAVE_LIBSWSCALE 1
|
||||
#cmakedefine HAVE_LIBSWSCALE_SWSCALE_H 1
|
||||
#cmakedefine HAVE_LIBSWRESAMPLE 1
|
||||
#cmakedefine HAVE_LIBSWRESAMPLE_SWRESAMPLE_H 1
|
||||
#cmakedefine HAVE_LIBAVRESAMPLE 1
|
||||
#cmakedefine HAVE_LIBAVRESAMPLE_AVRESAMPLE_H 1
|
||||
#cmakedefine HAVE_LIBVLC 1
|
||||
|
|
Loading…
Reference in New Issue