ljubobratovicrelja / ffmpeg-d

D port of the FFmpeg C headers
16 stars 9 forks source link

Corrected libpostproc being linked by default #16

Closed ichordev closed 1 year ago

ichordev commented 1 year ago

The postproc library is automatically included in the list of "libs" in your project's dub.json. However, using it requires the GPL license (rather than LGPL) and it is a mostly useless legacy library. In future versions, this should be opt-in so that people aren't unknowingly breaking the licensing conditions of a library they probably aren't even using.

P.S. I also removed the "platforms" key from the root of the dub.json because it's only meant to be used in configurations to indicate that they're platform-specific, so it produced a warning when building the library:

 Warning ffmpeg-d/dub.json(11:4): platforms: Key is not a
valid member of this section. There are 53 valid keys: name,
description, homepage, authors, copyright, license,
toolchainRequirements, configurations, buildTypes,
-ddoxFilterArgs, -ddoxTool, subPackages, version, dependencies,
systemDependencies, targetType, targetPath, targetName,
workingDirectory, mainSourceFile, subConfigurations, dflags,
lflags, libs, sourceFiles, sourcePaths, excludedSourceFiles,
injectSourceFiles, copyFiles, extraDependencyFiles, versions,
debugVersions, versionFilters, debugVersionFilters,
importPaths, stringImportPaths, preGenerateCommands,
postGenerateCommands, preBuildCommands, postBuildCommands,
preRunCommands, postRunCommands, environments,
buildEnvironments, runEnvironments, preGenerateEnvironments,
postGenerateEnvironments, preBuildEnvironments,
postBuildEnvironments, preRunEnvironments,
postRunEnvironments, buildRequirements, buildOptions
aferust commented 1 year ago

Hello @ichordev, thank you for the contribution. Can you please confirm if this modification has no consequence on DCV, this example in particular? I don't have time to correct this at the moment. This is required because the reason for the existence of this binding was DCV.

ichordev commented 1 year ago

Can you please confirm if this modification has no consequence on DCV, this example in particular? I don't have time to correct this at the moment. This is required because the reason for the existence of this binding was DCV.

I don't see any part of dcv.videoio (the only module that depends on ffmpeg-d) that imports libpostproc explicitly, or the entirety of ffmpeg. So therefore, there should be no consequence to DCV.

If DCV was actually using libpostproc then DCV's license would have to be GPL 2.0 or higher instead of BSL 1.0, or libpostproc would have to be removed. I'd caution anyone against using versions of ffmpeg-d that link libpostproc unconditionally (e.g. the version without this pull) unless they're fully aware of how the GPL license works.

aferust commented 1 year ago

Yes, there is no modules in dcv importing postproc. I think it should be merged. Thank you very much.

aferust commented 1 year ago

Please note that I have only updated the tag v4.4.1 since our version number here should represent the target ffmpeg version. This will be enough for updating the library on the dub registry.