[FFmpeg-devel] AVCodec struct fields (encode function prototype)
Fri Oct 22 15:04:41 CEST 2010
Ooops.... Thank you for your prompt response, Ronald.
I get it now.
Le Hong Dang.
On 10/22/2010 6:35 PM, Ronald S. Bultje wrote:
> On Fri, Oct 22, 2010 at 6:25 AM, Dang Le<babyprez at gmail.com> wrote:
>> Hi all,
>> I'm writing my own codec for ffmpeg.
>> I have completed the decoder and it works well thanks to nice explanations
>> about the parameters of decode frame function from here:
>> Unfortunately, there's no documentation on the encode frame function
>> (parameters& return value) out there.
>> Could someone please help me to understand those params?
>> The function prototype is:
>> int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
>> Particularly: buf, buf_size and data. which is the input, which is the
>> Do I have to av_malloc memory for the output or not?
> void *data, for video, is a AVFrame *pict which contains uncompressed input.
> buf/buf_size is output buffer and max buffer size. The return value of
> the function should be the number of bytes actually filled. See also
> avcodec_encode_video() and its documentation.
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel