[FFmpeg-devel] Per codec defaults
Thu Jan 17 02:50:32 CET 2008
On Thu, Jan 17, 2008 at 01:04:51AM +0000, Robert Swain wrote:
> After discussing per codec defaults with M?ns, he had the idea of
> adding a defaults function to the AVCodec struct and calling
> avcodec_get_context_defaults2 with an AVCodec.
> This sounds like a great idea but after inspecting the code in
> ffmpeg.c it seems that avcodec_get_context_defaults2 isn't quite the
> right place to call the function as it seems to wipe out the
> AVCodecContext then apply some flags and other stuff. The problem is
> that, within this function, the AVCodec isn't known.
> I think it should be called (if existing) just after ffmpeg.c:2882 and
> just before ffmpeg.c:2884. At this point the AVCodec has just been
> successfully discovered by avcodec_find_encoder() and what looks to be
> the command line option parsing for video encoding options is just
> about to be conducted. I think this is the perfect place as it's the
> last chance for defaults to be applied. The call would of course be
> added for audio and subtitles as well, though this seems a little
Please dont design libav* API based on ffmpeg.c design
but rather use common sense, if that isnt enough looking at ffmpeg.c and
other users of libav* is surely a good idea.
But basing design solely on what needs the least changes for ffmpeg is no
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel