History

lavc: Drop deprecated request_channels related functions

Deprecated in 04/2011.

Vittorio Giovara committed 11 years ago

Commit dc70c191 parent f6974fe8 files · +0 −81Browse files

Unified · Split

8 files
  1. libavcodec/aac_ac3_parser.c +0 −8
  2. libavcodec/ac3dec.c +0 −8
  3. libavcodec/avcodec.h +0 −10
  4. libavcodec/dcadec.c +0 −14
  5. libavcodec/mlp_parser.c +0 −22
  6. libavcodec/mlpdec.c +0 −13
  7. libavcodec/options_table.h +0 −3
  8. libavcodec/version.h +0 −3
libavcodec/aac_ac3_parser.c+0−8
@@ -84,14 +84,6 @@ get_next: · 83 unmodified lines
84 avctx->sample_rate = s->sample_rate;84 avctx->sample_rate = s->sample_rate;
85 85
86 /* (E-)AC-3: allow downmixing to stereo or mono */86 /* (E-)AC-3: allow downmixing to stereo or mono */
87#if FF_API_REQUEST_CHANNELS
88FF_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;
93FF_ENABLE_DEPRECATION_WARNINGS
94#endif
95 if (s->channels > 1 &&87 if (s->channels > 1 &&
96 avctx->request_channel_layout == AV_CH_LAYOUT_MONO) {88 avctx->request_channel_layout == AV_CH_LAYOUT_MONO) {
97 avctx->channels = 1;89 avctx->channels = 1;
libavcodec/ac3dec.c+0−8
@@ -190,14 +190,6 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) · 189 unmodified lines
190 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;190 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
191 191
192 /* allow downmixing to stereo or mono */192 /* allow downmixing to stereo or mono */
193#if FF_API_REQUEST_CHANNELS
194FF_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;
199FF_ENABLE_DEPRECATION_WARNINGS
200#endif
201 if (avctx->channels > 1 &&193 if (avctx->channels > 1 &&
202 avctx->request_channel_layout == AV_CH_LAYOUT_MONO)194 avctx->request_channel_layout == AV_CH_LAYOUT_MONO)
203 avctx->channels = 1;195 avctx->channels = 1;
libavcodec/avcodec.h+0−10
@@ -2063,16 +2063,6 @@ typedef struct AVCodecContext { · 2062 unmodified lines
2063 */2063 */
2064 int cutoff;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 * Audio channel layout.2067 * Audio channel layout.
2078 * - encoding: set by user.2068 * - encoding: set by user.
libavcodec/dcadec.c+0−14
@@ -1307,15 +1307,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, · 1306 unmodified lines
1307 s->xch_disable = 1;1307 s->xch_disable = 1;
1308 }1308 }
1309 1309
1310#if FF_API_REQUEST_CHANNELS
1311FF_DISABLE_DEPRECATION_WARNINGS
1312 if (s->xch_present && !s->xch_disable &&
1313 (!avctx->request_channels ||
1314 avctx->request_channels > num_core_channels + !!s->lfe)) {
1315FF_ENABLE_DEPRECATION_WARNINGS
1316#else
1317 if (s->xch_present && !s->xch_disable) {1310 if (s->xch_present && !s->xch_disable) {
1318#endif
1319 avctx->channel_layout |= AV_CH_BACK_CENTER;1311 avctx->channel_layout |= AV_CH_BACK_CENTER;
1320 if (s->lfe) {1312 if (s->lfe) {
1321 avctx->channel_layout |= AV_CH_LOW_FREQUENCY;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 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;1515 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
1524 1516
1525 /* allow downmixing to stereo */1517 /* allow downmixing to stereo */
1526#if FF_API_REQUEST_CHANNELS
1527FF_DISABLE_DEPRECATION_WARNINGS
1528 if (avctx->request_channels == 2)
1529 avctx->request_channel_layout = AV_CH_LAYOUT_STEREO;
1530FF_ENABLE_DEPRECATION_WARNINGS
1531#endif
1532 if (avctx->channels > 2 &&1518 if (avctx->channels > 2 &&
1533 avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)1519 avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)
1534 avctx->channels = 2;1520 avctx->channels = 2;
libavcodec/mlp_parser.c+0−22
@@ -345,15 +345,6 @@ static int mlp_parse(AVCodecParserContext *s, · 344 unmodified lines
345 345
346 if (mh.stream_type == 0xbb) {346 if (mh.stream_type == 0xbb) {
347 /* MLP stream */347 /* MLP stream */
348#if FF_API_REQUEST_CHANNELS
349FF_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
355FF_ENABLE_DEPRECATION_WARNINGS
356#endif
357 if (avctx->request_channel_layout &&348 if (avctx->request_channel_layout &&
358 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==349 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
359 avctx->request_channel_layout &&350 avctx->request_channel_layout &&
@@ -366,19 +357,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 6 unmodified lines
366 }357 }
367 } else { /* mh.stream_type == 0xba */358 } else { /* mh.stream_type == 0xba */
368 /* TrueHD stream */359 /* TrueHD stream */
369#if FF_API_REQUEST_CHANNELS
370FF_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
380FF_ENABLE_DEPRECATION_WARNINGS
381#endif
382 if (avctx->request_channel_layout &&360 if (avctx->request_channel_layout &&
383 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==361 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
384 avctx->request_channel_layout &&362 avctx->request_channel_layout &&
libavcodec/mlpdec.c+0−13
@@ -509,19 +509,6 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, · 508 unmodified lines
509 s->max_channel = max_channel;509 s->max_channel = max_channel;
510 s->max_matrix_channel = max_matrix_channel;510 s->max_matrix_channel = max_matrix_channel;
511 511
512#if FF_API_REQUEST_CHANNELS
513FF_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
523FF_ENABLE_DEPRECATION_WARNINGS
524#endif
525 if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) ==512 if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) ==
526 m->avctx->request_channel_layout && m->max_decoded_substream > substr) {513 m->avctx->request_channel_layout && m->max_decoded_substream > substr) {
527 av_log(m->avctx, AV_LOG_DEBUG,514 av_log(m->avctx, AV_LOG_DEBUG,
libavcodec/options_table.h+0−3
@@ -393,9 +393,6 @@ static const AVOption avcodec_options[] = { · 392 unmodified lines
393{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},393{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
394{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},394{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
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},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{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},396{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
400{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"},397{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"},
401{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"},398{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"},
libavcodec/version.h+0−3
@@ -48,9 +48,6 @@ · 47 unmodified lines
48 * the public API and may change, break or disappear at any time.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#ifndef FF_API_DEINTERLACE51#ifndef FF_API_DEINTERLACE
55#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 57)52#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 57)
56#endif53#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t