From patchwork Sun Nov 26 08:31:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim DeLaHunt X-Patchwork-Id: 6362 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp306445jah; Sun, 26 Nov 2017 00:32:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMYuAexENBHHxhURgSXpTGBUOh8XIlPQT6nZdZwvSZRoZtTExZOj1YfNLzr7OXYmhzPNGF3Y X-Received: by 10.28.211.15 with SMTP id k15mr13452297wmg.33.1511685121872; Sun, 26 Nov 2017 00:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511685121; cv=none; d=google.com; s=arc-20160816; b=0O0Yr5Zxvtsxy7Zg7HrrHiCp8Tg+VlVH4btNOxtk8DTATy4jlq8V7Vi7VOOnKGPmvk hSmWG/mxdoIMbhzenndjn2mM9ZA1yVrClAKVMlJpgvtnr+icEalZ7s9FMJPxPnjHpY5c zvolOTGgo6Zz5CvRYGXS8cVHlG4nnoBDRB12K3FttwjG7zrrsckkJ9Od3M4R/LR3w8WF dlxXwYkDbGYqI3ifMmyrBQD1/Pz9BXx7QNgsSfIFR41JfJ0RCzg59VDiIr+8ftm2bN0m /L9SdhL2OWjpyt7Ob9/IgvCAnpEFXyOXP9mjDfDae6IO7fUmQLrXhAHQglf7q/ItOlLd cYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=/jJxAEVnoAqfX8Rqc5hsTpeYhmwLQ0B/SgCZpUiwmmw=; b=FgNRvKXOGFpm21oxZiXJsXS5VHcd7vLVVHquAeob+x3ifi+5koDgxmXxWFTOm0aNdH DaCfK9MSMc54kjTk/mUY4nWmxZA3S+Zup/qC96brNIVngVZZnAJCYeo18D75GtdDtBzy hM+o7m4CMtheKt+Ia0ZbNmN5I3zUCa6IU2fPBGpX4vxU7eIu1NgM9RYnb2oBm6Kfbm1V xrGv1kqB6MECCJcn4B4m5ZqYgAVOLbwx4fZ3iSCbw0dmY2YhsI5BUie21VwIncX8Dm84 rlP8E+ypG90/NTkw5WIuirqloIivwLl8tzyiib/GVgPY9gjg9k6jN9qfe495Y8UXOWdB L5uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jdlh.com header.s=jdlh.com header.b=CHFj/q4s; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l18si20133794wre.410.2017.11.26.00.32.00; Sun, 26 Nov 2017 00:32:01 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@jdlh.com header.s=jdlh.com header.b=CHFj/q4s; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D58B68A31B; Sun, 26 Nov 2017 10:31:57 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from homiemail-a13.g.dreamhost.com (sub3.mail.dreamhost.com [69.163.253.7]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A6EE68A190 for ; Sun, 26 Nov 2017 10:31:50 +0200 (EET) Received: from homiemail-a13.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTP id C52F5334076; Sun, 26 Nov 2017 00:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jdlh.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=jdlh.com; bh= ZesG2YyW9LLUmdjWbu+0QZ3J5Fc=; b=CHFj/q4sNimUA23BIcM2qeTlG3h0WGPw MONxXQo4Y9JOp52U6enQ3jGDtCJcIaJtz+X38miihG1PW05bcCHOvIIJedceAvAC +BQHHI7sjwnR3/OmJxw6zvB0iy1NdPQ+Osqkua+lftAEauAuO5JY8VK+rwhTJKDn 4WtqhTO/CKg= Received: from localhost.localdomain (216-19-185-177.dyn.novuscom.net [216.19.185.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jdlh@jdlh.com) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPSA id 972D2334075; Sun, 26 Nov 2017 00:31:49 -0800 (PST) From: Jim DeLaHunt To: ffmpeg-devel@ffmpeg.org Date: Sun, 26 Nov 2017 00:31:11 -0800 Message-Id: <20171126083111.91454-1-from.ffmpeg-dev@jdlh.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171121214156.9256-1-from.ffmpeg-dev@jdlh.com> References: <20171121214156.9256-1-from.ffmpeg-dev@jdlh.com> Subject: [FFmpeg-devel] [PATCH] Refactor Developer Docs, update dev list section (v2) X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Jim DeLaHunt MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Previously, the Developer Documentation contained a single chapter, 1. Developer Guide, with all content under that single chapter. Thus the document structure was one level deeper and more complicated than it needed to be. It differed from similar documents such as /faq.html, which have multiple chapters. Also, the Developer Documentation had instructions to subscribe to the ffmpeg-cvslog email list. But that is no longer accurate. For the purposes in this section -- review of patches, discussion of development issues -- ffmpeg_devel is the appropriate email list. Some developers may want to monitor ffmpeg-cvslog, but it is not mandatory for all contributors. 1. In doc/developer.texi, eliminate the single chapter, and promote each section underneath to chapter, and each subsection to section. Thus content and relative structure remains the same, but the overall structure is simpler. Anchors within the page remain the same. 2. In doc/developer.texi, add a new section about ffmpeg-devel, based on existing text from ffmpeg-cvslog section regarding discussion of patches and of development issues. 3. In doc/developer.texi, rewrite the ffmpeg-cvslog section to match the current usage of ffmpeg-cvslog. Some developers choose to follow this list, but it is not mandatory. See ffmpeg-devel thread about the first version of this patch, at . I believe all comments to date in that thread are addressed with this patch. I believe there were no links to the eliminated "Developer Documentation" chapter, based on a search of the source code. There are a lot of improvements possible to the Developer Documentation page, beyond this refactoring. However, making those improvements is a much bigger and more difficult task. This change is "low hanging fruit". Signed-off-by: Jim DeLaHunt --- doc/developer.texi | 74 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/doc/developer.texi b/doc/developer.texi index a7b4f1d737..bdcce015d3 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -10,9 +10,7 @@ @contents -@chapter Developers Guide - -@section Notes for external developers +@chapter Notes for external developers This document is mostly useful for internal FFmpeg developers. External developers who need to use the API in their application should @@ -30,7 +28,7 @@ For more detailed legal information about the use of FFmpeg in external programs read the @file{LICENSE} file in the source tree and consult @url{https://ffmpeg.org/legal.html}. -@section Contributing +@chapter Contributing There are 3 ways by which code gets into FFmpeg. @itemize @bullet @@ -47,9 +45,9 @@ The developer making the commit and the author are responsible for their changes and should try to fix issues their commit causes. @anchor{Coding Rules} -@section Coding Rules +@chapter Coding Rules -@subsection Code formatting conventions +@section Code formatting conventions There are the following guidelines regarding the indentation in files: @@ -74,7 +72,7 @@ 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. -@subsection Comments +@section 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. @@ -114,7 +112,7 @@ int myfunc(int my_parameter) ... @end example -@subsection C language features +@section C language features FFmpeg is programmed in the ISO C90 language with a few additional features from ISO C99, namely: @@ -160,7 +158,7 @@ mixing statements and declarations; GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}). @end itemize -@subsection Naming conventions +@section Naming conventions All names should be composed with underscores (_), not CamelCase. For example, @samp{avfilter_get_video_buffer} is an acceptable function name and @samp{AVFilterGetVideo} is not. The exception from this are type names, like @@ -204,7 +202,7 @@ letter as they are reserved by the C standard. Names starting with @code{_} are reserved at the file level and may not be used for externally visible symbols. If in doubt, just avoid names starting with @code{_} altogether. -@subsection Miscellaneous conventions +@section Miscellaneous conventions @itemize @bullet @item @@ -216,7 +214,7 @@ 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 -@subsection Editor configuration +@section Editor configuration In order to configure Vim to follow FFmpeg formatting conventions, paste the following snippet into your @file{.vimrc}: @example @@ -249,9 +247,9 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}: (setq c-default-style "ffmpeg") @end lisp -@section Development Policy +@chapter Development Policy -@subsection Patches/Committing +@section Patches/Committing @subheading Licenses for patches must be compatible with FFmpeg. Contributions should be licensed under the @uref{http://www.gnu.org/licenses/lgpl-2.1.html, LGPL 2.1}, @@ -350,7 +348,7 @@ time-frame (12h for build failures and security fixes, 3 days small changes, 1 week for big patches) then commit your patch if you think it is OK. Also note, the maintainer can simply ask for more time to review! -@subsection Code +@section Code @subheading API/ABI changes should be discussed before they are made. Do not change behavior of the programs (renaming options etc) or public API or ABI without first discussing it on the ffmpeg-devel mailing list. @@ -381,12 +379,26 @@ Never write to unallocated memory, never write over the end of arrays, always check values read from some untrusted source before using them as array index or other risky things. -@subsection Documentation/Other +@section Documentation/Other +@subheading Subscribe to the ffmpeg-devel mailing list. +It is important to be subscribed to the +@uref{https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel, ffmpeg-devel} +mailing list, because any patch you contribute must be sent there +and reviewed by the other developers. They may have comments about your +contribution. We expect you see those comments, and to improve your contribution +if requested. +Also, this list is where bugs and possible improvements or +general questions regarding commits are discussed. That may be helpful +information as you write your contribution. Finally, by being a list +subscriber your contribution will be posted immediately to the list, +without the moderation hold which messages from non-subscribers experience. + @subheading Subscribe to the ffmpeg-cvslog mailing list. -It is important to do this as the diffs of all commits are sent there and -reviewed by all the other developers. Bugs and possible improvements or -general questions regarding commits are discussed there. We expect you to -react if problems with your code are uncovered. +Diffs of all commits are sent to the +@uref{https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-cvslog, ffmpeg-cvslog} +mailing list. Some developers read this list to review all code base changes +from all sources. Subscribing to this list is not mandatory, if +all you want to do is submit a patch here and there. @subheading Keep the documentation up to date. Update the documentation if you change behavior or add features. If you are @@ -406,7 +418,7 @@ finding a new maintainer and also don't forget to update the @file{MAINTAINERS} We think our rules are not too hard. If you have comments, contact us. -@section Code of conduct +@chapter Code of conduct Be friendly and respectful towards others and third parties. Treat others the way you yourself want to be treated. @@ -436,7 +448,7 @@ Finally, keep in mind the immortal words of Bill and Ted, "Be excellent to each other." @anchor{Submitting patches} -@section Submitting patches +@chapter Submitting patches First, read the @ref{Coding Rules} above if you did not yet, in particular the rules regarding patch submission. @@ -485,7 +497,7 @@ Give us a few days to react. But if some time passes without reaction, send a reminder by email. Your patch should eventually be dealt with. -@section New codecs or formats checklist +@chapter New codecs or formats checklist @enumerate @item @@ -537,7 +549,7 @@ Did you make sure it compiles standalone, i.e. with @end enumerate -@section patch submission checklist +@chapter patch submission checklist @enumerate @item @@ -650,7 +662,7 @@ Test your code with valgrind and or Address Sanitizer to ensure it's free of leaks, out of array accesses, etc. @end enumerate -@section Patch review process +@chapter Patch review process All patches posted to ffmpeg-devel will be reviewed, unless they contain a clear note that the patch is not for the git master branch. @@ -681,7 +693,7 @@ to be reviewed, please consider helping to review other patches, that is a great way to get everyone's patches reviewed sooner. @anchor{Regression tests} -@section Regression tests +@chapter Regression tests Before submitting a patch (or committing to the repository), you should at least test that you did not break anything. @@ -692,7 +704,7 @@ Running 'make fate' accomplishes this, please see @url{fate.html} for details. this case, the reference results of the regression tests shall be modified accordingly]. -@subsection Adding files to the fate-suite dataset +@section Adding files to the fate-suite dataset When there is no muxer or encoder available to generate test media for a specific test then the media has to be included in the fate-suite. @@ -703,7 +715,7 @@ Once you have a working fate test and fate sample, provide in the commit message or introductory message for the patch series that you post to the ffmpeg-devel mailing list, a direct link to download the sample media. -@subsection Visualizing Test Coverage +@section Visualizing Test Coverage The FFmpeg build system allows visualizing the test coverage in an easy manner with the coverage tools @code{gcov}/@code{lcov}. This involves @@ -730,7 +742,7 @@ You can use the command @code{make lcov-reset} to reset the coverage measurements. You will need to rerun @code{make lcov} after running a new test. -@subsection Using Valgrind +@section Using Valgrind The configure script provides a shortcut for using valgrind to spot bugs related to memory handling. Just add the option @@ -744,7 +756,7 @@ In case you need finer control over how valgrind is invoked, use the your configure line instead. @anchor{Release process} -@section Release process +@chapter Release process FFmpeg maintains a set of @strong{release branches}, which are the recommended deliverable for system integrators and distributors (such as @@ -776,7 +788,7 @@ adjustments to the symbol versioning file. Please discuss such changes on the @strong{ffmpeg-devel} mailing list in time to allow forward planning. @anchor{Criteria for Point Releases} -@subsection Criteria for Point Releases +@section Criteria for Point Releases Changes that match the following criteria are valid candidates for inclusion into a point release: @@ -800,7 +812,7 @@ point releases of the same release branch. The order for checking the rules is (1 OR 2 OR 3) AND 4. -@subsection Release Checklist +@section Release Checklist The release process involves the following steps: