[x264-devel] Re: [PATCH] move x264_levels extern from x264.h to set.h

Loren Merritt lorenm at u.washington.edu
Thu Feb 1 08:39:04 CET 2007


On Thu, 1 Feb 2007, Limin Wang wrote:
> * Loren Merritt <lorenm at u.washington.edu> [2007-01-31 20:10:59 -0700]:
>>
>> I don't know of any applications that use x264_levels[], but I think it
>> should be part of the API. Because selecting a level is only informative,
>> it doesn't modify all the other settings to be compliant with the level.
>> (And x264 can't do the enforcement, because levels limit some things
>> like resolution and framerate that x264 can't change.)
>> So if an application wants to do the levels configuration rather than pass
>> it on to the user, it needs to access the table of constraints.
>
> If it's part of the API, then it's necessary to add x264_get_levels()
> API instead of extern directly, for application have no way see the
> real content of internal  x264_levels[].

A library is just an archive containing .o files. Anything you can link 
from another object file, you can link from a library too. If you need 
proof, see the attached. Also, the standard libraries export variables 
too, e.g. errno and getopt.

Or do you have some philosophical argument that "API" should mean only 
functions and typedefs, not variables?

--Loren Merritt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: levels.c
Type: text/x-csrc
Size: 617 bytes
Desc: levels.c
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20070201/42ece3dc/attachment.c 
-------------- next part --------------
levels: levels.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lx264


More information about the x264-devel mailing list