Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
eb63780
[ffmpeg] Update to 7.0.
Sibras Apr 6, 2024
2f09d05
Update versions.
Sibras Apr 6, 2024
994ee1e
[ffmpeg] Fix x86 nasm compile.
Sibras Apr 7, 2024
b806e24
[ffmpeg] Fix OSX cross compilation.
Sibras Apr 7, 2024
ecd27c2
[ffmpeg] Bump version.
Sibras Apr 7, 2024
71dfa2f
fixup
Sibras Apr 7, 2024
f36fda9
Update ffmpeg.json
Sibras Apr 7, 2024
87a1340
Merge branch 'master' into ffmpeg7
Sibras Jun 1, 2024
bbc4155
Update ffmpeg.json
Sibras Jun 1, 2024
d5a8237
[ffmpeg] fix chromium patch
Sibras Jun 1, 2024
8cde7cb
Update ffmpeg.json
Sibras Jun 1, 2024
8a79791
[aubio] Update to latest.
Sibras Jun 1, 2024
b9da0f3
[aubio] update version.
Sibras Jun 1, 2024
2001289
Merge branch 'master' into ffmpeg7
Sibras Jun 29, 2024
1a7fad7
Update ffmpeg.json
Sibras Jun 29, 2024
0febba8
[ffmpeg] Add d3d12va support.
Sibras Jun 29, 2024
1574421
[ffpmpeg]: Fix patch.
Sibras Jun 29, 2024
593e0c4
Update ffmpeg.json
Sibras Jun 29, 2024
672dc03
[ffmpeg] Attempt to fix osx link errors.
Sibras Jun 29, 2024
e93240a
Update ffmpeg.json
Sibras Jun 29, 2024
1b69015
Revert "[ffmpeg] Attempt to fix osx link errors."
Sibras Jun 30, 2024
7a64773
[ffmpeg] disable opencl on osx.
Sibras Jun 30, 2024
7a37c8d
Update ffmpeg.json
Sibras Jun 30, 2024
6d49154
[aubio] disable on osx.
Sibras Jul 6, 2024
d995406
Update aubio.json
Sibras Jul 6, 2024
6ac1283
Merge remote-tracking branch 'upstream' into ffmpeg7
Sibras Jul 28, 2024
cbc1c8b
Update ffmpeg.json
Sibras Jul 28, 2024
1145360
simplify osx patch.
Sibras Jul 28, 2024
30d85e4
Update ffmpeg.json
Sibras Jul 28, 2024
466fc07
Revert "[aubio] disable on osx."
Sibras Jul 28, 2024
f89edc7
Update aubio.json
Sibras Jul 28, 2024
6d89823
fix patch
Sibras Jul 28, 2024
c6c57cb
Update ffmpeg.json
Sibras Jul 28, 2024
2103055
Merge branch 'master' of https://github.com/microsoft/vcpkg into ffmpeg7
Aug 1, 2024
4e5b531
remove port-version
Aug 2, 2024
c2f3437
update git-tree
Aug 2, 2024
0ea67f8
format
Aug 2, 2024
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
15 changes: 15 additions & 0 deletions ports/aubio/ffmpeg7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
index 71ea8b5f..ad91f5eb 100644
--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -345,8 +345,8 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s)
av_channel_layout_default(&input_layout, s->input_channels);
av_channel_layout_default(&output_layout, s->input_channels);

- av_opt_set_chlayout(avr, "in_channel_layout", &input_layout, 0);
- av_opt_set_chlayout(avr, "out_channel_layout", &output_layout, 0);
+ av_opt_set_chlayout(avr, "in_chlayout", &input_layout, 0);
+ av_opt_set_chlayout(avr, "out_chlayout", &output_layout, 0);
#else
int64_t input_layout = av_get_default_channel_layout(s->input_channels);
int64_t output_layout = av_get_default_channel_layout(s->input_channels);
6 changes: 4 additions & 2 deletions ports/aubio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO aubio/aubio
REF 8a05420e5dd8c7b8b2447f82dc919765876511b3
SHA512 080775d7b972d31d88671b4a2917e926bc933b7bdc50fc56a4a8e3174b4544fd6fd416c06b064488cea777cbdd4eea63d0b35eca0025f53ab71da0ba8b64824f
REF 152d6819b360c2e7b379ee3f373d444ab3df0895
SHA512 923529eb27e460293bd2b8b8c53d5eb96553e3e1ece7071904808d8f20f86b7af70bde97d271da9a07ee1898d0840190f265e326e67f48c6f5cadefa034abf0f
HEAD_REF master
PATCHES
ffmpeg7.patch
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
Expand Down
3 changes: 1 addition & 2 deletions ports/aubio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "aubio",
"version-date": "2022-01-26",
"port-version": 1,
"version-date": "2024-01-03",
"description": "Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.",
"homepage": "https://github.com/aubio/aubio",
"license": "GPL-3.0-or-later",
Expand Down
6 changes: 3 additions & 3 deletions ports/ffmpeg/0004-dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ index a8b74e0..c99f41c 100755
enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif ||
@@ -6772,7 +6773,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
@@ -6772,7 +6773,7 @@ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 "openh264 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
-enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create
enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
Expand Down
13 changes: 13 additions & 0 deletions ports/ffmpeg/0005-fix-nasm.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,16 @@ diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile
X86ASM-OBJS-$(CONFIG_OVERLAY_FILTER) += x86/vf_overlay.o
X86ASM-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7.o
X86ASM-OBJS-$(CONFIG_PSNR_FILTER) += x86/vf_psnr.o
diff --git a/libavcodec/x86/vvc/Makefile b/libavcodec/x86/vvc/Makefile
--- a/libavcodec/x86/vvc/Makefile
+++ b/libavcodec/x86/vvc/Makefile
@@ -3,5 +3,7 @@ clean::

OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvcdsp_init.o \
x86/h26x/h2656dsp.o
-X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvc_mc.o \
- x86/h26x/h2656_inter.o
+ifdef ARCH_X86_64
+X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvc_mc.o
+endif
+X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/h26x/h2656_inter.o
4 changes: 2 additions & 2 deletions ports/ffmpeg/0007-fix-lib-naming.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ diff --git a/configure b/configure
index d6c4388..75b96c3 100644
--- a/configure
+++ b/configure
@@ -4378,6 +4378,7 @@ msvc_common_flags(){
-march=*) ;;
@@ -4781,6 +4781,7 @@ msvc_common_flags(){
-mfp16-format=*) ;;
-lz) echo zlib.lib ;;
-lx264) echo libx264.lib ;;
+ -lmp3lame) echo libmp3lame.lib ;;
Expand Down
15 changes: 15 additions & 0 deletions ports/ffmpeg/0024-fix-osx-host-c11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/configure b/configure
index 4f5353f84b..dd9147c677 100755
--- a/configure
+++ b/configure
@@ -5607,8 +5607,8 @@ check_cppflags -D_FILE_OFFSET_BITS=64
check_cppflags -D_LARGEFILE_SOURCE

add_host_cppflags -D_ISOC11_SOURCE
check_host_cflags_cc -std=$stdc ctype.h "__STDC_VERSION__ >= 201112L" ||
- check_host_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L" || die "Host compiler lacks C11 support"
+ check_host_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L"

check_host_cflags -Wall
check_host_cflags $host_cflags_speed

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cd7b0d941c..b4a6dce885 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1010,7 +1010,11 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
@@ -1169,7 +1169,11 @@ typedef struct AVStreamGroup {
} AVStreamGroup;

struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);

+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st);
Expand All @@ -18,10 +18,10 @@ diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
index de7580c32d..0ef0fe530e 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -33,7 +33,14 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return AV_NOPTS_VALUE;
}
#endif
@@ -29,7 +29,14 @@ #include "avformat.h"
#include "avio.h"
#include "internal.h"
#include "mux.h"

+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st)
Expand Down
13 changes: 7 additions & 6 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ffmpeg/ffmpeg
REF "n${VERSION}"
SHA512 a84209fe36a2a0262ebc34b727e7600b12d4739991a95599d7b4df533791b12e2e43586ccc6ff26aab2f935a3049866204e322ec0c5e49e378fc175ded34e183
SHA512 ac147e52557b71cab0a38c0fee5f710a70d7e99107d1cb881e733c489a6b16f99d2c15e00e359ab48353bd710ead13399ee31840e6c5844a11d042eda71a0aa0
HEAD_REF master
PATCHES
0001-create-lib-libraries.patch
0002-fix-msvc-link.patch #upstreamed in future version
0002-fix-msvc-link.patch
0003-fix-windowsinclude.patch
0004-dependencies.patch
0005-fix-nasm.patch #upstreamed in future version
0005-fix-nasm.patch
0007-fix-lib-naming.patch
0012-Fix-ssl-110-detection.patch
0013-define-WINVER.patch
0020-fix-aarch64-libswscale.patch
0024-fix-osx-host-c11.patch
0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium
0041-add-const-for-opengl-definition.patch
0042-fix-arm64-linux.patch #https://github.com/FFmpeg/FFmpeg/commit/fcfd17dbb4a6cf270cdd82e91c21a5efdc878d12
Expand Down Expand Up @@ -49,9 +50,9 @@ if(VCPKG_TARGET_IS_MINGW)
elseif(VCPKG_TARGET_IS_LINUX)
string(APPEND OPTIONS " --target-os=linux --enable-pthreads")
elseif(VCPKG_TARGET_IS_UWP)
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-mediafoundation")
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-d3d12va --enable-mediafoundation")
elseif(VCPKG_TARGET_IS_WINDOWS)
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-dxva2 --enable-mediafoundation")
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-d3d12va --enable-dxva2 --enable-mediafoundation")
elseif(VCPKG_TARGET_IS_OSX)
string(APPEND OPTIONS " --target-os=darwin --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox --enable-videotoolbox")
elseif(VCPKG_TARGET_IS_IOS)
Expand Down Expand Up @@ -91,7 +92,7 @@ if(VCPKG_DETECTED_CMAKE_C_COMPILER)
get_filename_component(CC_filename "${VCPKG_DETECTED_CMAKE_C_COMPILER}" NAME)
set(ENV{CC} "${CC_filename}")
string(APPEND OPTIONS " --cc=${CC_filename}")
#string(APPEND OPTIONS " --host_cc=${CC_filename}") ffmpeg not yet setup for cross builds?
string(APPEND OPTIONS " --host_cc=${CC_filename}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no host_cc in vcpkg.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

host_cc is a command line arg passed to ffmpeg configure script. Due to the way the portfile is calling ffmpegs configure (calld it as cross compile) it fails without this command option

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will also fail with this option except for "almost-native" cross builds.
vcpkg allows you to tell the compiler and flags for the target triplet (e.g. android, ios).
vcpkg allows you to know the host triplet and its install prefix.
vcpkg doesn't allow you to tell the compiler and flags for the host triplet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR vcpkg_configure_make turns the host cc (CC_FOR_BUILD) into a no-op for VCPKG_CROSSCOMPILING.

Copy link
Contributor Author

@Sibras Sibras Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately someone set the cross compile flag for ffmpeg as always on in PR #23001 (see portfile line 459). I have no idea why or what they were trying to fix but I have no way of testing all the various triplets that this effects in order to work out how to disable it again.
Due to changes in ffmpegs internal configure script in 7.0 it now does additional checks on the host compiler when the cross compile flag is passed to it. This is why the line had to be uncommented as its required to pass those checks. The actual compilation though functions the same as previously.

Copy link
Contributor Author

@Sibras Sibras Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR vcpkg_configure_make turns the host cc (CC_FOR_BUILD) into a no-op for VCPKG_CROSSCOMPILING.

Unfortunately the ffmpeg port doesnt use vcpkg_configure_make

It uses vcpkg_execute_required_process to run a custom bash script. The --host_cc command line option is for this bash script to pass through to ffmpegs internal configure script

list(APPEND prog_env "${CC_path}")
endif()

Expand Down
19 changes: 9 additions & 10 deletions ports/ffmpeg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "ffmpeg",
"version": "6.1.1",
"port-version": 11,
"version": "7.0",
"description": [
"a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
"FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations."
Expand Down Expand Up @@ -108,14 +107,6 @@
],
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"opencl"
],
"platform": "!uwp"
},
{
"name": "ffmpeg",
"default-features": false,
Expand Down Expand Up @@ -156,6 +147,14 @@
],
"platform": "!osx & !uwp"
},
{
"name": "ffmpeg",
"default-features": false,
"features": [
"opencl"
],
"platform": "!uwp & !osx"
},
{
"name": "ffmpeg",
"default-features": false,
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/aubio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "31db883042c73ae81e74c010dca29c7fc4e273f9",
"version-date": "2024-01-03",
"port-version": 0
},
{
"git-tree": "e51e332257e4b788828390a39d86109000d5b960",
"version-date": "2022-01-26",
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@
"port-version": 0
},
"aubio": {
"baseline": "2022-01-26",
"port-version": 1
"baseline": "2024-01-03",
"port-version": 0
},
"audiofile": {
"baseline": "1.1.1",
Expand Down Expand Up @@ -2701,8 +2701,8 @@
"port-version": 7
},
"ffmpeg": {
"baseline": "6.1.1",
"port-version": 11
"baseline": "7.0",
"port-version": 0
},
"ffnvcodec": {
"baseline": "12.1.14.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/ffmpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6c14224b4a8c90efabd3640a98f76eaee8607f98",
"version": "7.0",
"port-version": 0
},
{
"git-tree": "15b90b33b76e69c2d9b876b32c4c9b47c97846ed",
"version": "6.1.1",
Expand Down