Several encoding changes: for video, double check the pix_fmt after opening the AVCod...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Wed, 12 Nov 2003 10:42:36 +0000 (10:42 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Wed, 12 Nov 2003 10:42:36 +0000 (10:42 +0000)
commit199e7f14f23335d02362ded89ba9b8829591e810
treedf03298f5fa5f8719026d0e23cc9bb3c89d12571
parentd26aa5ad0b6e5443b9253b386e42bbd7d94b5c87
Several encoding changes: for video, double check the pix_fmt after opening the AVCodec. The pix_fmt will be changed ...

Original commit message from CVS:
Several encoding changes:
* for video, double check the pix_fmt after opening the AVCodec. The pix_fmt
will be changed to the preferred pix_fmt instead of that opening the
codec fails. We fail when it has changed (then, ffmpeg doesn't like it).
* for video, set the correct timestamp.
* for audio, do *not* set the frame_size: most codecs don't like it. Instead,
keep a cache of buffers and always give data of size "frame_size". Maybe
I should have used bytestream here, I'm not sure. This works, though.
I can now create mpeg1 video, mp2 and ac3 audio. I didn't test any others yet.
I also didn't start working on integration with any of the muxers yet, that's
all one big TODO. One thing at a time, please. :).
ext/ffmpeg/gstffmpegcodecmap.c
ext/ffmpeg/gstffmpegenc.c