Browse code

Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the corresponding AVMEDIA_TYPE_* symbols.

Originally committed as revision 25201 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini authored on 2010/09/26 08:27:16
Showing 11 changed files
... ...
@@ -424,7 +424,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
424 424
 
425 425
 AVCodec ansi_decoder = {
426 426
     .name           = "ansi",
427
-    .type           = CODEC_TYPE_VIDEO,
427
+    .type           = AVMEDIA_TYPE_VIDEO,
428 428
     .id             = CODEC_ID_ANSI,
429 429
     .priv_data_size = sizeof(AnsiContext),
430 430
     .init           = decode_init,
... ...
@@ -338,7 +338,7 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
338 338
 
339 339
 AVCodec libxavs_encoder = {
340 340
     .name           = "libxavs",
341
-    .type           = CODEC_TYPE_VIDEO,
341
+    .type           = AVMEDIA_TYPE_VIDEO,
342 342
     .id             = CODEC_ID_CAVS,
343 343
     .priv_data_size = sizeof(XavsContext),
344 344
     .init           = XAVS_init,
... ...
@@ -239,7 +239,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
239 239
 
240 240
 AVCodec pictor_decoder = {
241 241
     "pictor",
242
-    CODEC_TYPE_VIDEO,
242
+    AVMEDIA_TYPE_VIDEO,
243 243
     CODEC_ID_PICTOR,
244 244
     sizeof(PicContext),
245 245
     NULL,
... ...
@@ -502,7 +502,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
502 502
 AVCodec ra_144_encoder =
503 503
 {
504 504
     "real_144",
505
-    CODEC_TYPE_AUDIO,
505
+    AVMEDIA_TYPE_AUDIO,
506 506
     CODEC_ID_RA_144,
507 507
     sizeof(RA144Context),
508 508
     ra144_encode_init,
... ...
@@ -456,7 +456,7 @@ AVFilter avfilter_vsrc_color = {
456 456
     .inputs    = (AVFilterPad[]) {{ .name = NULL}},
457 457
 
458 458
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
459
-                                    .type            = CODEC_TYPE_VIDEO,
459
+                                    .type            = AVMEDIA_TYPE_VIDEO,
460 460
                                     .request_frame   = color_request_frame,
461 461
                                     .config_props    = color_config_props },
462 462
                                   { .name = NULL}},
... ...
@@ -639,7 +639,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
639 639
                 av_reduce(&st->sample_aspect_ratio.num,
640 640
                           &st->sample_aspect_ratio.den,
641 641
                           dar[i].num, dar[i].den, INT_MAX);
642
-            } else if ((dar[0].num > 0) && (dar[0].den > 0) && (st->codec->codec_type==CODEC_TYPE_VIDEO)) // Use ASF container value if the stream doesn't AR set.
642
+            } else if ((dar[0].num > 0) && (dar[0].den > 0) && (st->codec->codec_type==AVMEDIA_TYPE_VIDEO)) // Use ASF container value if the stream doesn't AR set.
643 643
                 av_reduce(&st->sample_aspect_ratio.num,
644 644
                           &st->sample_aspect_ratio.den,
645 645
                           dar[0].num, dar[0].den, INT_MAX);
... ...
@@ -152,7 +152,7 @@ static int flic_read_header(AVFormatContext *s,
152 152
 
153 153
         /* all audio frames are the same size, so use the size of the first chunk for block_align */
154 154
         ast->codec->block_align = AV_RL32(&preamble[0]);
155
-        ast->codec->codec_type = CODEC_TYPE_AUDIO;
155
+        ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
156 156
         ast->codec->codec_id = CODEC_ID_PCM_U8;
157 157
         ast->codec->codec_tag = 0;
158 158
         ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;
... ...
@@ -337,7 +337,7 @@ static int flv_write_trailer(AVFormatContext *s)
337 337
     /* Add EOS tag */
338 338
     for (i = 0; i < s->nb_streams; i++) {
339 339
         AVCodecContext *enc = s->streams[i]->codec;
340
-        if (enc->codec_type == CODEC_TYPE_VIDEO &&
340
+        if (enc->codec_type == AVMEDIA_TYPE_VIDEO &&
341 341
                 enc->codec_id == CODEC_ID_H264) {
342 342
             put_avc_eos_tag(pb, flv->last_video_ts);
343 343
         }
... ...
@@ -405,7 +405,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
405 405
     }
406 406
 
407 407
     ts = pkt->dts + flv->delay; // add delay to force positive dts
408
-    if (enc->codec_type == CODEC_TYPE_VIDEO) {
408
+    if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
409 409
         if (flv->last_video_ts < ts)
410 410
             flv->last_video_ts = ts;
411 411
     }
... ...
@@ -307,7 +307,7 @@ static void qdm2_extradata_free(PayloadContext *qdm)
307 307
 
308 308
 RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
309 309
     "X-QDM",
310
-    CODEC_TYPE_AUDIO,
310
+    AVMEDIA_TYPE_AUDIO,
311 311
     CODEC_ID_NONE,
312 312
     NULL,
313 313
     qdm2_extradata_new,
... ...
@@ -129,7 +129,7 @@ static void svq3_extradata_free(PayloadContext *sv)
129 129
 
130 130
 RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
131 131
     "X-SV3V-ES",
132
-    CODEC_TYPE_VIDEO,
132
+    AVMEDIA_TYPE_VIDEO,
133 133
     CODEC_ID_NONE,          // see if (config_packet) above
134 134
     NULL,                   // parse sdp line
135 135
     svq3_extradata_new,
... ...
@@ -75,7 +75,7 @@ static int read_header(AVFormatContext *avctx,
75 75
     if (!st)
76 76
         return AVERROR(ENOMEM);
77 77
     st->codec->codec_tag   = 0;
78
-    st->codec->codec_type  = CODEC_TYPE_VIDEO;
78
+    st->codec->codec_type  = AVMEDIA_TYPE_VIDEO;
79 79
     st->codec->codec_id    = CODEC_ID_ANSI;
80 80
     if (ap->width)  st->codec->width  = ap->width;
81 81
     if (ap->height) st->codec->height = ap->height;