Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/APIchanges13
-rw-r--r--doc/developer.texi100
-rw-r--r--doc/general.texi13
3 files changed, 92 insertions, 34 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 97a5c0068d..23e568922c 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -22,6 +22,19 @@ API changes, most recent first:
2011-10-20 - b35e9e1 - lavu 51.22.0
Add av_strtok() to avstring.h.
+2011-xx-xx - xxxxxxx - lavc 53.25.0
+ Add nb_samples and extended_data fields to AVFrame.
+ Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE.
+ Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4().
+ avcodec_decode_audio4() writes output samples to an AVFrame, which allows
+ audio decoders to use get_buffer().
+
+2011-xx-xx - xxxxxxx - lavc 53.24.0
+ Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump.
+ Change AVPicture.data[4]/linesize[4] to [8] at next major bump.
+ Change AVCodecContext.error[4] to [8] at next major bump.
+ Add AV_NUM_DATA_POINTERS to simplify the bump transition.
+
2011-11-23 - bbb46f3 - lavu 51.18.0
Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and
av_samples_alloc(), to samplefmt.h.
diff --git a/doc/developer.texi b/doc/developer.texi
index 2052854a40..800ca7d045 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -53,48 +53,26 @@ and should try to fix issues their commit causes.
@anchor{Coding Rules}
@section Coding Rules
-FFmpeg is programmed in the ISO C90 language with a few additional
-features from ISO C99, namely:
-@itemize @bullet
-@item
-the @samp{inline} keyword;
-@item
-@samp{//} comments;
-@item
-designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
-@item
-compound literals (@samp{x = (struct s) @{ 17, 23 @};})
-@end itemize
-
-These features are supported by all compilers we care about, so we will not
-accept patches to remove their use unless they absolutely do not impair
-clarity and performance.
+@subsection Code formatting conventions
-All code must compile with recent versions of GCC and a number of other
-currently supported compilers. To ensure compatibility, please do not use
-additional C99 features or GCC extensions. Especially watch out for:
+There are the following guidelines regarding the indentation in files:
@itemize @bullet
@item
-mixing statements and declarations;
-@item
-@samp{long long} (use @samp{int64_t} instead);
-@item
-@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
-@item
-GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
-@end itemize
-
Indent size is 4.
-The presentation is one inspired by 'indent -i4 -kr -nut'.
+@item
The TAB character is forbidden outside of Makefiles as is any
form of trailing whitespace. Commits containing either will be
rejected by the git repository.
+@item
+You should try to limit your code lines to 80 characters; however, do so if and only if this improves readability.
+@end itemize
+The presentation is one inspired by 'indent -i4 -kr -nut'.
The main priority in FFmpeg is simplicity and small code size in order to
minimize the bug count.
-Comments: Use the JavaDoc/Doxygen
-format (see examples below) so that code documentation
+@subsection Comments
+Use the JavaDoc/Doxygen format (see examples below) so that code documentation
can be generated automatically. All nontrivial functions should have a comment
above them explaining what the function does, even if it is just one sentence.
All structures and their member variables should be documented, too.
@@ -128,11 +106,69 @@ int myfunc(int my_parameter)
...
@end example
+@subsection C language features
+
+FFmpeg is programmed in the ISO C90 language with a few additional
+features from ISO C99, namely:
+@itemize @bullet
+@item
+the @samp{inline} keyword;
+@item
+@samp{//} comments;
+@item
+designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
+@item
+compound literals (@samp{x = (struct s) @{ 17, 23 @};})
+@end itemize
+
+These features are supported by all compilers we care about, so we will not
+accept patches to remove their use unless they absolutely do not impair
+clarity and performance.
+
+All code must compile with recent versions of GCC and a number of other
+currently supported compilers. To ensure compatibility, please do not use
+additional C99 features or GCC extensions. Especially watch out for:
+@itemize @bullet
+@item
+mixing statements and declarations;
+@item
+@samp{long long} (use @samp{int64_t} instead);
+@item
+@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
+@item
+GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
+@end itemize
+
+@subsection Naming conventions
+All names are using underscores (_), not CamelCase. For example, @samp{avfilter_get_video_buffer} is
+a valid function name and @samp{AVFilterGetVideo} is not. The only exception from this are structure names;
+they should always be in the CamelCase
+
+There are following conventions for naming variables and functions:
+@itemize @bullet
+@item
+For local variables no prefix is required.
+@item
+For variables and functions declared as @code{static} no prefixes are required.
+@item
+For variables and functions used internally by the library, @code{ff_} prefix should be used.
+For example, @samp{ff_w64_demuxer}.
+@item
+For variables and functions used internally across multiple libraries, use @code{avpriv_}. For example,
+@samp{avpriv_aac_parse_header}.
+@item
+For exported names, each library has its own prefixes. Just check the existing code and name accordingly.
+@end itemize
+
+@subsection Miscellanous conventions
+@itemize @bullet
+@item
fprintf and printf are forbidden in libavformat and libavcodec,
please use av_log() instead.
-
+@item
Casts should be used only when necessary. Unneeded parentheses
should also be avoided if they don't make the code easier to understand.
+@end itemize
@section Development Policy
diff --git a/doc/general.texi b/doc/general.texi
index 120b7160c2..04ca71db91 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -840,13 +840,22 @@ bash directly to work around this:
bash ./configure
@end example
-@subsection Darwin (MacOS X, iPhone)
+@anchor{Darwin}
+@subsection Darwin (OSX, iPhone)
-MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
+The toolchain provided with Xcode is sufficient to build the basic
+unacelerated code.
+
+OSX on PowerPC or ARM (iPhone) requires a preprocessor from
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
assembler functions. Just download the Perl script and put it somewhere
in your PATH, FFmpeg's configure will pick it up automatically.
+OSX on amd64 and x86 requires @command{yasm} to build most of the
+optimized assembler functions @url{http://mxcl.github.com/homebrew/, Homebrew},
+@url{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml, Gentoo Prefix}
+or @url{http://www.macports.org, MacPorts} can easily provide it.
+
@section Windows
To get help and instructions for building FFmpeg under Windows, check out