|
|
|
@ -3529,21 +3529,38 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType); |
|
|
|
|
* we WILL change its arguments and name a few times! */ |
|
|
|
|
int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec); |
|
|
|
|
|
|
|
|
|
#if FF_API_ALLOC_CONTEXT |
|
|
|
|
/**
|
|
|
|
|
* Allocate an AVCodecContext and set its fields to default values. The |
|
|
|
|
* resulting struct can be deallocated by simply calling av_free(). |
|
|
|
|
* |
|
|
|
|
* @return An AVCodecContext filled with default values or NULL on failure. |
|
|
|
|
* @see avcodec_get_context_defaults |
|
|
|
|
* |
|
|
|
|
* @deprecated use avcodec_alloc_context3() |
|
|
|
|
*/ |
|
|
|
|
attribute_deprecated |
|
|
|
|
AVCodecContext *avcodec_alloc_context(void); |
|
|
|
|
|
|
|
|
|
/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
|
|
|
|
|
* we WILL change its arguments and name a few times! */ |
|
|
|
|
attribute_deprecated |
|
|
|
|
AVCodecContext *avcodec_alloc_context2(enum AVMediaType); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
|
|
|
|
|
* we WILL change its arguments and name a few times! */ |
|
|
|
|
/**
|
|
|
|
|
* Allocate an AVCodecContext and set its fields to default values. The |
|
|
|
|
* resulting struct can be deallocated by simply calling av_free(). |
|
|
|
|
* |
|
|
|
|
* @param codec if non-NULL, allocate private data and initialize defaults |
|
|
|
|
* for the given codec. It is illegal to then call avcodec_open() |
|
|
|
|
* with a different codec. |
|
|
|
|
* |
|
|
|
|
* @return An AVCodecContext filled with default values or NULL on failure. |
|
|
|
|
* @see avcodec_get_context_defaults |
|
|
|
|
* |
|
|
|
|
* @deprecated use avcodec_alloc_context3() |
|
|
|
|
*/ |
|
|
|
|
AVCodecContext *avcodec_alloc_context3(AVCodec *codec); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -3553,7 +3570,7 @@ AVCodecContext *avcodec_alloc_context3(AVCodec *codec); |
|
|
|
|
* can use this AVCodecContext to decode/encode video/audio data. |
|
|
|
|
* |
|
|
|
|
* @param dest target codec context, should be initialized with |
|
|
|
|
* avcodec_alloc_context(), but otherwise uninitialized |
|
|
|
|
* avcodec_alloc_context3(), but otherwise uninitialized |
|
|
|
|
* @param src source codec context |
|
|
|
|
* @return AVERROR() on error (e.g. memory allocation error), 0 on success |
|
|
|
|
*/ |
|
|
|
@ -3640,7 +3657,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, |
|
|
|
|
* if (!codec) |
|
|
|
|
* exit(1); |
|
|
|
|
* |
|
|
|
|
* context = avcodec_alloc_context(); |
|
|
|
|
* context = avcodec_alloc_context3(codec); |
|
|
|
|
* |
|
|
|
|
* if (avcodec_open(context, codec) < 0) |
|
|
|
|
* exit(1); |
|
|
|
@ -3649,7 +3666,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, |
|
|
|
|
* @param avctx The context which will be set up to use the given codec. |
|
|
|
|
* @param codec The codec to use within the context. |
|
|
|
|
* @return zero on success, a negative value on error |
|
|
|
|
* @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder, avcodec_close |
|
|
|
|
* @see avcodec_alloc_context3, avcodec_find_decoder, avcodec_find_encoder, avcodec_close |
|
|
|
|
* |
|
|
|
|
* @deprecated use avcodec_open2 |
|
|
|
|
*/ |
|
|
|
|