mirror of
https://github.com/shadps4-emu/ext-ffmpeg-core.git
synced 2024-11-23 02:59:40 +00:00
e30b7d7fe2
Contains the following squashed commits from the old branch: Initial commit Fix link order Add option to link against system ffmpeg, disable precompiled binaries for mingw Update macOS files for XCode 12 Update ffmpeg to 5.1.2 Add mjpeg encoder (#7) Add mjpeg2jpeg bitstream filter Add macOS-arm64 builds Add macOS arm64 to CMakeLists Add arm64-osx-release to build.yml dummy commit to trigger workflow Properly split macOS builds in build.yml Try to fix actions uploads Rename the builds Fix build.yml Fix typo in build.yml Amend CMakeLists using the correct check ci: change upload path to directly upload libraries ci: build and use universal binary on macOS ci: set macOS deployment target to macOS 11.0 ci: build FFMPEG prebuilt for each OS/architecture Add linux arm64 prebuilt. Add both x86_64 and arm64 prebuilts for macOS. ci: create release for pre-built FFMPEG cmake: download and use only necessary prebuilt FFMPEG Add arm64 windows prebuilt Co-authored-by: Seungyun Lee <khora.lee.0@gmail.com> Co-authored-by: shinra-electric <50119606+shinra-electric@users.noreply.github.com> Co-authored-by: SaturnSky <ikadro@gmail.com>
48 lines
3.4 KiB
Diff
48 lines
3.4 KiB
Diff
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
|
|
index 35bac875b..b16d9cb64 100644
|
|
--- a/ports/ffmpeg/portfile.cmake
|
|
+++ b/ports/ffmpeg/portfile.cmake
|
|
@@ -42,7 +42,20 @@ else()
|
|
set(LIB_PATH_VAR "LIBRARY_PATH")
|
|
endif()
|
|
|
|
-set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")
|
|
+set(OPTIONS "--enable-pic --disable-doc --enable-runtime-cpudetect --disable-autodetect")
|
|
+
|
|
+# Only enable what is used by Vita3K
|
|
+string(APPEND OPTIONS " --disable-everything")
|
|
+string(APPEND OPTIONS " --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=atrac3 --enable-decoder=atrac3p --enable-decoder=atrac9 --enable-decoder=mp3 --enable-decoder=pcm_s16le --enable-decoder=pcm_s8")
|
|
+string(APPEND OPTIONS " --enable-decoder=mov --enable-decoder=h264 --enable-decoder=mpeg4 --enable-decoder=mpeg2video --enable-decoder=mjpeg --enable-decoder=mjpegb")
|
|
+string(APPEND OPTIONS " --enable-encoder=pcm_s16le")
|
|
+string(APPEND OPTIONS " --enable-encoder=ffv1 --enable-encoder=mpeg4 --enable-encoder=mjpeg")
|
|
+string(APPEND OPTIONS " --enable-muxer=avi")
|
|
+string(APPEND OPTIONS " --enable-demuxer=h264 --enable-demuxer=m4v --enable-demuxer=mp3 --enable-demuxer=mpegvideo --enable-demuxer=mpegps --enable-demuxer=mjpeg --enable-demuxer=mov --enable-demuxer=avi --enable-demuxer=aac --enable-demuxer=pmp --enable-demuxer=oma --enable-demuxer=pcm_s16le --enable-demuxer=pcm_s8 --enable-demuxer=wav")
|
|
+string(APPEND OPTIONS " --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=mpegvideo --enable-parser=mjpeg --enable-parser=aac --enable-parser=aac_latm")
|
|
+string(APPEND OPTIONS " --enable-protocol=file")
|
|
+string(APPEND OPTIONS " --enable-bsf=mjpeg2jpeg")
|
|
+string(APPEND OPTIONS " --enable-indev=dshow")
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES automake1.16)
|
|
@@ -80,7 +93,7 @@ endif()
|
|
vcpkg_cmake_get_vars(cmake_vars_file)
|
|
include("${cmake_vars_file}")
|
|
if(VCPKG_DETECTED_MSVC)
|
|
- string(APPEND OPTIONS " --disable-inline-asm") # clang-cl has inline assembly but this leads to undefined symbols.
|
|
+ # string(APPEND OPTIONS " --disable-inline-asm") # clang-cl has inline assembly but this leads to undefined symbols.
|
|
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
|
|
# This is required because ffmpeg depends upon optimizations to link correctly
|
|
string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -O2")
|
|
@@ -574,6 +587,11 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
# We use response files here as the only known way to handle spaces in paths
|
|
set(crsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cflags.rsp")
|
|
string(REGEX REPLACE "-arch [A-Za-z0-9_]+" "" VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
|
|
+ if(VCPKG_TARGET_IS_OSX)
|
|
+ # macosx-version-min version is set with current macOS version. So replace them to 11.0
|
|
+ string(REGEX REPLACE "-mmacosx-version-min=[0-9]+.[0-9]+" "" VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED}")
|
|
+ string(APPEND VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED " -mmacosx-version-min=11.0")
|
|
+ endif()
|
|
file(WRITE "${crsp}" "${VCPKG_COMBINED_C_FLAGS_RELEASE_SANITIZED}")
|
|
set(ldrsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/ldflags.rsp")
|
|
string(REGEX REPLACE "-arch [A-Za-z0-9_]+" "" VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE_SANITIZED "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE}")
|