conda-forge / ffmpeg-feedstock

A conda-smithy repository for ffmpeg.
BSD 3-Clause "New" or "Revised" License
14 stars 44 forks source link

Enable videotoolbox on osx #242

Closed mmcauliffe closed 5 months ago

mmcauliffe commented 5 months ago

Checklist

This is needed for using ffmpeg as the backend for Qt Multimedia for Qt 6.7: https://github.com/conda-forge/qt-main-feedstock/pull/256.

Addresses #241, but mostly curious in figuring out whether videotoolbox can be re-enabled.

conda-forge-webservices[bot] commented 5 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

mmcauliffe commented 5 months ago

So it's erroring with

libavcodec/videotoolbox.c:918:13: error: call to undeclared function 'VTRegisterProfessionalVideoWorkflowVideoDecoders'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            VTRegisterProfessionalVideoWorkflowVideoDecoders();

I'm not the most knowledgeable about Macs, but is this the result of the specific image that's being used for conda builds? It seems like it should be available on MacOSX 10.9+: https://developer.apple.com/documentation/videotoolbox/vtregisterprofessionalvideoworkflowvideodecoders().

h-vetinari commented 5 months ago

You can try setting

c_stdlib_version:   # [osx and x86_64]
  - "10.13"         # [osx and x86_64]

in recipe/conda_build_config.yaml, and add {{ stdlib("c") }} to the build requirements, and see if that fixes things. It's not a question of availability, but of not using K&R style declaration-less functions. In case the above doesn't help, you can also try

c_compiler_version:            # [osx]
  - 15                         # [osx]
cxx_compiler_version:          # [osx]
  - 15                         # [osx]

to get the last clang version that allowed this kind of thing by default.

mmcauliffe commented 5 months ago

@h-vetinari Perfect, thanks! This should be ready for review now!

hmaarrfk commented 5 months ago

I’m all for bumping the minimum OSX version.

So if that was the only change. I’m all for it.