Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/2] Harmonise comments about ownership/meaning
@ 2024-02-29 16:23 Andrew Sayers
  2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 1/2] avformat: harmonise "- {decoding, encoding, demuxing, muxing}: " comments Andrew Sayers
  2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments Andrew Sayers
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Sayers @ 2024-02-29 16:23 UTC (permalink / raw)
  To: ffmpeg-devel

There seems to be a couple of documentation conventions in the code:

  /**
   * - encoding: (who sets this in encoding context)
   * - decoding: (who sets this in decoding context)
   */
  int foo;

  /**
   * Encoding: (meaning in encoding context)
   * Decoding: (meaning in decoding context)
   */
  int bar;

These are very useful, but the layout causes some issues:

1. (slightly) different layouts are used in some places
2. doxygen renders the "meaning" layout as one big paragraph, which is hard to read
3. the layouts are quite similar, so it can be hard to tell at a glance
   whether a given piece of documentation is talking about ownership or meaning

For a good example of this issue, please see [1].

Harmonise layouts and propose a new layout for meanings:

  /**
   * *Encoding:*
   *
   *   Meaning in encoding context
   *
   * *Decoding:*
   *
   *   Meaning in decoding context
   */

I hope this isn't too forward for my second day around here, but IMHO
this would significantly improve readability.

[1] https://ffmpeg.org/doxygen/6.0/structAVCodecContext.html#a948993adfdfcd64b81dad1151fe50f33

Andrew Sayers (2):
      avformat: harmonise "- {decoding,encoding,demuxing,muxing}: " comments
      all: harmonise "{Decoding,Encoding,Audio,Video}:" comments

 libavcodec/avcodec.h   | 19 +++++++----
 libavformat/avformat.h | 89 +++++++++++++++++++++++++++-----------------------
 2 files changed, 62 insertions(+), 46 deletions(-)


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-09 20:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 16:23 [FFmpeg-devel] [PATCH 0/2] Harmonise comments about ownership/meaning Andrew Sayers
2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 1/2] avformat: harmonise "- {decoding, encoding, demuxing, muxing}: " comments Andrew Sayers
2024-03-09 16:06   ` Stefano Sabatini
2024-03-09 20:17     ` Andrew Sayers
2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments Andrew Sayers
2024-03-09 16:14   ` Stefano Sabatini

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git