2001-07-22 16:18:56 +02:00
|
|
|
1) API
|
|
|
|
------
|
|
|
|
|
|
|
|
* libavcodec is the library containing the codecs (both encoding and
|
|
|
|
decoding). See libavcodec/apiexample.c to see how to use it.
|
|
|
|
|
|
|
|
* libav is the library containing the file formats handling (mux and
|
|
|
|
demux code for several formats). (no example yet, the API is likely
|
|
|
|
to evolve).
|
|
|
|
|
2002-05-20 18:21:46 +02:00
|
|
|
2) Integrating libavcodec or libav in your GPL'ed program
|
|
|
|
---------------------------------------------------------
|
2001-07-23 22:06:54 +02:00
|
|
|
|
|
|
|
You can integrate all the source code of the libraries to link them
|
|
|
|
statically to avoid any version problem. All you need is to provide a
|
|
|
|
'config.mak' and a 'config.h' in the parent directory. See the defines
|
|
|
|
generated by ./configure to understand what is needed.
|
|
|
|
|
|
|
|
3) Coding Rules
|
2001-07-22 16:18:56 +02:00
|
|
|
---------------
|
|
|
|
|
2002-05-20 18:21:46 +02:00
|
|
|
ffmpeg is programmed in ANSI C language. GCC extensions are
|
|
|
|
tolerated. Indent size is 4. The TAB character should not be used.
|
|
|
|
|
|
|
|
The presentation is the one specified by 'indent -i4 -kr'.
|
2001-07-22 16:18:56 +02:00
|
|
|
|
|
|
|
Main priority in ffmpeg is simplicity and small code size (=less
|
|
|
|
bugs).
|
|
|
|
|
2002-05-20 18:21:46 +02:00
|
|
|
Comments: for functions visible from other modules, use the JavaDoc
|
|
|
|
format (see examples in libav/utils.c) so that a documentation can be
|
|
|
|
generated automatically.
|
|
|
|
|
2001-09-16 23:48:33 +02:00
|
|
|
4) Submitting patches
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
When you submit your patch, try to send a unified diff (diff '-u'
|
|
|
|
option). I cannot read other diffs :-)
|
|
|
|
|
2002-05-20 18:21:46 +02:00
|
|
|
Run the regression tests before submitting a patch so that you can
|
|
|
|
verify that there is no big problems.
|
|
|
|
|
2001-09-16 23:48:33 +02:00
|
|
|
Except if your patch is really big and adds an important feature, by
|
|
|
|
submitting it to me, you accept implicitely to put it under my
|
|
|
|
copyright. I prefer to do this to avoid potential problems if
|
|
|
|
licensing of ffmpeg changes.
|
2002-05-20 18:21:46 +02:00
|
|
|
|
2002-08-29 15:29:01 +02:00
|
|
|
Patches should be posted as base64 encoded attachments (or any other
|
|
|
|
encoding which ensures that the patch wont be trashed during
|
|
|
|
transmission) to the ffmpeg-devel mailinglist, see
|
|
|
|
http://lists.sourceforge.net/lists/listinfo/ffmpeg-devel
|
|
|
|
|
2002-05-20 18:21:46 +02:00
|
|
|
5) Regression tests
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Before submitting a patch (or commiting with CVS), you should at least
|
|
|
|
test that you did not break anything.
|
|
|
|
|
|
|
|
The regression test build a synthetic video stream and a synthetic
|
|
|
|
audio stream. Then there are encoded then decoded with all codecs or
|
|
|
|
formats. The CRC (or MD5) of each generated file is recorded in a
|
|
|
|
result file. Then a 'diff' is launched with the reference results and
|
|
|
|
the result file.
|
|
|
|
|
|
|
|
Run 'make test' to test all the codecs.
|
|
|
|
|
|
|
|
Run 'make libavtest' to test all the codecs.
|
|
|
|
|
|
|
|
[Of course, some patches may change the regression tests results. In
|
|
|
|
this case, the regression tests reference results shall be modified
|
|
|
|
accordingly].
|