sunlubo / SwiftFFmpeg

A Swift wrapper for the FFmpeg API
Apache License 2.0
521 stars 83 forks source link

Potentially scary side-effects of decoupling SwiftFFmpeg/CFFmpeg enums #35

Open gregcotten opened 4 years ago

gregcotten commented 4 years ago

Just encountered an issue with an off-by-one enum in SwiftFFmpeg.AVHWDeviceContext which is missing "vaapi" between "cuda" and "dxva2" (pull request incoming). I'm not sure where or how this occurred - was vaapi added by FFmpeg at some point?

The old way of doing the SwiftFFmpeg enums might have been better as there would never be a latent issue like this. I'm not sure if that means this new way isn't better, but definitely something to consider!

sunlubo commented 4 years ago

This should be left out when I wrote it. The new way is to avoid exporting the CFFmpeg module's symbol.

gregcotten commented 4 years ago

Can you point to an example in the source code of what we should be doing with the new "native" approach?

gregcotten commented 4 years ago

Happy to start making changes to make sure everything works properly