Skip to content

Commit 4484546

Browse files
committed
Update ffmpeg to 5.1.2
1 parent bf019f8 commit 4484546

File tree

7,238 files changed

+10612
-1729913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,238 files changed

+10612
-1729913
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: C/C++ CI
2+
3+
on: [push]
4+
5+
jobs:
6+
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
config: [Release]
15+
include:
16+
- os: ubuntu-latest
17+
triplet: x64-linux-release
18+
upload-path: /home/runner/.cache/vcpkg/archives
19+
vcpkg-root: /usr/local/share/vcpkg
20+
extra-args: ""
21+
- os: windows-latest
22+
triplet: x64-win-llvm-static-release
23+
upload-path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
24+
vcpkg-root: C:\vcpkg
25+
extra-args: --overlay-triplets=./triplets
26+
- os: macos-latest
27+
triplet: x64-osx-release
28+
upload-path: /Users/runner/.cache/vcpkg/archives
29+
vcpkg-root: /usr/local/share/vcpkg
30+
extra-args: ""
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
35+
- name: Set up build environment (macos-latest)
36+
run: |
37+
brew install nasm
38+
if: matrix.os == 'macos-latest'
39+
40+
- name: Set up build environment (ubuntu-latest)
41+
run: |
42+
sudo apt -y install nasm
43+
if: matrix.os == 'ubuntu-latest'
44+
45+
- name: Patch vcpkg
46+
run: |
47+
(cd ${{ matrix.vcpkg-root }} && git fetch origin)
48+
(cd ${{ matrix.vcpkg-root }} && git reset --hard)
49+
(cd ${{ matrix.vcpkg-root }} && git checkout 217194cea7e3491c14779c763beec50b6a4575d6)
50+
(cd ${{ matrix.vcpkg-root }} && git apply --ignore-space-change --ignore-whitespace --3way ${{ github.workspace }}/ffmpeg.patch)
51+
52+
- name: Build ffmpeg
53+
run: |
54+
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.triplet }}
55+
56+
- uses: actions/upload-artifact@v3
57+
with:
58+
name: ffmpeg-${{ matrix.os }}
59+
path: ${{ matrix.upload-path }}
60+
if: ${{ always() }}
61+

.gitignore

Lines changed: 0 additions & 85 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,37 @@ if (NOT DEFINED FFMPEG_CORE_NAME)
22
set(FFMPEG_CORE_NAME ffmpeg)
33
endif()
44

5-
option(USE_SYSTEM_FFMPEG "Dynamically link against system ffmpeg" OFF)
6-
75
add_library(${FFMPEG_CORE_NAME} INTERFACE)
86

97
target_include_directories(${FFMPEG_CORE_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
10-
if(NOT USE_SYSTEM_FFMPEG)
11-
if (WIN32 AND NOT MINGW)
12-
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
13-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/avformat.lib"
14-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/avcodec.lib"
15-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/swscale.lib"
16-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/avutil.lib"
17-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/avfilter.lib"
18-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/x86_64/swresample.lib"
19-
"Bcrypt.lib")
20-
elseif (APPLE)
21-
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
22-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libavformat.a"
23-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libavcodec.a"
24-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libswscale.a"
25-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libavutil.a"
26-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libavfilter.a"
27-
"${CMAKE_CURRENT_SOURCE_DIR}/macos/x86_64/libswresample.a"
28-
"z")
29-
elseif (UNIX)
30-
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
31-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libavformat.a"
32-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libavcodec.a"
33-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libswscale.a"
34-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libavutil.a"
35-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libavfilter.a"
36-
"${CMAKE_CURRENT_SOURCE_DIR}/linux/x86_64/libswresample.a"
37-
"z")
38-
else ()
39-
set(USE_SYSTEM_FFMPEG ON)
40-
endif ()
41-
endif()
42-
43-
if (USE_SYSTEM_FFMPEG)
44-
find_package(PkgConfig REQUIRED)
45-
pkg_check_modules(FFMPEG REQUIRED IMPORTED_TARGET libavcodec libavfilter libavformat libavutil libswscale libswresample)
46-
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE "${FFMPEG_LIBRARIES}")
47-
target_include_directories(${FFMPEG_CORE_NAME} INTERFACE "${FFMPEG_INCLUDE_DIRS}")
8+
if (WIN32 AND NOT MINGW)
9+
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
10+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/avformat.lib"
11+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/avcodec.lib"
12+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/swscale.lib"
13+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/avutil.lib"
14+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/avfilter.lib"
15+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/swresample.lib"
16+
"psapi;strmiids;uuid;oleaut32;shlwapi;ws2_32;ole32;user32;bcrypt")
17+
elseif (APPLE)
18+
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
19+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavformat.a"
20+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavcodec.a"
21+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libswscale.a"
22+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavutil.a"
23+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavfilter.a"
24+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libswresample.a"
25+
"-framework CoreServices" "-framework CoreFoundation" "-framework AudioUnit"
26+
"-framework AudioToolbox" "-framework CoreAudio" "-framework CoreMedia"
27+
"-framework VideoToolbox" "-framework CoreVideo" "-framework Security")
28+
elseif (UNIX)
29+
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
30+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libavformat.a"
31+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libavcodec.a"
32+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libswscale.a"
33+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libavutil.a"
34+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libavfilter.a"
35+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/linux/x86_64/libswresample.a")
36+
else ()
37+
message(FATAL_ERROR "No prebuilt was found for ffmpeg")
4838
endif ()

0 commit comments

Comments
 (0)