summaryrefslogtreecommitdiff
path: root/doc/ffmpeg-doc.texi
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-07-15 12:54:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-07-15 12:54:38 +0000
commitf4888b830f44349de0bb137bc913ea6193adbe9e (patch)
tree9dc16e6d3009f1c5bd4ecc6796e981456808da5c /doc/ffmpeg-doc.texi
parenta708785f2e692073b2864bc302f9254492ffcec0 (diff)
Doxygen example
Originally committed as revision 3316 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'doc/ffmpeg-doc.texi')
-rw-r--r--doc/ffmpeg-doc.texi32
1 files changed, 30 insertions, 2 deletions
diff --git a/doc/ffmpeg-doc.texi b/doc/ffmpeg-doc.texi
index 4d21dd84f8..211e7ddb2a 100644
--- a/doc/ffmpeg-doc.texi
+++ b/doc/ffmpeg-doc.texi
@@ -987,11 +987,39 @@ Main priority in ffmpeg is simplicity and small code size (=less
bugs).
Comments: use the JavaDoc/Doxygen
-format (see examples in @file{libavformat/utils.c}) so that a documentation
+format (see examples below) so that a documentation
can be generated automatically. All non trivial functions should have a comment
above it explaining what the function does, even if its just one sentance.
All Structures and their member variables should be documented too.
-
+@example
+/**
+ * @file mpeg.c
+ * mpeg codec.
+ * @author ...
+ */
+
+/**
+ * Summary sentance.
+ * more text ...
+ * ...
+ */
+typedef struct Foobar{
+    int var1; /**< var1 description */
+    int var2; ///< var2 description
+    /** var3 description */
+    int var3;
+} Foobar;
+
+/**
+ * Summary sentance.
+ * more text ...
+ * ...
+ * @param my_parameter description of my_parameter
+ * @return return value description
+ */
+int myfunc(int my_parameter)
+...
+@end example
fprintf and printf are forbidden in libavformat and libavcodec,
please use av_log() instead.