* 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;
-#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
* - encoding: Set by user.
s->frame_size = len;
-#if FF_API_PARSE_FRAME
- if (avctx->parse_only)
- out_size = buf_size;
- else
-#endif
out_size = mp_decode_frame(s, NULL, buf, buf_size);
*got_frame_ptr = 1;
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
-#if FF_API_PARSE_FRAME
- .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#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 | CODEC_CAP_DR1,
-#else
.capabilities = CODEC_CAP_DR1,
-#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
};
{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_EXPLODE }, INT_MIN, INT_MAX, V|D, "err_detect"},
{"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
-#if FF_API_PARSE_FRAME
-{"parse_only", NULL, OFFSET(parse_only), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
-#endif
{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"stats_out", NULL, OFFSET(stats_out), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX},
{"stats_in", NULL, OFFSET(stats_in), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX},
#ifndef FF_API_REQUEST_CHANNELS
#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
-#ifndef FF_API_PARSE_FRAME
-#define FF_API_PARSE_FRAME (LIBAVCODEC_VERSION_MAJOR < 54)
-#endif
#ifndef FF_API_INTERNAL_CONTEXT
#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
#endif