Mercurial > libavcodec.hg
comparison avcodec.h @ 9827:bca8ee90e5eb libavcodec
Clarify (re)get_buffer() and CODEC_CAP_DR1 relation.
author | michael |
---|---|
date | Sun, 07 Jun 2009 19:30:54 +0000 |
parents | 37558edc9df2 |
children | ee32274eb802 |
comparison
equal
deleted
inserted
replaced
9826:336d3c384066 | 9827:bca8ee90e5eb |
---|---|
1329 /** | 1329 /** |
1330 * Called at the beginning of each frame to get a buffer for it. | 1330 * Called at the beginning of each frame to get a buffer for it. |
1331 * If pic.reference is set then the frame will be read later by libavcodec. | 1331 * If pic.reference is set then the frame will be read later by libavcodec. |
1332 * avcodec_align_dimensions() should be used to find the required width and | 1332 * avcodec_align_dimensions() should be used to find the required width and |
1333 * height, as they normally need to be rounded up to the next multiple of 16. | 1333 * height, as they normally need to be rounded up to the next multiple of 16. |
1334 * if CODEC_CAP_DR1 is not set then get_buffer() must call | |
1335 * avcodec_default_get_buffer() instead of providing buffers allocated by | |
1336 * some other means. | |
1334 * - encoding: unused | 1337 * - encoding: unused |
1335 * - decoding: Set by libavcodec., user can override. | 1338 * - decoding: Set by libavcodec., user can override. |
1336 */ | 1339 */ |
1337 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); | 1340 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); |
1338 | 1341 |
1957 * Called at the beginning of a frame to get cr buffer for it. | 1960 * Called at the beginning of a frame to get cr buffer for it. |
1958 * Buffer type (size, hints) must be the same. libavcodec won't check it. | 1961 * Buffer type (size, hints) must be the same. libavcodec won't check it. |
1959 * libavcodec will pass previous buffer in pic, function should return | 1962 * libavcodec will pass previous buffer in pic, function should return |
1960 * same buffer or new buffer with old frame "painted" into it. | 1963 * same buffer or new buffer with old frame "painted" into it. |
1961 * If pic.data[0] == NULL must behave like get_buffer(). | 1964 * If pic.data[0] == NULL must behave like get_buffer(). |
1965 * if CODEC_CAP_DR1 is not set then reget_buffer() must call | |
1966 * avcodec_default_reget_buffer() instead of providing buffers allocated by | |
1967 * some other means. | |
1962 * - encoding: unused | 1968 * - encoding: unused |
1963 * - decoding: Set by libavcodec., user can override | 1969 * - decoding: Set by libavcodec., user can override |
1964 */ | 1970 */ |
1965 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic); | 1971 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic); |
1966 | 1972 |