API changes, most recent first:
+2011-xx-xx - xxxxxxx - lavc 53.15.0
+ Remove avcodec_parse_frame.
+ Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY.
+
2011-10-xx - xxxxxxx - lavf 53.10.0
Add avformat_new_stream(). Deprecate av_new_stream().
* assume the buffer was allocated by avcodec_default_get_buffer.
*/
#define CODEC_CAP_DR1 0x0002
+#if FF_API_PARSE_FRAME
/* If 'parse_only' field is true, then avcodec_parse_frame() can be used. */
#define CODEC_CAP_PARSE_ONLY 0x0004
+#endif
#define CODEC_CAP_TRUNCATED 0x0008
/* Codec can export data for HW decoding (XvMC). */
#define CODEC_CAP_HWACCEL 0x0010
*/
int block_align;
- int parse_only; /* - decoding only: If true, only parsing is done
- (function avcodec_parse_frame()). The frame
- data is returned. Only MPEG codecs support this now. */
+#if FF_API_PARSE_FRAME
+ /**
+ * If true, only parsing is done. The frame data is returned.
+ * Only MPEG audio decoders support this now.
+ * - encoding: unused
+ * - decoding: Set by user
+ */
+ attribute_deprecated int parse_only;
+#endif
/**
* 0-> h263 quant 1-> mpeg quant
*/
void avsubtitle_free(AVSubtitle *sub);
-int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
- int *data_size_ptr,
- uint8_t *buf, int buf_size);
-
/**
* Encode an audio frame from samples into buf.
*
avctx->sample_fmt= OUT_FMT;
s->err_recognition = avctx->err_recognition;
+#if FF_API_PARSE_FRAME
if (!init && !avctx->parse_only) {
+#else
+ if (!init) {
+#endif
int offset;
/* scale factors table for layer 1/2 */
s->frame_size = len;
+#if FF_API_PARSE_FRAME
if (avctx->parse_only)
out_size = buf_size;
else
- out_size = mp_decode_frame(s, out_samples, buf, buf_size);
+#endif
+ out_size = mp_decode_frame(s, out_samples, buf, buf_size);
*data_size = out_size;
return buf_size;
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
};
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
};
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
-#define LIBAVCODEC_VERSION_MINOR 14
+#define LIBAVCODEC_VERSION_MINOR 15
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#ifndef FF_API_GET_ALPHA_INFO
#define FF_API_GET_ALPHA_INFO (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
+#ifndef FF_API_PARSE_FRAME
+#define FF_API_PARSE_FRAME (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
#endif /* AVCODEC_VERSION_H */