[FFmpeg-devel] [PATCH] Make a clear distinction between an unsupported codec and an unknown one
Stefano Sabatini
stefano.sabatini-lala
Mon Sep 1 23:28:52 CEST 2008
On date Monday 2008-09-01 07:10:19 +0200, Vitor Sessak encoded:
> Stefano Sabatini wrote:
[...]
> > Just my 2 ?cent...
> > We could have a list of the formats supported, with a name like
> > AVCodecFormat
> > or
> > AVStreamFormat
> >
> > unfortunately the term "format" creates confusion with the specific
> > (and likely not-so-correct) use of term format done in libavformat.
> >
> > Such structure could contain for example a name, long_name, fourcc,
> > type, and a list of encoders and decoders supporting it (yes it could
> > be more than one, think for example aac/libfaad, last time I tried to do:
> > ffmpeg -acodec libfaad -i ~/test.mov -ar 22100 -vcodec libx264 -t 1.0 -y outfile.mp4
> > I end up decoding with the native decoder...).
>
> I understand the usefulness of your idea (one format, several decoders)
> but I don't see a good way of implementing it without adding another
> list of encoders/decoders (besides the list of formats) or anything else
> ugly.
We would need to register the formats and the codecs, codecs would be
added to the list of every supported format as long as they're
registered.
> > Also, maybe it would make sense to keep there the capabilities and the
> > list of supported things (pix_fmts, framerates, sizes etc.).
>
> I'm not sure if this last point is a good idea. Think of the case where
> have a format that our decoder support both stereo and 5.1 and our
> encoder support only stereo.
Good point. Or we may have that *both* in the codecs *and* in the
stream formats, when missing the codec would take the format ones.
We could have a structure named which could specify the *specific*
formats supported by the codec, which could support a subset/superset
of the referenced stream format, and could be done like this:
typedef struct {
AVCodec *codec; ///< codec owner
AVStreamFormat *format; ///< format referenced
int capabilities; ///< specific capabilities supported by the codec
constraints ...
} AVCodecStreamFormat;
Then every codec could have a list of supported AVCodecStreamFormats
in decoding and in encoding, each one referencing to a specific
AVStreamFormat.
Regards.
--
FFmpeg = Funny Free Meaningful Pitiful Empowered Gospel
More information about the ffmpeg-devel
mailing list