libraries

[prev] [thread] [next] [lurker] [Date index for 2004/01/30]

From: Simon Wistow
Subject: libraries
Date: 16:50 on 30 Jan 2004
Without meanign to start any holy wars, I think I've been spoiled by 
CPAN. In general documentation for each module on thre follows the 
format

	NAME
	SYNOPSIS
	DESCRIPTION
	METHODS
	BUGS
	AUTHOR
	COPYRIGHT
	SEE ALSO

In SYNOPSIS you get a shor texample of how to use the API of the module. 
This generally means that you can egta  absic version up and working 
very quickly. Anything more complicated may involve rummaging around in 
the METHODS section but at least they're there.

Java libraries, inspired by Sun's own Class library, are also generally 
like this.

However C libraries - now they're a whole different kettle of fish. 

Currently I'm doing a lot of image processign stuff and attempting to 
use various libs to accomplish things. 

Take FFMpeg which has documentation online. If you're like me then what
what you'll mostly be wanting to do is open up a quicktime for writing,
write some frames and close it out. There fore what you need to know is
how to set up the movie, how to add frames (and what format the images
added should be in when you add them) and then what you need to clean up
after.

So let's go to 

	http://ffmpeg.sourceforge.net/ffmpeg-doc.html#SEC30

Do we find that? No. We get a phrase saying 

  "# libavformat is the library containing the file formats handling 
	(mux and demux code for several formats). See `ffplay.c' to use it in a 
	player. See `output_example.c' to use it to generate audio or video 
	streams."


So let's look at output_example.c does *it* have that. Well yes. Sort 
of. It's creates something. But it never exaplisn why it's doing 
anywying, it just has comments saying "allocate the temp picture frame" 
which is perfactly fucking clear from the code which is 

	tmp_picture = alloc_picture(PIX_FMT_YUV420P, c->width, c->height);

TBH, it's not all bad - stuff like Imlib2 has good docs, very much in 
the Perl style.

http://cvs.sourceforge.net/viewcvs.py/enlightenment/e17/libs/imlib2/doc/index.html?rev=1.14&view=html

But I hates the rest.


Generated at 14:02 on 01 Jul 2004 by mariachi 0.52