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

Modernize FFmpeg Codebase #944

Merged

Conversation

complexlogic
Copy link
Contributor

As discussed in #939, this PR sets the minimum FFmpeg version to 4.0, and removes the obsolete legacy code from FFmpeg 3.x and earlier. This significantly improves the maintainability of the FFmpeg codebase.

This PR also makes libswscale and libswresample required instead of optional. The historical reasons for why they were made optional are no longer valid today, and it's fair to assume that anyone with an FFmpeg >= 4.0 package will have these libraries installed.

Besides the removals, the following code additions were made:

  • In src/media/UMediaCore_FFMpeg.pas, TPacketQueue's StatusInfo functionality is fixed, which has been broken since ef52574. See @s09bQ5's comment
  • In src/media/UMediaCore_FFMpeg.pas, fix TMediaCore_FFmpeg.GetErrorString, which has been broken for the full Git history

I've successfully built and tested the changes in the following configurations:

  • Linux with FFmpeg 4
  • Linux with FFmpeg 5
  • Linux with FFmpeg 6
  • Linux with FFmpeg 7
  • Windows with FFmpeg 7

Fixes #939

src/media/UVideo.pas Outdated Show resolved Hide resolved
src/media/UVideo.pas Outdated Show resolved Hide resolved
src/media/UAudioDecoder_FFmpeg.pas Show resolved Hide resolved
@barbeque-squared
Copy link
Member

Considering everything still builds and s09bQ5 has already approved this PR and complexlogic has tested it on more platforms than I can do myself, there's no point in me reviewing this further or letting it sit. I did have a look at the markdown changes, and those also all look fine.

Better to get it into master and do a new release in February.

@barbeque-squared barbeque-squared merged commit fc15e33 into UltraStar-Deluxe:master Jan 12, 2025
5 checks passed
@complexlogic complexlogic deleted the modernize_ffmpeg branch January 12, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set Minimum FFmpeg Version
3 participants