Skip to content
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] Add mp3lame and opus features #11151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ports/ffmpeg/0007-fix-mp3lame-linking.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/configure b/configure
index d6c4388..75b96c3 100644
--- a/configure
+++ b/configure
@@ -4378,6 +4378,7 @@ msvc_common_flags(){
-march=*) ;;
-lz) echo zlib.lib ;;
-lx264) echo libx264.lib ;;
+ -lmp3lame) echo libmp3lame.lib ;;
-lstdc++) ;;
-l*) echo ${flag#-l}.lib ;;
-LARGEADDRESSAWARE) echo $flag ;;
12 changes: 10 additions & 2 deletions ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ffmpeg
Version: 4.2-8
Version: 4.2-9
Build-Depends: zlib
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
Expand Down Expand Up @@ -56,4 +56,12 @@ Description: Libav audio resampling library support in ffmpeg

Feature: nvcodec
Build-Depends: ffnvcodec, cuda
Description: Hardware accelerated codecs
Description: Hardware accelerated codecs

Feature: mp3lame
Build-Depends: mp3lame
Description: mp3lame support in ffmpeg

Feature: opus
Build-Depends: opus
Description: opus support in ffmpeg
15 changes: 14 additions & 1 deletion ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_github(
0004-fix-debug-build.patch
0005-fix-libvpx-linking.patch
0006-fix-StaticFeatures.patch
0007-fix-mp3lame-linking.patch
)

if (${SOURCE_PATH} MATCHES " ")
Expand Down Expand Up @@ -38,7 +39,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make)
else()
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make pkg-config)
endif()

set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
Expand Down Expand Up @@ -141,6 +142,18 @@ else()
set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-cuvid --disable-libnpp")
endif()

if("mp3lame" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libmp3lame")
else()
set(OPTIONS "${OPTIONS} --disable-libmp3lame")
endif()

if("opus" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libopus")
else()
set(OPTIONS "${OPTIONS} --disable-libopus")
endif()

set(OPTIONS_CROSS "")

if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
Expand Down