Deprecated in 04/2011.
Unified · Split
| @@ -84,14 +84,6 @@ get_next: · 83 unmodified lines | ||
| 84 | 84 | avctx->sample_rate = s->sample_rate; |
| 85 | 85 | |
| 86 | 86 | /* (E-)AC-3: allow downmixing to stereo or mono */ |
| 87 | −#if FF_API_REQUEST_CHANNELS | |
| 88 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 89 | − if (avctx->request_channels == 1) | |
| 90 | − avctx->request_channel_layout = AV_CH_LAYOUT_MONO; | |
| 91 | − else if (avctx->request_channels == 2) | |
| 92 | − avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; | |
| 93 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 94 | −#endif | |
| 95 | 87 | if (s->channels > 1 && |
| 96 | 88 | avctx->request_channel_layout == AV_CH_LAYOUT_MONO) { |
| 97 | 89 | avctx->channels = 1; |
| @@ -190,14 +190,6 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) · 189 unmodified lines | ||
| 190 | 190 | avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; |
| 191 | 191 | |
| 192 | 192 | /* allow downmixing to stereo or mono */ |
| 193 | −#if FF_API_REQUEST_CHANNELS | |
| 194 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 195 | − if (avctx->request_channels == 1) | |
| 196 | − avctx->request_channel_layout = AV_CH_LAYOUT_MONO; | |
| 197 | − else if (avctx->request_channels == 2) | |
| 198 | − avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; | |
| 199 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 200 | −#endif | |
| 201 | 193 | if (avctx->channels > 1 && |
| 202 | 194 | avctx->request_channel_layout == AV_CH_LAYOUT_MONO) |
| 203 | 195 | avctx->channels = 1; |
| @@ -2063,16 +2063,6 @@ typedef struct AVCodecContext { · 2062 unmodified lines | ||
| 2063 | 2063 | */ |
| 2064 | 2064 | int cutoff; |
| 2065 | 2065 | |
| 2066 | −#if FF_API_REQUEST_CHANNELS | |
| 2067 | − /** | |
| 2068 | − * Decoder should decode to this many channels if it can (0 for default) | |
| 2069 | − * - encoding: unused | |
| 2070 | − * - decoding: Set by user. | |
| 2071 | − * @deprecated Deprecated in favor of request_channel_layout. | |
| 2072 | − */ | |
| 2073 | − attribute_deprecated int request_channels; | |
| 2074 | −#endif | |
| 2075 | − | |
| 2076 | 2066 | /** |
| 2077 | 2067 | * Audio channel layout. |
| 2078 | 2068 | * - encoding: set by user. |
| @@ -1307,15 +1307,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, · 1306 unmodified lines | ||
| 1307 | 1307 | s->xch_disable = 1; |
| 1308 | 1308 | } |
| 1309 | 1309 | |
| 1310 | −#if FF_API_REQUEST_CHANNELS | |
| 1311 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1312 | − if (s->xch_present && !s->xch_disable && | |
| 1313 | − (!avctx->request_channels || | |
| 1314 | − avctx->request_channels > num_core_channels + !!s->lfe)) { | |
| 1315 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1316 | −#else | |
| 1317 | 1310 | if (s->xch_present && !s->xch_disable) { |
| 1318 | −#endif | |
| 1319 | 1311 | avctx->channel_layout |= AV_CH_BACK_CENTER; |
| 1320 | 1312 | if (s->lfe) { |
| 1321 | 1313 | avctx->channel_layout |= AV_CH_LOW_FREQUENCY; |
| @@ -1523,12 +1515,6 @@ static av_cold int dca_decode_init(AVCodecContext *avctx) · 201 unmodified lines | ||
| 1523 | 1515 | avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; |
| 1524 | 1516 | |
| 1525 | 1517 | /* allow downmixing to stereo */ |
| 1526 | −#if FF_API_REQUEST_CHANNELS | |
| 1527 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 1528 | − if (avctx->request_channels == 2) | |
| 1529 | − avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; | |
| 1530 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 1531 | −#endif | |
| 1532 | 1518 | if (avctx->channels > 2 && |
| 1533 | 1519 | avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) |
| 1534 | 1520 | avctx->channels = 2; |
| @@ -345,15 +345,6 @@ static int mlp_parse(AVCodecParserContext *s, · 344 unmodified lines | ||
| 345 | 345 | |
| 346 | 346 | if (mh.stream_type == 0xbb) { |
| 347 | 347 | /* MLP stream */ |
| 348 | −#if FF_API_REQUEST_CHANNELS | |
| 349 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 350 | − if (avctx->request_channels > 0 && avctx->request_channels <= 2 && | |
| 351 | − mh.num_substreams > 1) { | |
| 352 | − avctx->channels = 2; | |
| 353 | − avctx->channel_layout = AV_CH_LAYOUT_STEREO; | |
| 354 | − } else | |
| 355 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 356 | −#endif | |
| 357 | 348 | if (avctx->request_channel_layout && |
| 358 | 349 | (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) == |
| 359 | 350 | avctx->request_channel_layout && |
| @@ -366,19 +357,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 6 unmodified lines | ||
| 366 | 357 | } |
| 367 | 358 | } else { /* mh.stream_type == 0xba */ |
| 368 | 359 | /* TrueHD stream */ |
| 369 | −#if FF_API_REQUEST_CHANNELS | |
| 370 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 371 | − if (avctx->request_channels > 0 && avctx->request_channels <= 2 && | |
| 372 | − mh.num_substreams > 1) { | |
| 373 | − avctx->channels = 2; | |
| 374 | − avctx->channel_layout = AV_CH_LAYOUT_STEREO; | |
| 375 | − } else if (avctx->request_channels > 0 && | |
| 376 | − avctx->request_channels <= mh.channels_thd_stream1) { | |
| 377 | − avctx->channels = mh.channels_thd_stream1; | |
| 378 | − avctx->channel_layout = mh.channel_layout_thd_stream1; | |
| 379 | − } else | |
| 380 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 381 | −#endif | |
| 382 | 360 | if (avctx->request_channel_layout && |
| 383 | 361 | (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) == |
| 384 | 362 | avctx->request_channel_layout && |
| @@ -509,19 +509,6 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, · 508 unmodified lines | ||
| 509 | 509 | s->max_channel = max_channel; |
| 510 | 510 | s->max_matrix_channel = max_matrix_channel; |
| 511 | 511 | |
| 512 | −#if FF_API_REQUEST_CHANNELS | |
| 513 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 514 | − if (m->avctx->request_channels > 0 && | |
| 515 | − m->avctx->request_channels <= s->max_channel + 1 && | |
| 516 | − m->max_decoded_substream > substr) { | |
| 517 | − av_log(m->avctx, AV_LOG_DEBUG, | |
| 518 | − "Extracting %d-channel downmix from substream %d. " | |
| 519 | − "Further substreams will be skipped.\n", | |
| 520 | − s->max_channel + 1, substr); | |
| 521 | − m->max_decoded_substream = substr; | |
| 522 | − } else | |
| 523 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 524 | −#endif | |
| 525 | 512 | if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) == |
| 526 | 513 | m->avctx->request_channel_layout && m->max_decoded_substream > substr) { |
| 527 | 514 | av_log(m->avctx, AV_LOG_DEBUG, |
| @@ -393,9 +393,6 @@ static const AVOption avcodec_options[] = { · 392 unmodified lines | ||
| 393 | 393 | {"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, |
| 394 | 394 | {"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, |
| 395 | 395 | {"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, V|E}, |
| 396 | −#if FF_API_REQUEST_CHANNELS | |
| 397 | −{"request_channels", "set desired number of audio channels", OFFSET(request_channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D}, | |
| 398 | −#endif | |
| 399 | 396 | {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, |
| 400 | 397 | {"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"}, |
| 401 | 398 | {"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"}, |
| @@ -48,9 +48,6 @@ · 47 unmodified lines | ||
| 48 | 48 | * the public API and may change, break or disappear at any time. |
| 49 | 49 | */ |
| 50 | 50 | |
| 51 | −#ifndef FF_API_REQUEST_CHANNELS | |
| 52 | −#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 57) | |
| 53 | −#endif | |
| 54 | 51 | #ifndef FF_API_DEINTERLACE |
| 55 | 52 | #define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 57) |
| 56 | 53 | #endif |