[FFmpeg-devel] [RFC] decoder/encoder naming consistency

Stefano Sabatini stefano.sabatini-lala
Wed May 27 00:05:55 CEST 2009


On date Tuesday 2009-05-26 15:08:27 +0100, M?ns Rullg?rd encoded:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > On Tue, May 26, 2009 at 02:45:51PM +0100, M?ns Rullg?rd wrote:
> >> Diego Biurrun <diego at biurrun.de> writes:
> >> 
> >> > On Fri, May 22, 2009 at 06:25:20PM +0300, Kostya wrote:
> >> >> On Fri, May 22, 2009 at 04:59:54PM +0200, Diego Biurrun wrote:
> >> >> > I propose renaming files to to adhere to the following naming
> >> >> > convention:
> >> >> > 
> >> >> > foodec.c - decoder for format foo
> >> >> > fooenc.c - encoder for format foo
> >> >> > foo.c    - common code used by both decoder and encoder
> >> >> > 
> >> >> > Currently we have some cases where the encoder is in fooenc. while the
> >> >> > decoder is in foo.c, for example zmbv.c and zmbvenc.c.
> >> >> > 
> >> >> > This should be made consistent.  The cases where we just have a decoder
> >> >> > are secondary, they can remain as foo.c, but when both are available, we
> >> >> > should try to avoid the confusion.
> >> >> > 
> >> >> > The same applies to demuxers and muxers.
> >> >> > 
> >> >> > OK to rename?
> >> >> 
> >> >> I would prefer clear naming scheme (which should be documented as well):
> >> >> * decoder or wrapper -> ${codecname}.c
> >> >> * pure encoder -> ${codecname}enc.c
> >> >> * if common code is present, it should be named {codecname}.c and
> >> >>   decoder should be renamed into ${codecname}dec.c
> >> >
> >> > I don't really care one way or the other.  Does anybody else have a
> >> > preference?
> >> 
> >> I would suggest using ${codec}dec.c and ${codec}enc.c for code
> >> specific to decoding/encoding when new codecs are added.  Already
> >> existing files can keep their names for now.
> >
> > I would like to see existing files follow a consistent naming scheme as
> > well.  It should be easy for new developers to find their way around the
> > codebase.
> 
> A lone ${codec}.c doesn't leave much doubt regarding its contents.
> I'm a bit averse to mass renamings just for the sake of it.
> 
> If you're having one of your periods of compulsive sorting, I can send
> you a randomised list of words from a dictionary or something instead.

I'm for a general renaming if this decreases confusion for the new and
old developers. Both suggestions (Diego's or Kostya's) look valid,
so I'd take that which requires less renamings.

Regards.
-- 
FFmpeg = Fundamentalist and Fundamental Maxi Philosophical Extravagant Guide



More information about the ffmpeg-devel mailing list