[FFmpeg-devel] On in-tree external headers

Mark Thompson sw at jkqxz.net
Sun Nov 5 20:59:42 EET 2017


On 05/11/17 18:42, Carl Eugen Hoyos wrote:
> 2017-11-05 19:35 GMT+01:00 Mark Thompson <sw at jkqxz.net>:
>> On 05/11/17 18:28, Carl Eugen Hoyos wrote:
>>> 2017-11-05 15:24 GMT+01:00 Mark Thompson <sw at jkqxz.net>:
>>>> On 30/10/17 19:51, Mark Thompson wrote:
>>>
>>>> "No external headers may be included in the ffmpeg tree."
>>>
>>> So you suggest to remove the Nvidia header?
>> If that specific policy is adopted then it would have to be.
> 
> Then I don't think this policy is useful.
> 
> Iirc, there is a second external header, I have never used
> either of those but judging from user response, both features
> are heavily used making a removal a no-go.

Ok, sure.

How about:

"No external headers may be added to the ffmpeg tree, unless they are for AviSynth or Nvidia."

(Documentation patch below.)

>> Alternative proposals are welcome.
> 
> I don't really understand:
> It was mentioned several times in the relevant thread - and
> I completely agree - that the fact that one external header
> is present is no argument to add another. (And iirc - and
> again I agree - it was also argued that pushing on this
> argument is not a good idea.)
> If you believe adding the AMD header makes sense, it may
> possibly be added, if you are against it, it will likely not be
> added.

I do not believe that adding the AMD header is the right thing to do.

But, I want to be clear what the rules are so that they can be applied consistently.  There currently appear to be no written rules, so I would like to write some so that we have a clear answer in this case and don't have this same dispute again in future (see V4L2 two months ago, where there was a pretty much identical argument with a contributor wanting to add their headers to the tree).

- Mark


diff --git a/doc/developer.texi b/doc/developer.texi
index a7b4f1d737..c76e0083ce 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -381,6 +381,16 @@ Never write to unallocated memory, never write over the end of arrays,
 always check values read from some untrusted source before using them
 as array index or other risky things.
 
+ at subheading External headers
+Do not include external headers directly in FFmpeg.  Most packages provide
+suitable headers and linkable libraries when installed, and these should be
+used.  References to external packages in configure should use pkg-config
+if possible to find paths and options - ad-hoc build tests with hard-coded
+paths are to be avoided, but can be used if there is no other possibility.
+If an external package does not provide usable headers or libraries then
+please add directions for how to use it to the documentation.
+AviSynth and Nvidia are exempt from this prohibition on external headers.
+
 @subsection Documentation/Other
 @subheading Subscribe to the ffmpeg-cvslog mailing list.
 It is important to do this as the diffs of all commits are sent there and


More information about the ffmpeg-devel mailing list