[FFmpeg-devel] [RFC] documenting the table generator infrastructure
Michael Niedermayer
michaelni
Wed Mar 24 15:22:46 CET 2010
On Mon, Mar 22, 2010 at 12:14:33AM +0100, Reimar D?ffinger wrote:
> On Sun, Mar 21, 2010 at 10:44:32PM +0100, Reimar D?ffinger wrote:
> > > 2. It must be possible to write a table generator from a single 80x25
> > > page of documentation without having to refer to another generator
> > > and copy & pasting from it because nothing makes any sense and nothing
> > > is documented.
> > > if you need more than 80x25 chars to document it then there is something
> > > wrong IMHO
> >
> > I guess a 80x25 documentation containing "copy and paste this" is not what you want :-)
> > I'll look into it - somewhen.
>
> Twice your requested size, probably badly written and incomplete,
> but here's a first draft.
> Input from everyone is welcome, even if we don't find a solution simple enough
> to please Michael at least the current, ugly one then is better documented.
yes and please commit this so the docs are at least available in svm
> Writing a table generator
>
> Basic concepts
>
> A table generator consists of two files, *_tablegen.c and *_tablegen.h.
> The .h file will provide the variable declarations and initialization
> code for the tables, the .c describes the tables so they can be printed
> as a header file.
shouldnt the c then be called *_tableprint.c ?
> Both of these files will be compiled for the host system, so to avoid
> breakage with cross-compilation neither of them may include, directly
> or indirectly, config.h or avconfig.h.
> Due to this, the .c file or Makefile may have to provide additional defines
> or stubs, though if possible this should be avoided.
>
> The .c file
>
> This file should include the *_tablegen.h and tableprint.h files and
> anything else it needs as long as it does not depend on config.h or
> avconfig.h.
> In addition to that it must contain a void tableinit(void) function
> which initializes all tables by calling the init functions from the .h
> file.
i wonder if it could instead contain a main() function and be a proper
C program, that be cleaner and alot so
> In addition it must also contain a "const struct tabledef tables[]"
> array describing the tables to be generated.
this too is ugly, a print_tables(tables) with no naming constraint on
tables seems cleaner
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100324/15c82f05/attachment.pgp>
More information about the ffmpeg-devel
mailing list