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
8484 avctx->sample_rate = s->sample_rate;
8585
8686 /* (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
9587 if (s->channels > 1 &&
9688 avctx->request_channel_layout == AV_CH_LAYOUT_MONO) {
9789 avctx->channels = 1;
libavcodec/ac3dec.c+0−8
@@ -190,14 +190,6 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) · 189 unmodified lines
190190 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
191191
192192 /* 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
201193 if (avctx->channels > 1 &&
202194 avctx->request_channel_layout == AV_CH_LAYOUT_MONO)
203195 avctx->channels = 1;
libavcodec/avcodec.h+0−10
@@ -2063,16 +2063,6 @@ typedef struct AVCodecContext { · 2062 unmodified lines
20632063 */
20642064 int cutoff;
20652065
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−
20762066 /**
20772067 * Audio channel layout.
20782068 * - 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
13071307 s->xch_disable = 1;
13081308 }
13091309
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
13171310 if (s->xch_present && !s->xch_disable) {
1318−#endif
13191311 avctx->channel_layout |= AV_CH_BACK_CENTER;
13201312 if (s->lfe) {
13211313 avctx->channel_layout |= AV_CH_LOW_FREQUENCY;
@@ -1523,12 +1515,6 @@ static av_cold int dca_decode_init(AVCodecContext *avctx) · 201 unmodified lines
15231515 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
15241516
15251517 /* 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
15321518 if (avctx->channels > 2 &&
15331519 avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)
15341520 avctx->channels = 2;
libavcodec/mlp_parser.c+0−22
@@ -345,15 +345,6 @@ static int mlp_parse(AVCodecParserContext *s, · 344 unmodified lines
345345
346346 if (mh.stream_type == 0xbb) {
347347 /* 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
357348 if (avctx->request_channel_layout &&
358349 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
359350 avctx->request_channel_layout &&
@@ -366,19 +357,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 6 unmodified lines
366357 }
367358 } else { /* mh.stream_type == 0xba */
368359 /* 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
382360 if (avctx->request_channel_layout &&
383361 (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
384362 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
509509 s->max_channel = max_channel;
510510 s->max_matrix_channel = max_matrix_channel;
511511
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
525512 if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) ==
526513 m->avctx->request_channel_layout && m->max_decoded_substream > substr) {
527514 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
393393 {"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
394394 {"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
395395 {"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
399396 {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
400397 {"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"},
401398 {"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
4848 * the public API and may change, break or disappear at any time.
4949 */
5050
51−#ifndef FF_API_REQUEST_CHANNELS
52−#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 57)
53−#endif
5451 #ifndef FF_API_DEINTERLACE
5552 #define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 57)
5653 #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