summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorSamuel Mira <samuel.mira@qt.io>2022-05-18 17:00:13 +0300
committerSamuel Mira <samuel.mira@qt.io>2022-05-18 17:47:38 +0300
commit9e66b1d4f620e4adaa4ec870f9b4d348758e20ce (patch)
treeeee68f94e291b4aa7e525f2a5046e2fca2dab43f /cmake
parent5aee7ce23d139e7e4c36cad6d2bbf861eddc8d01 (diff)
Android: Enable FFmpeg playback - SW rendering
This patch enables video playback on Android using the FFmpeg backend. For now, just Software rendering with audio subsystem integration. Also, to get basic rendering working, this patch adds the conversion of content scheme URLs into qmediaplayer.cpp. Task-number: QTBUG-102232 Task-number: QTBUG-100474 Change-Id: I0e0efa8d05ad9c1bfaaedd2a18d6d2e7a163b999 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindFFmpeg.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index bb7cf1ea9..1ee312578 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -102,6 +102,18 @@ macro(find_component _component _pkgconfig _library _header)
pkg_check_modules(PC_${_component} ${_pkgconfig})
endif ()
+ if (FFMPEG_DIR OR FFMPEG_ROOT)
+ set(__find_ffmpeg_backup_root_dir "${CMAKE_FIND_ROOT_PATH}")
+ endif()
+
+ if(FFMPEG_DIR)
+ list(APPEND CMAKE_FIND_ROOT_PATH "${FFMPEG_DIR}")
+ endif()
+
+ if(FFMPEG_ROOT)
+ list(APPEND CMAKE_FIND_ROOT_PATH "${FFMPEG_ROOT}")
+ endif()
+
find_path(${_component}_INCLUDE_DIRS ${_header}
HINTS
${PC_${_component}_INCLUDEDIR}
@@ -124,6 +136,10 @@ macro(find_component _component _pkgconfig _library _header)
lib
)
+ if(FFMPEG_DIR OR FFMPEG_ROOT)
+ set(CMAKE_FIND_ROOT_PATH "${__find_ffmpeg_backup_root_dir}")
+ endif()
+
get_filename_component(${_component}_LIBRARY_DIR_FROM_FIND ${${_component}_LIBRARY} DIRECTORY)
get_filename_component(${_component}_LIBRARY_FROM_FIND ${${_component}_LIBRARY} NAME)