Skip to content

Commit d336c1e

Browse files
authored
MSFT: 58949336 - Update to FFmpeg 8.0 (#334)
## Why is this change being made? We're updating to the latest version of FFmpeg. ## What changed? - Updated to [FFmpeg 8.0](https://github.com/FFmpeg/FFmpeg/releases/tag/n8.0) - [configure: treat unrecognized flags as errors on MSVC · FFmpeg/FFmpeg@bc012ac](FFmpeg/FFmpeg@bc012ac) enabled the [/options:strict (Unrecognized compiler options are errors)](https://learn.microsoft.com/en-us/cpp/build/reference/options-strict?view=msvc-170) compiler option for MSVC builds which caused a D8043 (unrecognized option) compiler error due to the `-GUARD:CF` compiler option set by ‎FFmpegConfig.sh. - I converted `-GUARD:CF` to lowercase `-guard:cf` in FFmpegConfig.sh. This introduced A2029 (unknown command-line argument) errors for gas-preprocessor.pl in ARM/ARM64 builds, so I also updated 000_armasm_flags.patch to filter `-guard:*` compiler options from gas-preprocessor.pl. - [configure: drop yasm support · FFmpeg/FFmpeg@2f888fb](FFmpeg/FFmpeg@2f888fb) dropped yasm support in favor of nasm. - I updated SetUpFFmpegBuildEnvironment.ps1 to install nasm instead of yasm. - [avcodec/defs: Add AV_PROFILE_* defines, deprecate FF_PROFILE_* defines · FFmpeg/FFmpeg@8238bc0](FFmpeg/FFmpeg@8238bc0#diff-ad81ede7da099f4355c4233493a776aaff663e33c7dd66e94fb0cd9f894cd48a) replaced the FF_PROFILE_* defines in libavcodec/avcodec.h with AV_PROFILE_* defines in libavcodec/defs.h. - I replaced FF_PROFILE_H264_BASELINE with AV_PROFILE_H264_BASELINE in H264SampleProvider.h. - Updated NuGet packages to the latest versions ## How was the change tested? I validated the following scenarios: - Ogg playback in MediaPlayerCPP - Ogg playback in Media Player with in-proc WME and out-of-proc WME - Internal Ogg unit tests with in-proc WME and out-of-proc WME
1 parent 35ce053 commit d336c1e

File tree

11 files changed

+30
-29
lines changed

11 files changed

+30
-29
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "ffmpeg"]
22
path = ffmpeg
33
url = https://github.com/FFmpeg/FFmpeg.git
4-
branch = release/7.1
4+
branch = release/8.0

FFmpegConfig.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ common_settings="\
111111
--disable-dxva2 \
112112
--enable-shared \
113113
--enable-cross-compile \
114-
--extra-cflags=\"-GUARD:CF -Qspectre -Gy -Gw\" \
114+
--extra-cflags=\"-guard:cf -Qspectre -Gy -Gw\" \
115115
--extra-ldflags=\"-PROFILE -GUARD:CF -DYNAMICBASE -OPT:ICF -OPT:REF\" \
116116
"
117117

FFmpegInterop/FFmpegInterop.vcxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" />
44
<ItemGroup Label="ProjectConfigurations">
55
<ProjectConfiguration Include="Debug|ARM">
66
<Configuration>Debug</Configuration>
@@ -202,15 +202,15 @@
202202
</ItemGroup>
203203
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
204204
<ImportGroup Label="ExtensionTargets">
205-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
206-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
205+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
206+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
207207
</ImportGroup>
208208
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
209209
<PropertyGroup>
210210
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
211211
</PropertyGroup>
212-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
213-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
214-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
212+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
213+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
214+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
215215
</Target>
216-
</Project>
216+
</Project>

FFmpegInterop/H264SampleProvider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace winrt::FFmpegInterop::implementation
7070
uint8_t GetLevel() const noexcept{ return m_level; }
7171
uint32_t GetSpsId() const noexcept { return m_spsId; }
7272

73-
bool HasNonConstrainedBaseline() const noexcept { return m_profile == FF_PROFILE_H264_BASELINE && !GetConstraintSet1(); }
73+
bool HasNonConstrainedBaseline() const noexcept { return m_profile == AV_PROFILE_H264_BASELINE && !GetConstraintSet1(); }
7474

7575
private:
7676
uint8_t m_profile{ 0 };

FFmpegInterop/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
4-
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240803.1" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
4+
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.250325.1" targetFramework="native" />
55
</packages>

Patches/000_armasm_flags.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/configure b/configure
2-
index d77a55b653..c964c00b91 100755
2+
index 732de59292..abd004981f 100755
33
--- a/configure
44
+++ b/configure
5-
@@ -4799,11 +4799,24 @@ EOF
5+
@@ -4898,11 +4898,25 @@ EOF
66
fi
77

88
armasm_flags(){
@@ -22,6 +22,7 @@ index d77a55b653..c964c00b91 100755
2222
+ @*) skip_arg=true ;;
2323
+ -analyze*) skip_arg=true ;;
2424
+ -experimental:log*) skip_arg=true ;;
25+
+ -guard:*) ;;
2526
-M[TD]*) ;;
2627
+ -Q*) ;;
2728
*) echo $flag ;;

Samples/MediaPlayerCPP/MediaPlayerCPP.vcxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" />
44
<PropertyGroup Label="Globals">
55
<CppWinRTOptimized>true</CppWinRTOptimized>
66
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@@ -185,15 +185,15 @@
185185
</Target>
186186
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
187187
<ImportGroup Label="ExtensionTargets">
188-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
189-
<Import Project="$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
188+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
189+
<Import Project="$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
190190
</ImportGroup>
191191
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
192192
<PropertyGroup>
193193
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
194194
</PropertyGroup>
195-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
196-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
197-
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
195+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
196+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
197+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
198198
</Target>
199-
</Project>
199+
</Project>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
4-
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240803.1" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.250303.1" targetFramework="native" />
4+
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.250325.1" targetFramework="native" />
55
</packages>

SetUpFFmpegBuildEnvironment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ for ($i = 0; $i -lt 2; $i++)
8080
}
8181

8282
# Install additional packages
83-
$packages = @('make', 'gcc', 'diffutils', 'yasm')
83+
$packages = @('make', 'gcc', 'diffutils', 'nasm')
8484
foreach ($package in $packages)
8585
{
8686
Write-Host "Installing $package..."

Tests/UnitTest.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@
167167
<Version>6.2.14</Version>
168168
</PackageReference>
169169
<PackageReference Include="MSTest.TestAdapter">
170-
<Version>3.6.2</Version>
170+
<Version>3.10.4</Version>
171171
</PackageReference>
172172
<PackageReference Include="MSTest.TestFramework">
173-
<Version>3.6.2</Version>
173+
<Version>3.10.4</Version>
174174
</PackageReference>
175175
<PackageReference Include="Newtonsoft.Json">
176176
<Version>13.0.3</Version>
177177
</PackageReference>
178178
<PackageReference Include="System.Xml.XPath.XmlDocument">
179-
<Version>4.3.0</Version>
179+
<Version>4.7.0</Version>
180180
</PackageReference>
181181
</ItemGroup>
182182
<PropertyGroup>
@@ -193,4 +193,4 @@
193193
<Target Name="AfterBuild">
194194
</Target>
195195
-->
196-
</Project>
196+
</Project>

0 commit comments

Comments
 (0)