Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -48,7 +48,7 @@ · 47 unmodified lines | |||
| 48 | 48 | ||
| 49 | const char **opt_names; | 49 | const char **opt_names; |
| 50 | static int opt_name_count; | 50 | static int opt_name_count; |
| 51 | AVCodecContext *avcodec_opts[CODEC_TYPE_NB]; | 51 | AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; |
| 52 | AVFormatContext *avformat_opts; | 52 | AVFormatContext *avformat_opts; |
| 53 | struct SwsContext *sws_opts; | 53 | struct SwsContext *sws_opts; |
| 54 | 54 | ||
| @@ -191,7 +191,7 @@ int opt_default(const char *opt, const char *arg){ · 136 unmodified lines | |||
| 191 | const AVOption *o= NULL; | 191 | const AVOption *o= NULL; |
| 192 | int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; | 192 | int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; |
| 193 | 193 | ||
| 194 | for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){ | 194 | for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){ |
| 195 | const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); | 195 | const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); |
| 196 | if(o2) | 196 | if(o2) |
| 197 | ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); | 197 | ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); |
| @@ -202,11 +202,11 @@ int opt_default(const char *opt, const char *arg){ · 4 unmodified lines | |||
| 202 | ret = av_set_string3(sws_opts, opt, arg, 1, &o); | 202 | ret = av_set_string3(sws_opts, opt, arg, 1, &o); |
| 203 | if(!o){ | 203 | if(!o){ |
| 204 | if(opt[0] == 'a') | 204 | if(opt[0] == 'a') |
| 205 | ret = av_set_string3(avcodec_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o); | 205 | ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o); |
| 206 | else if(opt[0] == 'v') | 206 | else if(opt[0] == 'v') |
| 207 | ret = av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o); | 207 | ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o); |
| 208 | else if(opt[0] == 's') | 208 | else if(opt[0] == 's') |
| 209 | ret = av_set_string3(avcodec_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o); | 209 | ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o); |
| 210 | } | 210 | } |
| 211 | if (o && ret < 0) { | 211 | if (o && ret < 0) { |
| 212 | fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); | 212 | fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); |
| @@ -535,13 +535,13 @@ void show_codecs(void) · 322 unmodified lines | |||
| 535 | last_name= p2->name; | 535 | last_name= p2->name; |
| 536 | 536 | ||
| 537 | switch(p2->type) { | 537 | switch(p2->type) { |
| 538 | case CODEC_TYPE_VIDEO: | 538 | case AVMEDIA_TYPE_VIDEO: |
| 539 | type_str = "V"; | 539 | type_str = "V"; |
| 540 | break; | 540 | break; |
| 541 | case CODEC_TYPE_AUDIO: | 541 | case AVMEDIA_TYPE_AUDIO: |
| 542 | type_str = "A"; | 542 | type_str = "A"; |
| 543 | break; | 543 | break; |
| 544 | case CODEC_TYPE_SUBTITLE: | 544 | case AVMEDIA_TYPE_SUBTITLE: |
| 545 | type_str = "S"; | 545 | type_str = "S"; |
| 546 | break; | 546 | break; |
| 547 | default: | 547 | default: |
| @@ -40,7 +40,7 @@ extern const int program_birth_year; · 39 unmodified lines | |||
| 40 | extern const int this_year; | 40 | extern const int this_year; |
| 41 | 41 | ||
| 42 | extern const char **opt_names; | 42 | extern const char **opt_names; |
| 43 | extern AVCodecContext *avcodec_opts[CODEC_TYPE_NB]; | 43 | extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; |
| 44 | extern AVFormatContext *avformat_opts; | 44 | extern AVFormatContext *avformat_opts; |
| 45 | extern struct SwsContext *sws_opts; | 45 | extern struct SwsContext *sws_opts; |
| 46 | 46 | ||
| @@ -452,7 +452,7 @@ static int av_exit(int ret) · 451 unmodified lines | |||
| 452 | powerpc_display_perf_report(); | 452 | powerpc_display_perf_report(); |
| 453 | #endif /* CONFIG_POWERPC_PERF */ | 453 | #endif /* CONFIG_POWERPC_PERF */ |
| 454 | 454 | ||
| 455 | for (i=0;i<CODEC_TYPE_NB;i++) | 455 | for (i=0;i<AVMEDIA_TYPE_NB;i++) |
| 456 | av_free(avcodec_opts[i]); | 456 | av_free(avcodec_opts[i]); |
| 457 | av_free(avformat_opts); | 457 | av_free(avformat_opts); |
| 458 | av_free(sws_opts); | 458 | av_free(sws_opts); |
| @@ -527,9 +527,9 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) · 68 unmodified lines | |||
| 527 | memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext)); | 527 | memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext)); |
| 528 | s->streams[i] = st; | 528 | s->streams[i] = st; |
| 529 | 529 | ||
| 530 | if (st->codec->codec_type == CODEC_TYPE_AUDIO && audio_stream_copy) | 530 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && audio_stream_copy) |
| 531 | st->stream_copy = 1; | 531 | st->stream_copy = 1; |
| 532 | else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy) | 532 | else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && video_stream_copy) |
| 533 | st->stream_copy = 1; | 533 | st->stream_copy = 1; |
| 534 | 534 | ||
| 535 | if(!st->codec->thread_count) | 535 | if(!st->codec->thread_count) |
| @@ -967,7 +967,7 @@ static void do_video_out(AVFormatContext *s, · 431 unmodified lines | |||
| 967 | }else | 967 | }else |
| 968 | ost->sync_opts= lrintf(sync_ipts); | 968 | ost->sync_opts= lrintf(sync_ipts); |
| 969 | 969 | ||
| 970 | nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number); | 970 | nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number); |
| 971 | if (nb_frames <= 0) | 971 | if (nb_frames <= 0) |
| 972 | return; | 972 | return; |
| 973 | 973 | ||
| @@ -1088,7 +1088,7 @@ static void do_video_out(AVFormatContext *s, · 114 unmodified lines | |||
| 1088 | /* better than nothing: use input picture interlaced | 1088 | /* better than nothing: use input picture interlaced |
| 1089 | settings */ | 1089 | settings */ |
| 1090 | big_picture.interlaced_frame = in_picture->interlaced_frame; | 1090 | big_picture.interlaced_frame = in_picture->interlaced_frame; |
| 1091 | if(avcodec_opts[CODEC_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){ | 1091 | if(avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){ |
| 1092 | if(top_field_first == -1) | 1092 | if(top_field_first == -1) |
| 1093 | big_picture.top_field_first = in_picture->top_field_first; | 1093 | big_picture.top_field_first = in_picture->top_field_first; |
| 1094 | else | 1094 | else |
| @@ -1163,7 +1163,7 @@ static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, · 68 unmodified lines | |||
| 1163 | } | 1163 | } |
| 1164 | 1164 | ||
| 1165 | enc = ost->st->codec; | 1165 | enc = ost->st->codec; |
| 1166 | if (enc->codec_type == CODEC_TYPE_VIDEO) { | 1166 | if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1167 | frame_number = ost->frame_number; | 1167 | frame_number = ost->frame_number; |
| 1168 | fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA); | 1168 | fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA); |
| 1169 | if (enc->flags&CODEC_FLAG_PSNR) | 1169 | if (enc->flags&CODEC_FLAG_PSNR) |
| @@ -1223,12 +1223,12 @@ static void print_report(AVFormatContext **output_files, · 53 unmodified lines | |||
| 1223 | for(i=0;i<nb_ostreams;i++) { | 1223 | for(i=0;i<nb_ostreams;i++) { |
| 1224 | ost = ost_table[i]; | 1224 | ost = ost_table[i]; |
| 1225 | enc = ost->st->codec; | 1225 | enc = ost->st->codec; |
| 1226 | if (vid && enc->codec_type == CODEC_TYPE_VIDEO) { | 1226 | if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1227 | snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", | 1227 | snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", |
| 1228 | !ost->st->stream_copy ? | 1228 | !ost->st->stream_copy ? |
| 1229 | enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1); | 1229 | enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1); |
| 1230 | } | 1230 | } |
| 1231 | if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) { | 1231 | if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1232 | float t = (av_gettime()-timer_start) / 1000000.0; | 1232 | float t = (av_gettime()-timer_start) / 1000000.0; |
| 1233 | 1233 | ||
| 1234 | frame_number = ost->frame_number; | 1234 | frame_number = ost->frame_number; |
| @@ -1360,7 +1360,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 125 unmodified lines | |||
| 1360 | subtitle_to_free = NULL; | 1360 | subtitle_to_free = NULL; |
| 1361 | if (ist->decoding_needed) { | 1361 | if (ist->decoding_needed) { |
| 1362 | switch(ist->st->codec->codec_type) { | 1362 | switch(ist->st->codec->codec_type) { |
| 1363 | case CODEC_TYPE_AUDIO:{ | 1363 | case AVMEDIA_TYPE_AUDIO:{ |
| 1364 | if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) { | 1364 | if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) { |
| 1365 | samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE); | 1365 | samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE); |
| 1366 | av_free(samples); | 1366 | av_free(samples); |
| @@ -1386,7 +1386,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 19 unmodified lines | |||
| 1386 | ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) / | 1386 | ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) / |
| 1387 | (ist->st->codec->sample_rate * ist->st->codec->channels); | 1387 | (ist->st->codec->sample_rate * ist->st->codec->channels); |
| 1388 | break;} | 1388 | break;} |
| 1389 | case CODEC_TYPE_VIDEO: | 1389 | case AVMEDIA_TYPE_VIDEO: |
| 1390 | decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2; | 1390 | decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2; |
| 1391 | /* XXX: allocate picture correctly */ | 1391 | /* XXX: allocate picture correctly */ |
| 1392 | avcodec_get_frame_defaults(&picture); | 1392 | avcodec_get_frame_defaults(&picture); |
| @@ -1408,7 +1408,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 15 unmodified lines | |||
| 1408 | } | 1408 | } |
| 1409 | avpkt.size = 0; | 1409 | avpkt.size = 0; |
| 1410 | break; | 1410 | break; |
| 1411 | case CODEC_TYPE_SUBTITLE: | 1411 | case AVMEDIA_TYPE_SUBTITLE: |
| 1412 | ret = avcodec_decode_subtitle2(ist->st->codec, | 1412 | ret = avcodec_decode_subtitle2(ist->st->codec, |
| 1413 | &subtitle, &got_subtitle, &avpkt); | 1413 | &subtitle, &got_subtitle, &avpkt); |
| 1414 | if (ret < 0) | 1414 | if (ret < 0) |
| @@ -1424,11 +1424,11 @@ static int output_packet(AVInputStream *ist, int ist_index, · 9 unmodified lines | |||
| 1424 | } | 1424 | } |
| 1425 | } else { | 1425 | } else { |
| 1426 | switch(ist->st->codec->codec_type) { | 1426 | switch(ist->st->codec->codec_type) { |
| 1427 | case CODEC_TYPE_AUDIO: | 1427 | case AVMEDIA_TYPE_AUDIO: |
| 1428 | ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / | 1428 | ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / |
| 1429 | ist->st->codec->sample_rate; | 1429 | ist->st->codec->sample_rate; |
| 1430 | break; | 1430 | break; |
| 1431 | case CODEC_TYPE_VIDEO: | 1431 | case AVMEDIA_TYPE_VIDEO: |
| 1432 | if (ist->st->codec->time_base.num != 0) { | 1432 | if (ist->st->codec->time_base.num != 0) { |
| 1433 | int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; | 1433 | int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; |
| 1434 | ist->next_pts += ((int64_t)AV_TIME_BASE * | 1434 | ist->next_pts += ((int64_t)AV_TIME_BASE * |
| @@ -1442,13 +1442,13 @@ static int output_packet(AVInputStream *ist, int ist_index, · 7 unmodified lines | |||
| 1442 | } | 1442 | } |
| 1443 | 1443 | ||
| 1444 | buffer_to_free = NULL; | 1444 | buffer_to_free = NULL; |
| 1445 | if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) { | 1445 | if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1446 | pre_process_video_frame(ist, (AVPicture *)&picture, | 1446 | pre_process_video_frame(ist, (AVPicture *)&picture, |
| 1447 | &buffer_to_free); | 1447 | &buffer_to_free); |
| 1448 | } | 1448 | } |
| 1449 | 1449 | ||
| 1450 | // preprocess audio (volume) | 1450 | // preprocess audio (volume) |
| 1451 | if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) { | 1451 | if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 1452 | if (audio_volume != 256) { | 1452 | if (audio_volume != 256) { |
| 1453 | short *volp; | 1453 | short *volp; |
| 1454 | volp = samples; | 1454 | volp = samples; |
| @@ -1485,15 +1485,15 @@ static int output_packet(AVInputStream *ist, int ist_index, · 30 unmodified lines | |||
| 1485 | if (ost->encoding_needed) { | 1485 | if (ost->encoding_needed) { |
| 1486 | assert(ist->decoding_needed); | 1486 | assert(ist->decoding_needed); |
| 1487 | switch(ost->st->codec->codec_type) { | 1487 | switch(ost->st->codec->codec_type) { |
| 1488 | case CODEC_TYPE_AUDIO: | 1488 | case AVMEDIA_TYPE_AUDIO: |
| 1489 | do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size); | 1489 | do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size); |
| 1490 | break; | 1490 | break; |
| 1491 | case CODEC_TYPE_VIDEO: | 1491 | case AVMEDIA_TYPE_VIDEO: |
| 1492 | do_video_out(os, ost, ist, &picture, &frame_size); | 1492 | do_video_out(os, ost, ist, &picture, &frame_size); |
| 1493 | if (vstats_filename && frame_size) | 1493 | if (vstats_filename && frame_size) |
| 1494 | do_video_stats(os, ost, frame_size); | 1494 | do_video_stats(os, ost, frame_size); |
| 1495 | break; | 1495 | break; |
| 1496 | case CODEC_TYPE_SUBTITLE: | 1496 | case AVMEDIA_TYPE_SUBTITLE: |
| 1497 | do_subtitle_out(os, ost, ist, &subtitle, | 1497 | do_subtitle_out(os, ost, ist, &subtitle, |
| 1498 | pkt->pts); | 1498 | pkt->pts); |
| 1499 | break; | 1499 | break; |
| @@ -1517,9 +1517,9 @@ static int output_packet(AVInputStream *ist, int ist_index, · 17 unmodified lines | |||
| 1517 | ost->st->codec->coded_frame= &avframe; | 1517 | ost->st->codec->coded_frame= &avframe; |
| 1518 | avframe.key_frame = pkt->flags & PKT_FLAG_KEY; | 1518 | avframe.key_frame = pkt->flags & PKT_FLAG_KEY; |
| 1519 | 1519 | ||
| 1520 | if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO) | 1520 | if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 1521 | audio_size += data_size; | 1521 | audio_size += data_size; |
| 1522 | else if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) { | 1522 | else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1523 | video_size += data_size; | 1523 | video_size += data_size; |
| 1524 | ost->sync_opts++; | 1524 | ost->sync_opts++; |
| 1525 | } | 1525 | } |
| @@ -1583,9 +1583,9 @@ static int output_packet(AVInputStream *ist, int ist_index, · 57 unmodified lines | |||
| 1583 | AVCodecContext *enc= ost->st->codec; | 1583 | AVCodecContext *enc= ost->st->codec; |
| 1584 | os = output_files[ost->file_index]; | 1584 | os = output_files[ost->file_index]; |
| 1585 | 1585 | ||
| 1586 | if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO && enc->frame_size <=1) | 1586 | if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1) |
| 1587 | continue; | 1587 | continue; |
| 1588 | if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE)) | 1588 | if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE)) |
| 1589 | continue; | 1589 | continue; |
| 1590 | 1590 | ||
| 1591 | if (ost->encoding_needed) { | 1591 | if (ost->encoding_needed) { |
| @@ -1596,7 +1596,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 4 unmodified lines | |||
| 1596 | pkt.stream_index= ost->index; | 1596 | pkt.stream_index= ost->index; |
| 1597 | 1597 | ||
| 1598 | switch(ost->st->codec->codec_type) { | 1598 | switch(ost->st->codec->codec_type) { |
| 1599 | case CODEC_TYPE_AUDIO: | 1599 | case AVMEDIA_TYPE_AUDIO: |
| 1600 | fifo_bytes = av_fifo_size(ost->fifo); | 1600 | fifo_bytes = av_fifo_size(ost->fifo); |
| 1601 | ret = 0; | 1601 | ret = 0; |
| 1602 | /* encode any samples remaining in fifo */ | 1602 | /* encode any samples remaining in fifo */ |
| @@ -1629,7 +1629,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 26 unmodified lines | |||
| 1629 | audio_size += ret; | 1629 | audio_size += ret; |
| 1630 | pkt.flags |= PKT_FLAG_KEY; | 1630 | pkt.flags |= PKT_FLAG_KEY; |
| 1631 | break; | 1631 | break; |
| 1632 | case CODEC_TYPE_VIDEO: | 1632 | case AVMEDIA_TYPE_VIDEO: |
| 1633 | ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); | 1633 | ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); |
| 1634 | if (ret < 0) { | 1634 | if (ret < 0) { |
| 1635 | fprintf(stderr, "Video encoding failed\n"); | 1635 | fprintf(stderr, "Video encoding failed\n"); |
| @@ -1946,7 +1946,7 @@ static int av_encode(AVFormatContext **output_files, · 310 unmodified lines | |||
| 1946 | }else | 1946 | }else |
| 1947 | codec->time_base = ist->st->time_base; | 1947 | codec->time_base = ist->st->time_base; |
| 1948 | switch(codec->codec_type) { | 1948 | switch(codec->codec_type) { |
| 1949 | case CODEC_TYPE_AUDIO: | 1949 | case AVMEDIA_TYPE_AUDIO: |
| 1950 | if(audio_volume != 256) { | 1950 | if(audio_volume != 256) { |
| 1951 | fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n"); | 1951 | fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n"); |
| 1952 | av_exit(1); | 1952 | av_exit(1); |
| @@ -1961,13 +1961,13 @@ static int av_encode(AVFormatContext **output_files, · 8 unmodified lines | |||
| 1961 | if(codec->codec_id == CODEC_ID_AC3) | 1961 | if(codec->codec_id == CODEC_ID_AC3) |
| 1962 | codec->block_align= 0; | 1962 | codec->block_align= 0; |
| 1963 | break; | 1963 | break; |
| 1964 | case CODEC_TYPE_VIDEO: | 1964 | case AVMEDIA_TYPE_VIDEO: |
| 1965 | codec->pix_fmt = icodec->pix_fmt; | 1965 | codec->pix_fmt = icodec->pix_fmt; |
| 1966 | codec->width = icodec->width; | 1966 | codec->width = icodec->width; |
| 1967 | codec->height = icodec->height; | 1967 | codec->height = icodec->height; |
| 1968 | codec->has_b_frames = icodec->has_b_frames; | 1968 | codec->has_b_frames = icodec->has_b_frames; |
| 1969 | break; | 1969 | break; |
| 1970 | case CODEC_TYPE_SUBTITLE: | 1970 | case AVMEDIA_TYPE_SUBTITLE: |
| 1971 | codec->width = icodec->width; | 1971 | codec->width = icodec->width; |
| 1972 | codec->height = icodec->height; | 1972 | codec->height = icodec->height; |
| 1973 | break; | 1973 | break; |
| @@ -1976,7 +1976,7 @@ static int av_encode(AVFormatContext **output_files, · 2 unmodified lines | |||
| 1976 | } | 1976 | } |
| 1977 | } else { | 1977 | } else { |
| 1978 | switch(codec->codec_type) { | 1978 | switch(codec->codec_type) { |
| 1979 | case CODEC_TYPE_AUDIO: | 1979 | case AVMEDIA_TYPE_AUDIO: |
| 1980 | ost->fifo= av_fifo_alloc(1024); | 1980 | ost->fifo= av_fifo_alloc(1024); |
| 1981 | if(!ost->fifo) | 1981 | if(!ost->fifo) |
| 1982 | goto fail; | 1982 | goto fail; |
| @@ -1986,7 +1986,7 @@ static int av_encode(AVFormatContext **output_files, · 3 unmodified lines | |||
| 1986 | ist->decoding_needed = 1; | 1986 | ist->decoding_needed = 1; |
| 1987 | ost->encoding_needed = 1; | 1987 | ost->encoding_needed = 1; |
| 1988 | break; | 1988 | break; |
| 1989 | case CODEC_TYPE_VIDEO: | 1989 | case AVMEDIA_TYPE_VIDEO: |
| 1990 | if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { | 1990 | if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { |
| 1991 | fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n"); | 1991 | fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n"); |
| 1992 | av_exit(1); | 1992 | av_exit(1); |
| @@ -2050,7 +2050,7 @@ static int av_encode(AVFormatContext **output_files, · 57 unmodified lines | |||
| 2050 | ost->encoding_needed = 1; | 2050 | ost->encoding_needed = 1; |
| 2051 | ist->decoding_needed = 1; | 2051 | ist->decoding_needed = 1; |
| 2052 | break; | 2052 | break; |
| 2053 | case CODEC_TYPE_SUBTITLE: | 2053 | case AVMEDIA_TYPE_SUBTITLE: |
| 2054 | ost->encoding_needed = 1; | 2054 | ost->encoding_needed = 1; |
| 2055 | ist->decoding_needed = 1; | 2055 | ist->decoding_needed = 1; |
| 2056 | break; | 2056 | break; |
| @@ -2098,7 +2098,7 @@ static int av_encode(AVFormatContext **output_files, · 41 unmodified lines | |||
| 2098 | } | 2098 | } |
| 2099 | } | 2099 | } |
| 2100 | } | 2100 | } |
| 2101 | if(codec->codec_type == CODEC_TYPE_VIDEO){ | 2101 | if(codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 2102 | int size= codec->width * codec->height; | 2102 | int size= codec->width * codec->height; |
| 2103 | bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200); | 2103 | bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200); |
| 2104 | } | 2104 | } |
| @@ -2155,7 +2155,7 @@ static int av_encode(AVFormatContext **output_files, · 50 unmodified lines | |||
| 2155 | ret = AVERROR(EINVAL); | 2155 | ret = AVERROR(EINVAL); |
| 2156 | goto dump_format; | 2156 | goto dump_format; |
| 2157 | } | 2157 | } |
| 2158 | //if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) | 2158 | //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 2159 | // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD; | 2159 | // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD; |
| 2160 | } | 2160 | } |
| 2161 | } | 2161 | } |
| @@ -2528,7 +2528,7 @@ static int opt_frame_rate(const char *opt, const char *arg) · 366 unmodified lines | |||
| 2528 | 2528 | ||
| 2529 | static int opt_bitrate(const char *opt, const char *arg) | 2529 | static int opt_bitrate(const char *opt, const char *arg) |
| 2530 | { | 2530 | { |
| 2531 | int codec_type = opt[0]=='a' ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO; | 2531 | int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; |
| 2532 | 2532 | ||
| 2533 | opt_default(opt, arg); | 2533 | opt_default(opt, arg); |
| 2534 | 2534 | ||
| @@ -2781,7 +2781,7 @@ static void opt_codec(int *pstream_copy, char **pcodec_name, · 246 unmodified lines | |||
| 2781 | 2781 | ||
| 2782 | static void opt_audio_codec(const char *arg) | 2782 | static void opt_audio_codec(const char *arg) |
| 2783 | { | 2783 | { |
| 2784 | opt_codec(&audio_stream_copy, &audio_codec_name, CODEC_TYPE_AUDIO, arg); | 2784 | opt_codec(&audio_stream_copy, &audio_codec_name, AVMEDIA_TYPE_AUDIO, arg); |
| 2785 | } | 2785 | } |
| 2786 | 2786 | ||
| 2787 | static void opt_audio_tag(const char *arg) | 2787 | static void opt_audio_tag(const char *arg) |
| @@ -2804,12 +2804,12 @@ static void opt_video_tag(const char *arg) · 16 unmodified lines | |||
| 2804 | 2804 | ||
| 2805 | static void opt_video_codec(const char *arg) | 2805 | static void opt_video_codec(const char *arg) |
| 2806 | { | 2806 | { |
| 2807 | opt_codec(&video_stream_copy, &video_codec_name, CODEC_TYPE_VIDEO, arg); | 2807 | opt_codec(&video_stream_copy, &video_codec_name, AVMEDIA_TYPE_VIDEO, arg); |
| 2808 | } | 2808 | } |
| 2809 | 2809 | ||
| 2810 | static void opt_subtitle_codec(const char *arg) | 2810 | static void opt_subtitle_codec(const char *arg) |
| 2811 | { | 2811 | { |
| 2812 | opt_codec(&subtitle_stream_copy, &subtitle_codec_name, CODEC_TYPE_SUBTITLE, arg); | 2812 | opt_codec(&subtitle_stream_copy, &subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, arg); |
| 2813 | } | 2813 | } |
| 2814 | 2814 | ||
| 2815 | static void opt_subtitle_tag(const char *arg) | 2815 | static void opt_subtitle_tag(const char *arg) |
| @@ -2965,9 +2965,9 @@ static void opt_input_file(const char *filename) · 149 unmodified lines | |||
| 2965 | 2965 | ||
| 2966 | set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM); | 2966 | set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM); |
| 2967 | 2967 | ||
| 2968 | ic->video_codec_id = find_codec_or_die(video_codec_name , CODEC_TYPE_VIDEO , 0); | 2968 | ic->video_codec_id = find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0); |
| 2969 | ic->audio_codec_id = find_codec_or_die(audio_codec_name , CODEC_TYPE_AUDIO , 0); | 2969 | ic->audio_codec_id = find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0); |
| 2970 | ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 0); | 2970 | ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0); |
| 2971 | ic->flags |= AVFMT_FLAG_NONBLOCK; | 2971 | ic->flags |= AVFMT_FLAG_NONBLOCK; |
| 2972 | 2972 | ||
| 2973 | if(pgmyuv_compatibility_hack) | 2973 | if(pgmyuv_compatibility_hack) |
| @@ -3035,8 +3035,8 @@ static void opt_input_file(const char *filename) · 61 unmodified lines | |||
| 3035 | AVCodecContext *enc = st->codec; | 3035 | AVCodecContext *enc = st->codec; |
| 3036 | avcodec_thread_init(enc, thread_count); | 3036 | avcodec_thread_init(enc, thread_count); |
| 3037 | switch(enc->codec_type) { | 3037 | switch(enc->codec_type) { |
| 3038 | case CODEC_TYPE_AUDIO: | 3038 | case AVMEDIA_TYPE_AUDIO: |
| 3039 | set_context_opts(enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | 3039 | set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM); |
| 3040 | //fprintf(stderr, "\nInput Audio channels: %d", enc->channels); | 3040 | //fprintf(stderr, "\nInput Audio channels: %d", enc->channels); |
| 3041 | channel_layout = enc->channel_layout; | 3041 | channel_layout = enc->channel_layout; |
| 3042 | audio_channels = enc->channels; | 3042 | audio_channels = enc->channels; |
| @@ -3046,8 +3046,8 @@ static void opt_input_file(const char *filename) · 3 unmodified lines | |||
| 3046 | if(audio_disable) | 3046 | if(audio_disable) |
| 3047 | st->discard= AVDISCARD_ALL; | 3047 | st->discard= AVDISCARD_ALL; |
| 3048 | break; | 3048 | break; |
| 3049 | case CODEC_TYPE_VIDEO: | 3049 | case AVMEDIA_TYPE_VIDEO: |
| 3050 | set_context_opts(enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | 3050 | set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM); |
| 3051 | frame_height = enc->height; | 3051 | frame_height = enc->height; |
| 3052 | frame_width = enc->width; | 3052 | frame_width = enc->width; |
| 3053 | if(ic->streams[i]->sample_aspect_ratio.num) | 3053 | if(ic->streams[i]->sample_aspect_ratio.num) |
| @@ -3084,15 +3084,15 @@ static void opt_input_file(const char *filename) · 30 unmodified lines | |||
| 3084 | else if(video_discard) | 3084 | else if(video_discard) |
| 3085 | st->discard= video_discard; | 3085 | st->discard= video_discard; |
| 3086 | break; | 3086 | break; |
| 3087 | case CODEC_TYPE_DATA: | 3087 | case AVMEDIA_TYPE_DATA: |
| 3088 | break; | 3088 | break; |
| 3089 | case CODEC_TYPE_SUBTITLE: | 3089 | case AVMEDIA_TYPE_SUBTITLE: |
| 3090 | input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name); | 3090 | input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name); |
| 3091 | if(subtitle_disable) | 3091 | if(subtitle_disable) |
| 3092 | st->discard = AVDISCARD_ALL; | 3092 | st->discard = AVDISCARD_ALL; |
| 3093 | break; | 3093 | break; |
| 3094 | case CODEC_TYPE_ATTACHMENT: | 3094 | case AVMEDIA_TYPE_ATTACHMENT: |
| 3095 | case CODEC_TYPE_UNKNOWN: | 3095 | case AVMEDIA_TYPE_UNKNOWN: |
| 3096 | nb_icodecs++; | 3096 | nb_icodecs++; |
| 3097 | break; | 3097 | break; |
| 3098 | default: | 3098 | default: |
| @@ -3129,18 +3129,18 @@ static void check_audio_video_sub_inputs(int *has_video_ptr, int *has_audio_ptr, · 30 unmodified lines | |||
| 3129 | for(i=0;i<ic->nb_streams;i++) { | 3129 | for(i=0;i<ic->nb_streams;i++) { |
| 3130 | AVCodecContext *enc = ic->streams[i]->codec; | 3130 | AVCodecContext *enc = ic->streams[i]->codec; |
| 3131 | switch(enc->codec_type) { | 3131 | switch(enc->codec_type) { |
| 3132 | case CODEC_TYPE_AUDIO: | 3132 | case AVMEDIA_TYPE_AUDIO: |
| 3133 | has_audio = 1; | 3133 | has_audio = 1; |
| 3134 | break; | 3134 | break; |
| 3135 | case CODEC_TYPE_VIDEO: | 3135 | case AVMEDIA_TYPE_VIDEO: |
| 3136 | has_video = 1; | 3136 | has_video = 1; |
| 3137 | break; | 3137 | break; |
| 3138 | case CODEC_TYPE_SUBTITLE: | 3138 | case AVMEDIA_TYPE_SUBTITLE: |
| 3139 | has_subtitle = 1; | 3139 | has_subtitle = 1; |
| 3140 | break; | 3140 | break; |
| 3141 | case CODEC_TYPE_DATA: | 3141 | case AVMEDIA_TYPE_DATA: |
| 3142 | case CODEC_TYPE_ATTACHMENT: | 3142 | case AVMEDIA_TYPE_ATTACHMENT: |
| 3143 | case CODEC_TYPE_UNKNOWN: | 3143 | case AVMEDIA_TYPE_UNKNOWN: |
| 3144 | break; | 3144 | break; |
| 3145 | default: | 3145 | default: |
| 3146 | abort(); | 3146 | abort(); |
| @@ -3163,7 +3163,7 @@ static void new_video_stream(AVFormatContext *oc) · 16 unmodified lines | |||
| 3163 | fprintf(stderr, "Could not alloc stream\n"); | 3163 | fprintf(stderr, "Could not alloc stream\n"); |
| 3164 | av_exit(1); | 3164 | av_exit(1); |
| 3165 | } | 3165 | } |
| 3166 | avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO); | 3166 | avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO); |
| 3167 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters; | 3167 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters; |
| 3168 | video_bitstream_filters= NULL; | 3168 | video_bitstream_filters= NULL; |
| 3169 | 3169 | ||
| @@ -3177,16 +3177,16 @@ static void new_video_stream(AVFormatContext *oc) · 7 unmodified lines | |||
| 3177 | if( (video_global_header&1) | 3177 | if( (video_global_header&1) |
| 3178 | || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){ | 3178 | || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){ |
| 3179 | video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | 3179 | video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; |
| 3180 | avcodec_opts[CODEC_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | 3180 | avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER; |
| 3181 | } | 3181 | } |
| 3182 | if(video_global_header&2){ | 3182 | if(video_global_header&2){ |
| 3183 | video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER; | 3183 | video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER; |
| 3184 | avcodec_opts[CODEC_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER; | 3184 | avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER; |
| 3185 | } | 3185 | } |
| 3186 | 3186 | ||
| 3187 | if (video_stream_copy) { | 3187 | if (video_stream_copy) { |
| 3188 | st->stream_copy = 1; | 3188 | st->stream_copy = 1; |
| 3189 | video_enc->codec_type = CODEC_TYPE_VIDEO; | 3189 | video_enc->codec_type = AVMEDIA_TYPE_VIDEO; |
| 3190 | video_enc->sample_aspect_ratio = | 3190 | video_enc->sample_aspect_ratio = |
| 3191 | st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255); | 3191 | st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255); |
| 3192 | } else { | 3192 | } else { |
| @@ -3196,17 +3196,17 @@ static void new_video_stream(AVFormatContext *oc) · 3 unmodified lines | |||
| 3196 | AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1}; | 3196 | AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1}; |
| 3197 | 3197 | ||
| 3198 | if (video_codec_name) { | 3198 | if (video_codec_name) { |
| 3199 | codec_id = find_codec_or_die(video_codec_name, CODEC_TYPE_VIDEO, 1); | 3199 | codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1); |
| 3200 | codec = avcodec_find_encoder_by_name(video_codec_name); | 3200 | codec = avcodec_find_encoder_by_name(video_codec_name); |
| 3201 | output_codecs[nb_ocodecs] = codec; | 3201 | output_codecs[nb_ocodecs] = codec; |
| 3202 | } else { | 3202 | } else { |
| 3203 | codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO); | 3203 | codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO); |
| 3204 | codec = avcodec_find_encoder(codec_id); | 3204 | codec = avcodec_find_encoder(codec_id); |
| 3205 | } | 3205 | } |
| 3206 | 3206 | ||
| 3207 | video_enc->codec_id = codec_id; | 3207 | video_enc->codec_id = codec_id; |
| 3208 | 3208 | ||
| 3209 | set_context_opts(video_enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | 3209 | set_context_opts(video_enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); |
| 3210 | 3210 | ||
| 3211 | if (codec && codec->supported_framerates && !force_fps) | 3211 | if (codec && codec->supported_framerates && !force_fps) |
| 3212 | fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)]; | 3212 | fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)]; |
| @@ -3300,7 +3300,7 @@ static void new_audio_stream(AVFormatContext *oc) · 87 unmodified lines | |||
| 3300 | fprintf(stderr, "Could not alloc stream\n"); | 3300 | fprintf(stderr, "Could not alloc stream\n"); |
| 3301 | av_exit(1); | 3301 | av_exit(1); |
| 3302 | } | 3302 | } |
| 3303 | avcodec_get_context_defaults2(st->codec, CODEC_TYPE_AUDIO); | 3303 | avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_AUDIO); |
| 3304 | 3304 | ||
| 3305 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters; | 3305 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters; |
| 3306 | audio_bitstream_filters= NULL; | 3306 | audio_bitstream_filters= NULL; |
| @@ -3308,14 +3308,14 @@ static void new_audio_stream(AVFormatContext *oc) · 1 unmodified line | |||
| 3308 | avcodec_thread_init(st->codec, thread_count); | 3308 | avcodec_thread_init(st->codec, thread_count); |
| 3309 | 3309 | ||
| 3310 | audio_enc = st->codec; | 3310 | audio_enc = st->codec; |
| 3311 | audio_enc->codec_type = CODEC_TYPE_AUDIO; | 3311 | audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; |
| 3312 | 3312 | ||
| 3313 | if(audio_codec_tag) | 3313 | if(audio_codec_tag) |
| 3314 | audio_enc->codec_tag= audio_codec_tag; | 3314 | audio_enc->codec_tag= audio_codec_tag; |
| 3315 | 3315 | ||
| 3316 | if (oc->oformat->flags & AVFMT_GLOBALHEADER) { | 3316 | if (oc->oformat->flags & AVFMT_GLOBALHEADER) { |
| 3317 | audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | 3317 | audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; |
| 3318 | avcodec_opts[CODEC_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | 3318 | avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER; |
| 3319 | } | 3319 | } |
| 3320 | if (audio_stream_copy) { | 3320 | if (audio_stream_copy) { |
| 3321 | st->stream_copy = 1; | 3321 | st->stream_copy = 1; |
| @@ -3323,14 +3323,14 @@ static void new_audio_stream(AVFormatContext *oc) · 1 unmodified line | |||
| 3323 | } else { | 3323 | } else { |
| 3324 | AVCodec *codec; | 3324 | AVCodec *codec; |
| 3325 | 3325 | ||
| 3326 | set_context_opts(audio_enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | 3326 | set_context_opts(audio_enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); |
| 3327 | 3327 | ||
| 3328 | if (audio_codec_name) { | 3328 | if (audio_codec_name) { |
| 3329 | codec_id = find_codec_or_die(audio_codec_name, CODEC_TYPE_AUDIO, 1); | 3329 | codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1); |
| 3330 | codec = avcodec_find_encoder_by_name(audio_codec_name); | 3330 | codec = avcodec_find_encoder_by_name(audio_codec_name); |
| 3331 | output_codecs[nb_ocodecs] = codec; | 3331 | output_codecs[nb_ocodecs] = codec; |
| 3332 | } else { | 3332 | } else { |
| 3333 | codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_AUDIO); | 3333 | codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO); |
| 3334 | codec = avcodec_find_encoder(codec_id); | 3334 | codec = avcodec_find_encoder(codec_id); |
| 3335 | } | 3335 | } |
| 3336 | audio_enc->codec_id = codec_id; | 3336 | audio_enc->codec_id = codec_id; |
| @@ -3370,13 +3370,13 @@ static void new_subtitle_stream(AVFormatContext *oc) · 33 unmodified lines | |||
| 3370 | fprintf(stderr, "Could not alloc stream\n"); | 3370 | fprintf(stderr, "Could not alloc stream\n"); |
| 3371 | av_exit(1); | 3371 | av_exit(1); |
| 3372 | } | 3372 | } |
| 3373 | avcodec_get_context_defaults2(st->codec, CODEC_TYPE_SUBTITLE); | 3373 | avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_SUBTITLE); |
| 3374 | 3374 | ||
| 3375 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters; | 3375 | bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters; |
| 3376 | subtitle_bitstream_filters= NULL; | 3376 | subtitle_bitstream_filters= NULL; |
| 3377 | 3377 | ||
| 3378 | subtitle_enc = st->codec; | 3378 | subtitle_enc = st->codec; |
| 3379 | subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE; | 3379 | subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 3380 | 3380 | ||
| 3381 | if(subtitle_codec_tag) | 3381 | if(subtitle_codec_tag) |
| 3382 | subtitle_enc->codec_tag= subtitle_codec_tag; | 3382 | subtitle_enc->codec_tag= subtitle_codec_tag; |
| @@ -3384,8 +3384,8 @@ static void new_subtitle_stream(AVFormatContext *oc) · 1 unmodified line | |||
| 3384 | if (subtitle_stream_copy) { | 3384 | if (subtitle_stream_copy) { |
| 3385 | st->stream_copy = 1; | 3385 | st->stream_copy = 1; |
| 3386 | } else { | 3386 | } else { |
| 3387 | set_context_opts(avcodec_opts[CODEC_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | 3387 | set_context_opts(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM); |
| 3388 | subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 1); | 3388 | subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1); |
| 3389 | output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name); | 3389 | output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name); |
| 3390 | } | 3390 | } |
| 3391 | nb_ocodecs++; | 3391 | nb_ocodecs++; |
| @@ -3739,7 +3739,7 @@ static void opt_target(const char *arg) · 347 unmodified lines | |||
| 3739 | for(j = 0; j < nb_input_files; j++) { | 3739 | for(j = 0; j < nb_input_files; j++) { |
| 3740 | for(i = 0; i < input_files[j]->nb_streams; i++) { | 3740 | for(i = 0; i < input_files[j]->nb_streams; i++) { |
| 3741 | AVCodecContext *c = input_files[j]->streams[i]->codec; | 3741 | AVCodecContext *c = input_files[j]->streams[i]->codec; |
| 3742 | if(c->codec_type != CODEC_TYPE_VIDEO) | 3742 | if(c->codec_type != AVMEDIA_TYPE_VIDEO) |
| 3743 | continue; | 3743 | continue; |
| 3744 | fr = c->time_base.den * 1000 / c->time_base.num; | 3744 | fr = c->time_base.den * 1000 / c->time_base.num; |
| 3745 | if(fr == 25000) { | 3745 | if(fr == 25000) { |
| @@ -3965,7 +3965,7 @@ static const OptionDef options[] = { · 219 unmodified lines | |||
| 3965 | { "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" }, | 3965 | { "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" }, |
| 3966 | { "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" }, | 3966 | { "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" }, |
| 3967 | { "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" }, | 3967 | { "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" }, |
| 3968 | { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[CODEC_TYPE_DATA]}, "set the number of data frames to record", "number" }, | 3968 | { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[AVMEDIA_TYPE_DATA]}, "set the number of data frames to record", "number" }, |
| 3969 | { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, | 3969 | { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, |
| 3970 | "add timings for benchmarking" }, | 3970 | "add timings for benchmarking" }, |
| 3971 | { "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" }, | 3971 | { "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" }, |
| @@ -3993,7 +3993,7 @@ static const OptionDef options[] = { · 21 unmodified lines | |||
| 3993 | /* video options */ | 3993 | /* video options */ |
| 3994 | { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | 3994 | { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, |
| 3995 | { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | 3995 | { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, |
| 3996 | { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[CODEC_TYPE_VIDEO]}, "set the number of video frames to record", "number" }, | 3996 | { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE_VIDEO]}, "set the number of video frames to record", "number" }, |
| 3997 | { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, | 3997 | { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, |
| 3998 | { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, | 3998 | { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, |
| 3999 | { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, | 3999 | { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, |
| @@ -4035,7 +4035,7 @@ static const OptionDef options[] = { · 35 unmodified lines | |||
| 4035 | 4035 | ||
| 4036 | /* audio options */ | 4036 | /* audio options */ |
| 4037 | { "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | 4037 | { "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, |
| 4038 | { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[CODEC_TYPE_AUDIO]}, "set the number of audio frames to record", "number" }, | 4038 | { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[AVMEDIA_TYPE_AUDIO]}, "set the number of audio frames to record", "number" }, |
| 4039 | { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", }, | 4039 | { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", }, |
| 4040 | { "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" }, | 4040 | { "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" }, |
| 4041 | { "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" }, | 4041 | { "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" }, |
| @@ -4090,7 +4090,7 @@ int main(int argc, char **argv) · 48 unmodified lines | |||
| 4090 | url_set_interrupt_cb(decode_interrupt_cb); | 4090 | url_set_interrupt_cb(decode_interrupt_cb); |
| 4091 | #endif | 4091 | #endif |
| 4092 | 4092 | ||
| 4093 | for(i=0; i<CODEC_TYPE_NB; i++){ | 4093 | for(i=0; i<AVMEDIA_TYPE_NB; i++){ |
| 4094 | avcodec_opts[i]= avcodec_alloc_context2(i); | 4094 | avcodec_opts[i]= avcodec_alloc_context2(i); |
| 4095 | } | 4095 | } |
| 4096 | avformat_opts = avformat_alloc_context(); | 4096 | avformat_opts = avformat_alloc_context(); |
| @@ -234,10 +234,10 @@ static int frame_height = 0; · 233 unmodified lines | |||
| 234 | static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE; | 234 | static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE; |
| 235 | static int audio_disable; | 235 | static int audio_disable; |
| 236 | static int video_disable; | 236 | static int video_disable; |
| 237 | static int wanted_stream[CODEC_TYPE_NB]={ | 237 | static int wanted_stream[AVMEDIA_TYPE_NB]={ |
| 238 | [CODEC_TYPE_AUDIO]=-1, | 238 | [AVMEDIA_TYPE_AUDIO]=-1, |
| 239 | [CODEC_TYPE_VIDEO]=-1, | 239 | [AVMEDIA_TYPE_VIDEO]=-1, |
| 240 | [CODEC_TYPE_SUBTITLE]=-1, | 240 | [AVMEDIA_TYPE_SUBTITLE]=-1, |
| 241 | }; | 241 | }; |
| 242 | static int seek_by_bytes=-1; | 242 | static int seek_by_bytes=-1; |
| 243 | static int display_disable; | 243 | static int display_disable; |
| @@ -1643,7 +1643,7 @@ static AVFilter input_filter = · 1399 unmodified lines | |||
| 1643 | 1643 | ||
| 1644 | .inputs = (AVFilterPad[]) {{ .name = NULL }}, | 1644 | .inputs = (AVFilterPad[]) {{ .name = NULL }}, |
| 1645 | .outputs = (AVFilterPad[]) {{ .name = "default", | 1645 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 1646 | .type = CODEC_TYPE_VIDEO, | 1646 | .type = AVMEDIA_TYPE_VIDEO, |
| 1647 | .request_frame = input_request_frame, | 1647 | .request_frame = input_request_frame, |
| 1648 | .config_props = input_config_props, }, | 1648 | .config_props = input_config_props, }, |
| 1649 | { .name = NULL }}, | 1649 | { .name = NULL }}, |
| @@ -1689,7 +1689,7 @@ static AVFilter output_filter = · 39 unmodified lines | |||
| 1689 | .query_formats = output_query_formats, | 1689 | .query_formats = output_query_formats, |
| 1690 | 1690 | ||
| 1691 | .inputs = (AVFilterPad[]) {{ .name = "default", | 1691 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 1692 | .type = CODEC_TYPE_VIDEO, | 1692 | .type = AVMEDIA_TYPE_VIDEO, |
| 1693 | .end_frame = output_end_frame, | 1693 | .end_frame = output_end_frame, |
| 1694 | .min_perms = AV_PERM_READ, }, | 1694 | .min_perms = AV_PERM_READ, }, |
| 1695 | { .name = NULL }}, | 1695 | { .name = NULL }}, |
| @@ -2122,7 +2122,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 426 unmodified lines | |||
| 2122 | avctx = ic->streams[stream_index]->codec; | 2122 | avctx = ic->streams[stream_index]->codec; |
| 2123 | 2123 | ||
| 2124 | /* prepare audio output */ | 2124 | /* prepare audio output */ |
| 2125 | if (avctx->codec_type == CODEC_TYPE_AUDIO) { | 2125 | if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 2126 | if (avctx->channels > 0) { | 2126 | if (avctx->channels > 0) { |
| 2127 | avctx->request_channels = FFMIN(2, avctx->channels); | 2127 | avctx->request_channels = FFMIN(2, avctx->channels); |
| 2128 | } else { | 2128 | } else { |
| @@ -2152,7 +2152,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 23 unmodified lines | |||
| 2152 | return -1; | 2152 | return -1; |
| 2153 | 2153 | ||
| 2154 | /* prepare audio output */ | 2154 | /* prepare audio output */ |
| 2155 | if (avctx->codec_type == CODEC_TYPE_AUDIO) { | 2155 | if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 2156 | wanted_spec.freq = avctx->sample_rate; | 2156 | wanted_spec.freq = avctx->sample_rate; |
| 2157 | wanted_spec.format = AUDIO_S16SYS; | 2157 | wanted_spec.format = AUDIO_S16SYS; |
| 2158 | wanted_spec.channels = avctx->channels; | 2158 | wanted_spec.channels = avctx->channels; |
| @@ -2170,7 +2170,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 11 unmodified lines | |||
| 2170 | 2170 | ||
| 2171 | ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; | 2171 | ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; |
| 2172 | switch(avctx->codec_type) { | 2172 | switch(avctx->codec_type) { |
| 2173 | case CODEC_TYPE_AUDIO: | 2173 | case AVMEDIA_TYPE_AUDIO: |
| 2174 | is->audio_stream = stream_index; | 2174 | is->audio_stream = stream_index; |
| 2175 | is->audio_st = ic->streams[stream_index]; | 2175 | is->audio_st = ic->streams[stream_index]; |
| 2176 | is->audio_buf_size = 0; | 2176 | is->audio_buf_size = 0; |
| @@ -2187,7 +2187,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 10 unmodified lines | |||
| 2187 | packet_queue_init(&is->audioq); | 2187 | packet_queue_init(&is->audioq); |
| 2188 | SDL_PauseAudio(0); | 2188 | SDL_PauseAudio(0); |
| 2189 | break; | 2189 | break; |
| 2190 | case CODEC_TYPE_VIDEO: | 2190 | case AVMEDIA_TYPE_VIDEO: |
| 2191 | is->video_stream = stream_index; | 2191 | is->video_stream = stream_index; |
| 2192 | is->video_st = ic->streams[stream_index]; | 2192 | is->video_st = ic->streams[stream_index]; |
| 2193 | 2193 | ||
| @@ -2196,7 +2196,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 2 unmodified lines | |||
| 2196 | packet_queue_init(&is->videoq); | 2196 | packet_queue_init(&is->videoq); |
| 2197 | is->video_tid = SDL_CreateThread(video_thread, is); | 2197 | is->video_tid = SDL_CreateThread(video_thread, is); |
| 2198 | break; | 2198 | break; |
| 2199 | case CODEC_TYPE_SUBTITLE: | 2199 | case AVMEDIA_TYPE_SUBTITLE: |
| 2200 | is->subtitle_stream = stream_index; | 2200 | is->subtitle_stream = stream_index; |
| 2201 | is->subtitle_st = ic->streams[stream_index]; | 2201 | is->subtitle_st = ic->streams[stream_index]; |
| 2202 | packet_queue_init(&is->subtitleq); | 2202 | packet_queue_init(&is->subtitleq); |
| @@ -2219,7 +2219,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 16 unmodified lines | |||
| 2219 | avctx = ic->streams[stream_index]->codec; | 2219 | avctx = ic->streams[stream_index]->codec; |
| 2220 | 2220 | ||
| 2221 | switch(avctx->codec_type) { | 2221 | switch(avctx->codec_type) { |
| 2222 | case CODEC_TYPE_AUDIO: | 2222 | case AVMEDIA_TYPE_AUDIO: |
| 2223 | packet_queue_abort(&is->audioq); | 2223 | packet_queue_abort(&is->audioq); |
| 2224 | 2224 | ||
| 2225 | SDL_CloseAudio(); | 2225 | SDL_CloseAudio(); |
| @@ -2229,7 +2229,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 3 unmodified lines | |||
| 2229 | av_audio_convert_free(is->reformat_ctx); | 2229 | av_audio_convert_free(is->reformat_ctx); |
| 2230 | is->reformat_ctx = NULL; | 2230 | is->reformat_ctx = NULL; |
| 2231 | break; | 2231 | break; |
| 2232 | case CODEC_TYPE_VIDEO: | 2232 | case AVMEDIA_TYPE_VIDEO: |
| 2233 | packet_queue_abort(&is->videoq); | 2233 | packet_queue_abort(&is->videoq); |
| 2234 | 2234 | ||
| 2235 | /* note: we also signal this mutex to make sure we deblock the | 2235 | /* note: we also signal this mutex to make sure we deblock the |
| @@ -2242,7 +2242,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 6 unmodified lines | |||
| 2242 | 2242 | ||
| 2243 | packet_queue_end(&is->videoq); | 2243 | packet_queue_end(&is->videoq); |
| 2244 | break; | 2244 | break; |
| 2245 | case CODEC_TYPE_SUBTITLE: | 2245 | case AVMEDIA_TYPE_SUBTITLE: |
| 2246 | packet_queue_abort(&is->subtitleq); | 2246 | packet_queue_abort(&is->subtitleq); |
| 2247 | 2247 | ||
| 2248 | /* note: we also signal this mutex to make sure we deblock the | 2248 | /* note: we also signal this mutex to make sure we deblock the |
| @@ -2264,15 +2264,15 @@ static void stream_component_close(VideoState *is, int stream_index) · 15 unmodified lines | |||
| 2264 | ic->streams[stream_index]->discard = AVDISCARD_ALL; | 2264 | ic->streams[stream_index]->discard = AVDISCARD_ALL; |
| 2265 | avcodec_close(avctx); | 2265 | avcodec_close(avctx); |
| 2266 | switch(avctx->codec_type) { | 2266 | switch(avctx->codec_type) { |
| 2267 | case CODEC_TYPE_AUDIO: | 2267 | case AVMEDIA_TYPE_AUDIO: |
| 2268 | is->audio_st = NULL; | 2268 | is->audio_st = NULL; |
| 2269 | is->audio_stream = -1; | 2269 | is->audio_stream = -1; |
| 2270 | break; | 2270 | break; |
| 2271 | case CODEC_TYPE_VIDEO: | 2271 | case AVMEDIA_TYPE_VIDEO: |
| 2272 | is->video_st = NULL; | 2272 | is->video_st = NULL; |
| 2273 | is->video_stream = -1; | 2273 | is->video_stream = -1; |
| 2274 | break; | 2274 | break; |
| 2275 | case CODEC_TYPE_SUBTITLE: | 2275 | case AVMEDIA_TYPE_SUBTITLE: |
| 2276 | is->subtitle_st = NULL; | 2276 | is->subtitle_st = NULL; |
| 2277 | is->subtitle_stream = -1; | 2277 | is->subtitle_stream = -1; |
| 2278 | break; | 2278 | break; |
| @@ -2296,9 +2296,9 @@ static int decode_thread(void *arg) · 17 unmodified lines | |||
| 2296 | VideoState *is = arg; | 2296 | VideoState *is = arg; |
| 2297 | AVFormatContext *ic; | 2297 | AVFormatContext *ic; |
| 2298 | int err, i, ret; | 2298 | int err, i, ret; |
| 2299 | int st_index[CODEC_TYPE_NB]; | 2299 | int st_index[AVMEDIA_TYPE_NB]; |
| 2300 | int st_count[CODEC_TYPE_NB]={0}; | 2300 | int st_count[AVMEDIA_TYPE_NB]={0}; |
| 2301 | int st_best_packet_count[CODEC_TYPE_NB]; | 2301 | int st_best_packet_count[AVMEDIA_TYPE_NB]; |
| 2302 | AVPacket pkt1, *pkt = &pkt1; | 2302 | AVPacket pkt1, *pkt = &pkt1; |
| 2303 | AVFormatParameters params, *ap = ¶ms; | 2303 | AVFormatParameters params, *ap = ¶ms; |
| 2304 | int eof=0; | 2304 | int eof=0; |
| @@ -2366,7 +2366,7 @@ static int decode_thread(void *arg) · 61 unmodified lines | |||
| 2366 | AVStream *st= ic->streams[i]; | 2366 | AVStream *st= ic->streams[i]; |
| 2367 | AVCodecContext *avctx = st->codec; | 2367 | AVCodecContext *avctx = st->codec; |
| 2368 | ic->streams[i]->discard = AVDISCARD_ALL; | 2368 | ic->streams[i]->discard = AVDISCARD_ALL; |
| 2369 | if(avctx->codec_type >= (unsigned)CODEC_TYPE_NB) | 2369 | if(avctx->codec_type >= (unsigned)AVMEDIA_TYPE_NB) |
| 2370 | continue; | 2370 | continue; |
| 2371 | if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0) | 2371 | if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0) |
| 2372 | continue; | 2372 | continue; |
| @@ -2376,12 +2376,12 @@ static int decode_thread(void *arg) · 3 unmodified lines | |||
| 2376 | st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames; | 2376 | st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames; |
| 2377 | 2377 | ||
| 2378 | switch(avctx->codec_type) { | 2378 | switch(avctx->codec_type) { |
| 2379 | case CODEC_TYPE_AUDIO: | 2379 | case AVMEDIA_TYPE_AUDIO: |
| 2380 | if (!audio_disable) | 2380 | if (!audio_disable) |
| 2381 | st_index[CODEC_TYPE_AUDIO] = i; | 2381 | st_index[AVMEDIA_TYPE_AUDIO] = i; |
| 2382 | break; | 2382 | break; |
| 2383 | case CODEC_TYPE_VIDEO: | 2383 | case AVMEDIA_TYPE_VIDEO: |
| 2384 | case CODEC_TYPE_SUBTITLE: | 2384 | case AVMEDIA_TYPE_SUBTITLE: |
| 2385 | if (!video_disable) | 2385 | if (!video_disable) |
| 2386 | st_index[avctx->codec_type] = i; | 2386 | st_index[avctx->codec_type] = i; |
| 2387 | break; | 2387 | break; |
| @@ -2394,13 +2394,13 @@ static int decode_thread(void *arg) · 6 unmodified lines | |||
| 2394 | } | 2394 | } |
| 2395 | 2395 | ||
| 2396 | /* open the streams */ | 2396 | /* open the streams */ |
| 2397 | if (st_index[CODEC_TYPE_AUDIO] >= 0) { | 2397 | if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) { |
| 2398 | stream_component_open(is, st_index[CODEC_TYPE_AUDIO]); | 2398 | stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]); |
| 2399 | } | 2399 | } |
| 2400 | 2400 | ||
| 2401 | ret=-1; | 2401 | ret=-1; |
| 2402 | if (st_index[CODEC_TYPE_VIDEO] >= 0) { | 2402 | if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) { |
| 2403 | ret= stream_component_open(is, st_index[CODEC_TYPE_VIDEO]); | 2403 | ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]); |
| 2404 | } | 2404 | } |
| 2405 | is->refresh_tid = SDL_CreateThread(refresh_thread, is); | 2405 | is->refresh_tid = SDL_CreateThread(refresh_thread, is); |
| 2406 | if(ret<0) { | 2406 | if(ret<0) { |
| @@ -2408,8 +2408,8 @@ static int decode_thread(void *arg) · 1 unmodified line | |||
| 2408 | is->show_audio = 2; | 2408 | is->show_audio = 2; |
| 2409 | } | 2409 | } |
| 2410 | 2410 | ||
| 2411 | if (st_index[CODEC_TYPE_SUBTITLE] >= 0) { | 2411 | if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) { |
| 2412 | stream_component_open(is, st_index[CODEC_TYPE_SUBTITLE]); | 2412 | stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]); |
| 2413 | } | 2413 | } |
| 2414 | 2414 | ||
| 2415 | if (is->video_stream < 0 && is->audio_stream < 0) { | 2415 | if (is->video_stream < 0 && is->audio_stream < 0) { |
| @@ -2612,19 +2612,19 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 196 unmodified lines | |||
| 2612 | int start_index, stream_index; | 2612 | int start_index, stream_index; |
| 2613 | AVStream *st; | 2613 | AVStream *st; |
| 2614 | 2614 | ||
| 2615 | if (codec_type == CODEC_TYPE_VIDEO) | 2615 | if (codec_type == AVMEDIA_TYPE_VIDEO) |
| 2616 | start_index = is->video_stream; | 2616 | start_index = is->video_stream; |
| 2617 | else if (codec_type == CODEC_TYPE_AUDIO) | 2617 | else if (codec_type == AVMEDIA_TYPE_AUDIO) |
| 2618 | start_index = is->audio_stream; | 2618 | start_index = is->audio_stream; |
| 2619 | else | 2619 | else |
| 2620 | start_index = is->subtitle_stream; | 2620 | start_index = is->subtitle_stream; |
| 2621 | if (start_index < (codec_type == CODEC_TYPE_SUBTITLE ? -1 : 0)) | 2621 | if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0)) |
| 2622 | return; | 2622 | return; |
| 2623 | stream_index = start_index; | 2623 | stream_index = start_index; |
| 2624 | for(;;) { | 2624 | for(;;) { |
| 2625 | if (++stream_index >= is->ic->nb_streams) | 2625 | if (++stream_index >= is->ic->nb_streams) |
| 2626 | { | 2626 | { |
| 2627 | if (codec_type == CODEC_TYPE_SUBTITLE) | 2627 | if (codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 2628 | { | 2628 | { |
| 2629 | stream_index = -1; | 2629 | stream_index = -1; |
| 2630 | goto the_end; | 2630 | goto the_end; |
| @@ -2637,13 +2637,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 6 unmodified lines | |||
| 2637 | if (st->codec->codec_type == codec_type) { | 2637 | if (st->codec->codec_type == codec_type) { |
| 2638 | /* check that parameters are OK */ | 2638 | /* check that parameters are OK */ |
| 2639 | switch(codec_type) { | 2639 | switch(codec_type) { |
| 2640 | case CODEC_TYPE_AUDIO: | 2640 | case AVMEDIA_TYPE_AUDIO: |
| 2641 | if (st->codec->sample_rate != 0 && | 2641 | if (st->codec->sample_rate != 0 && |
| 2642 | st->codec->channels != 0) | 2642 | st->codec->channels != 0) |
| 2643 | goto the_end; | 2643 | goto the_end; |
| 2644 | break; | 2644 | break; |
| 2645 | case CODEC_TYPE_VIDEO: | 2645 | case AVMEDIA_TYPE_VIDEO: |
| 2646 | case CODEC_TYPE_SUBTITLE: | 2646 | case AVMEDIA_TYPE_SUBTITLE: |
| 2647 | goto the_end; | 2647 | goto the_end; |
| 2648 | default: | 2648 | default: |
| 2649 | break; | 2649 | break; |
| @@ -2690,7 +2690,7 @@ static void do_exit(void) · 40 unmodified lines | |||
| 2690 | stream_close(cur_stream); | 2690 | stream_close(cur_stream); |
| 2691 | cur_stream = NULL; | 2691 | cur_stream = NULL; |
| 2692 | } | 2692 | } |
| 2693 | for (i = 0; i < CODEC_TYPE_NB; i++) | 2693 | for (i = 0; i < AVMEDIA_TYPE_NB; i++) |
| 2694 | av_free(avcodec_opts[i]); | 2694 | av_free(avcodec_opts[i]); |
| 2695 | av_free(avformat_opts); | 2695 | av_free(avformat_opts); |
| 2696 | av_free(sws_opts); | 2696 | av_free(sws_opts); |
| @@ -2743,15 +2743,15 @@ static void event_loop(void) · 46 unmodified lines | |||
| 2743 | break; | 2743 | break; |
| 2744 | case SDLK_a: | 2744 | case SDLK_a: |
| 2745 | if (cur_stream) | 2745 | if (cur_stream) |
| 2746 | stream_cycle_channel(cur_stream, CODEC_TYPE_AUDIO); | 2746 | stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO); |
| 2747 | break; | 2747 | break; |
| 2748 | case SDLK_v: | 2748 | case SDLK_v: |
| 2749 | if (cur_stream) | 2749 | if (cur_stream) |
| 2750 | stream_cycle_channel(cur_stream, CODEC_TYPE_VIDEO); | 2750 | stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO); |
| 2751 | break; | 2751 | break; |
| 2752 | case SDLK_t: | 2752 | case SDLK_t: |
| 2753 | if (cur_stream) | 2753 | if (cur_stream) |
| 2754 | stream_cycle_channel(cur_stream, CODEC_TYPE_SUBTITLE); | 2754 | stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE); |
| 2755 | break; | 2755 | break; |
| 2756 | case SDLK_w: | 2756 | case SDLK_w: |
| 2757 | toggle_audio_display(); | 2757 | toggle_audio_display(); |
| @@ -2943,9 +2943,9 @@ static const OptionDef options[] = { · 185 unmodified lines | |||
| 2943 | { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, | 2943 | { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, |
| 2944 | { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, | 2944 | { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, |
| 2945 | { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, | 2945 | { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, |
| 2946 | { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_AUDIO]}, "select desired audio stream", "stream_number" }, | 2946 | { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_AUDIO]}, "select desired audio stream", "stream_number" }, |
| 2947 | { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_VIDEO]}, "select desired video stream", "stream_number" }, | 2947 | { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_VIDEO]}, "select desired video stream", "stream_number" }, |
| 2948 | { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" }, | 2948 | { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" }, |
| 2949 | { "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, | 2949 | { "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, |
| 2950 | { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" }, | 2950 | { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" }, |
| 2951 | { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, | 2951 | { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, |
| @@ -3032,7 +3032,7 @@ int main(int argc, char **argv) · 80 unmodified lines | |||
| 3032 | #endif | 3032 | #endif |
| 3033 | av_register_all(); | 3033 | av_register_all(); |
| 3034 | 3034 | ||
| 3035 | for(i=0; i<CODEC_TYPE_NB; i++){ | 3035 | for(i=0; i<AVMEDIA_TYPE_NB; i++){ |
| 3036 | avcodec_opts[i]= avcodec_alloc_context2(i); | 3036 | avcodec_opts[i]= avcodec_alloc_context2(i); |
| 3037 | } | 3037 | } |
| 3038 | avformat_opts = avformat_alloc_context(); | 3038 | avformat_opts = avformat_alloc_context(); |
| @@ -101,14 +101,14 @@ static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRat · 100 unmodified lines | |||
| 101 | return buf; | 101 | return buf; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static const char *codec_type_string(enum CodecType codec_type) | 104 | static const char *media_type_string(enum AVMediaType media_type) |
| 105 | { | 105 | { |
| 106 | switch (codec_type) { | 106 | switch (media_type) { |
| 107 | case CODEC_TYPE_VIDEO: return "video"; | 107 | case AVMEDIA_TYPE_VIDEO: return "video"; |
| 108 | case CODEC_TYPE_AUDIO: return "audio"; | 108 | case AVMEDIA_TYPE_AUDIO: return "audio"; |
| 109 | case CODEC_TYPE_DATA: return "data"; | 109 | case AVMEDIA_TYPE_DATA: return "data"; |
| 110 | case CODEC_TYPE_SUBTITLE: return "subtitle"; | 110 | case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; |
| 111 | case CODEC_TYPE_ATTACHMENT: return "attachment"; | 111 | case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; |
| 112 | default: return "unknown"; | 112 | default: return "unknown"; |
| 113 | } | 113 | } |
| 114 | } | 114 | } |
| @@ -134,7 +134,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 19 unmodified lines | |||
| 134 | printf("codec_name=unknown\n"); | 134 | printf("codec_name=unknown\n"); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | printf("codec_type=%s\n", codec_type_string(dec_ctx->codec_type)); | 137 | printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type)); |
| 138 | printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); | 138 | printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); |
| 139 | 139 | ||
| 140 | /* print AVI/FourCC tag */ | 140 | /* print AVI/FourCC tag */ |
| @@ -150,7 +150,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 9 unmodified lines | |||
| 150 | printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag); | 150 | printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag); |
| 151 | 151 | ||
| 152 | switch (dec_ctx->codec_type) { | 152 | switch (dec_ctx->codec_type) { |
| 153 | case CODEC_TYPE_VIDEO: | 153 | case AVMEDIA_TYPE_VIDEO: |
| 154 | printf("width=%d\n", dec_ctx->width); | 154 | printf("width=%d\n", dec_ctx->width); |
| 155 | printf("height=%d\n", dec_ctx->height); | 155 | printf("height=%d\n", dec_ctx->height); |
| 156 | printf("has_b_frames=%d\n", dec_ctx->has_b_frames); | 156 | printf("has_b_frames=%d\n", dec_ctx->has_b_frames); |
| @@ -162,7 +162,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 5 unmodified lines | |||
| 162 | av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); | 162 | av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); |
| 163 | break; | 163 | break; |
| 164 | 164 | ||
| 165 | case CODEC_TYPE_AUDIO: | 165 | case AVMEDIA_TYPE_AUDIO: |
| 166 | printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), | 166 | printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), |
| 167 | dec_ctx->sample_rate, | 167 | dec_ctx->sample_rate, |
| 168 | unit_hertz_str)); | 168 | unit_hertz_str)); |
| @@ -1805,7 +1805,7 @@ static void compute_status(HTTPContext *c) · 1804 unmodified lines | |||
| 1805 | AVStream *st = stream->streams[i]; | 1805 | AVStream *st = stream->streams[i]; |
| 1806 | AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); | 1806 | AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); |
| 1807 | switch(st->codec->codec_type) { | 1807 | switch(st->codec->codec_type) { |
| 1808 | case CODEC_TYPE_AUDIO: | 1808 | case AVMEDIA_TYPE_AUDIO: |
| 1809 | audio_bit_rate += st->codec->bit_rate; | 1809 | audio_bit_rate += st->codec->bit_rate; |
| 1810 | if (codec) { | 1810 | if (codec) { |
| 1811 | if (*audio_codec_name) | 1811 | if (*audio_codec_name) |
| @@ -1813,7 +1813,7 @@ static void compute_status(HTTPContext *c) · 1 unmodified line | |||
| 1813 | audio_codec_name = codec->name; | 1813 | audio_codec_name = codec->name; |
| 1814 | } | 1814 | } |
| 1815 | break; | 1815 | break; |
| 1816 | case CODEC_TYPE_VIDEO: | 1816 | case AVMEDIA_TYPE_VIDEO: |
| 1817 | video_bit_rate += st->codec->bit_rate; | 1817 | video_bit_rate += st->codec->bit_rate; |
| 1818 | if (codec) { | 1818 | if (codec) { |
| 1819 | if (*video_codec_name) | 1819 | if (*video_codec_name) |
| @@ -1821,7 +1821,7 @@ static void compute_status(HTTPContext *c) · 1 unmodified line | |||
| 1821 | video_codec_name = codec->name; | 1821 | video_codec_name = codec->name; |
| 1822 | } | 1822 | } |
| 1823 | break; | 1823 | break; |
| 1824 | case CODEC_TYPE_DATA: | 1824 | case AVMEDIA_TYPE_DATA: |
| 1825 | video_bit_rate += st->codec->bit_rate; | 1825 | video_bit_rate += st->codec->bit_rate; |
| 1826 | break; | 1826 | break; |
| 1827 | default: | 1827 | default: |
| @@ -1894,11 +1894,11 @@ static void compute_status(HTTPContext *c) · 66 unmodified lines | |||
| 1894 | parameters[0] = 0; | 1894 | parameters[0] = 0; |
| 1895 | 1895 | ||
| 1896 | switch(st->codec->codec_type) { | 1896 | switch(st->codec->codec_type) { |
| 1897 | case CODEC_TYPE_AUDIO: | 1897 | case AVMEDIA_TYPE_AUDIO: |
| 1898 | type = "audio"; | 1898 | type = "audio"; |
| 1899 | snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); | 1899 | snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); |
| 1900 | break; | 1900 | break; |
| 1901 | case CODEC_TYPE_VIDEO: | 1901 | case AVMEDIA_TYPE_VIDEO: |
| 1902 | type = "video"; | 1902 | type = "video"; |
| 1903 | snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, | 1903 | snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, |
| 1904 | st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); | 1904 | st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); |
| @@ -2047,7 +2047,7 @@ static int open_input_stream(HTTPContext *c, const char *info) · 142 unmodified lines | |||
| 2047 | c->pts_stream_index = 0; | 2047 | c->pts_stream_index = 0; |
| 2048 | for(i=0;i<c->stream->nb_streams;i++) { | 2048 | for(i=0;i<c->stream->nb_streams;i++) { |
| 2049 | if (c->pts_stream_index == 0 && | 2049 | if (c->pts_stream_index == 0 && |
| 2050 | c->stream->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) { | 2050 | c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 2051 | c->pts_stream_index = i; | 2051 | c->pts_stream_index = i; |
| 2052 | } | 2052 | } |
| 2053 | } | 2053 | } |
| @@ -2210,7 +2210,7 @@ static int http_prepare_data(HTTPContext *c) · 156 unmodified lines | |||
| 2210 | AVStream *st = c->fmt_in->streams[source_index]; | 2210 | AVStream *st = c->fmt_in->streams[source_index]; |
| 2211 | pkt.stream_index = i; | 2211 | pkt.stream_index = i; |
| 2212 | if (pkt.flags & PKT_FLAG_KEY && | 2212 | if (pkt.flags & PKT_FLAG_KEY && |
| 2213 | (st->codec->codec_type == CODEC_TYPE_VIDEO || | 2213 | (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || |
| 2214 | c->stream->nb_streams == 1)) | 2214 | c->stream->nb_streams == 1)) |
| 2215 | c->got_key_frame = 1; | 2215 | c->got_key_frame = 1; |
| 2216 | if (!c->stream->send_on_key || c->got_key_frame) | 2216 | if (!c->stream->send_on_key || c->got_key_frame) |
| @@ -3346,12 +3346,12 @@ static int add_av_stream(FFStream *feed, AVStream *st) · 1129 unmodified lines | |||
| 3346 | av1->bit_rate == av->bit_rate) { | 3346 | av1->bit_rate == av->bit_rate) { |
| 3347 | 3347 | ||
| 3348 | switch(av->codec_type) { | 3348 | switch(av->codec_type) { |
| 3349 | case CODEC_TYPE_AUDIO: | 3349 | case AVMEDIA_TYPE_AUDIO: |
| 3350 | if (av1->channels == av->channels && | 3350 | if (av1->channels == av->channels && |
| 3351 | av1->sample_rate == av->sample_rate) | 3351 | av1->sample_rate == av->sample_rate) |
| 3352 | goto found; | 3352 | goto found; |
| 3353 | break; | 3353 | break; |
| 3354 | case CODEC_TYPE_VIDEO: | 3354 | case AVMEDIA_TYPE_VIDEO: |
| 3355 | if (av1->width == av->width && | 3355 | if (av1->width == av->width && |
| 3356 | av1->height == av->height && | 3356 | av1->height == av->height && |
| 3357 | av1->time_base.den == av->time_base.den && | 3357 | av1->time_base.den == av->time_base.den && |
| @@ -3549,7 +3549,7 @@ static void build_feed_streams(void) · 191 unmodified lines | |||
| 3549 | } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { | 3549 | } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { |
| 3550 | http_log("Codec bitrates do not match for stream %d\n", i); | 3550 | http_log("Codec bitrates do not match for stream %d\n", i); |
| 3551 | matches = 0; | 3551 | matches = 0; |
| 3552 | } else if (ccf->codec_type == CODEC_TYPE_VIDEO) { | 3552 | } else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 3553 | if (CHECK_CODEC(time_base.den) || | 3553 | if (CHECK_CODEC(time_base.den) || |
| 3554 | CHECK_CODEC(time_base.num) || | 3554 | CHECK_CODEC(time_base.num) || |
| 3555 | CHECK_CODEC(width) || | 3555 | CHECK_CODEC(width) || |
| @@ -3557,7 +3557,7 @@ static void build_feed_streams(void) · 1 unmodified line | |||
| 3557 | http_log("Codec width, height and framerate do not match for stream %d\n", i); | 3557 | http_log("Codec width, height and framerate do not match for stream %d\n", i); |
| 3558 | matches = 0; | 3558 | matches = 0; |
| 3559 | } | 3559 | } |
| 3560 | } else if (ccf->codec_type == CODEC_TYPE_AUDIO) { | 3560 | } else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 3561 | if (CHECK_CODEC(sample_rate) || | 3561 | if (CHECK_CODEC(sample_rate) || |
| 3562 | CHECK_CODEC(channels) || | 3562 | CHECK_CODEC(channels) || |
| 3563 | CHECK_CODEC(frame_size)) { | 3563 | CHECK_CODEC(frame_size)) { |
| @@ -3651,8 +3651,8 @@ static void compute_bandwidth(void) · 87 unmodified lines | |||
| 3651 | for(i=0;i<stream->nb_streams;i++) { | 3651 | for(i=0;i<stream->nb_streams;i++) { |
| 3652 | AVStream *st = stream->streams[i]; | 3652 | AVStream *st = stream->streams[i]; |
| 3653 | switch(st->codec->codec_type) { | 3653 | switch(st->codec->codec_type) { |
| 3654 | case CODEC_TYPE_AUDIO: | 3654 | case AVMEDIA_TYPE_AUDIO: |
| 3655 | case CODEC_TYPE_VIDEO: | 3655 | case AVMEDIA_TYPE_VIDEO: |
| 3656 | bandwidth += st->codec->bit_rate; | 3656 | bandwidth += st->codec->bit_rate; |
| 3657 | break; | 3657 | break; |
| 3658 | default: | 3658 | default: |
| @@ -3670,7 +3670,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 11 unmodified lines | |||
| 3670 | 3670 | ||
| 3671 | /* compute default parameters */ | 3671 | /* compute default parameters */ |
| 3672 | switch(av->codec_type) { | 3672 | switch(av->codec_type) { |
| 3673 | case CODEC_TYPE_AUDIO: | 3673 | case AVMEDIA_TYPE_AUDIO: |
| 3674 | if (av->bit_rate == 0) | 3674 | if (av->bit_rate == 0) |
| 3675 | av->bit_rate = 64000; | 3675 | av->bit_rate = 64000; |
| 3676 | if (av->sample_rate == 0) | 3676 | if (av->sample_rate == 0) |
| @@ -3678,7 +3678,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 1 unmodified line | |||
| 3678 | if (av->channels == 0) | 3678 | if (av->channels == 0) |
| 3679 | av->channels = 1; | 3679 | av->channels = 1; |
| 3680 | break; | 3680 | break; |
| 3681 | case CODEC_TYPE_VIDEO: | 3681 | case AVMEDIA_TYPE_VIDEO: |
| 3682 | if (av->bit_rate == 0) | 3682 | if (av->bit_rate == 0) |
| 3683 | av->bit_rate = 64000; | 3683 | av->bit_rate = 64000; |
| 3684 | if (av->time_base.num == 0){ | 3684 | if (av->time_base.num == 0){ |
| @@ -3742,7 +3742,7 @@ static enum CodecID opt_audio_codec(const char *arg) · 57 unmodified lines | |||
| 3742 | { | 3742 | { |
| 3743 | AVCodec *p= avcodec_find_encoder_by_name(arg); | 3743 | AVCodec *p= avcodec_find_encoder_by_name(arg); |
| 3744 | 3744 | ||
| 3745 | if (p == NULL || p->type != CODEC_TYPE_AUDIO) | 3745 | if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO) |
| 3746 | return CODEC_ID_NONE; | 3746 | return CODEC_ID_NONE; |
| 3747 | 3747 | ||
| 3748 | return p->id; | 3748 | return p->id; |
| @@ -3752,7 +3752,7 @@ static enum CodecID opt_video_codec(const char *arg) · 3 unmodified lines | |||
| 3752 | { | 3752 | { |
| 3753 | AVCodec *p= avcodec_find_encoder_by_name(arg); | 3753 | AVCodec *p= avcodec_find_encoder_by_name(arg); |
| 3754 | 3754 | ||
| 3755 | if (p == NULL || p->type != CODEC_TYPE_VIDEO) | 3755 | if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO) |
| 3756 | return CODEC_ID_NONE; | 3756 | return CODEC_ID_NONE; |
| 3757 | 3757 | ||
| 3758 | return p->id; | 3758 | return p->id; |
| @@ -4445,12 +4445,12 @@ static int parse_ffconfig(const char *filename) · 686 unmodified lines | |||
| 4445 | } else { | 4445 | } else { |
| 4446 | if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { | 4446 | if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { |
| 4447 | if (audio_id != CODEC_ID_NONE) { | 4447 | if (audio_id != CODEC_ID_NONE) { |
| 4448 | audio_enc.codec_type = CODEC_TYPE_AUDIO; | 4448 | audio_enc.codec_type = AVMEDIA_TYPE_AUDIO; |
| 4449 | audio_enc.codec_id = audio_id; | 4449 | audio_enc.codec_id = audio_id; |
| 4450 | add_codec(stream, &audio_enc); | 4450 | add_codec(stream, &audio_enc); |
| 4451 | } | 4451 | } |
| 4452 | if (video_id != CODEC_ID_NONE) { | 4452 | if (video_id != CODEC_ID_NONE) { |
| 4453 | video_enc.codec_type = CODEC_TYPE_VIDEO; | 4453 | video_enc.codec_type = AVMEDIA_TYPE_VIDEO; |
| 4454 | video_enc.codec_id = video_id; | 4454 | video_enc.codec_id = video_id; |
| 4455 | add_codec(stream, &video_enc); | 4455 | add_codec(stream, &video_enc); |
| 4456 | } | 4456 | } |
| @@ -842,7 +842,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 841 unmodified lines | |||
| 842 | 842 | ||
| 843 | AVCodec fourxm_decoder = { | 843 | AVCodec fourxm_decoder = { |
| 844 | "4xm", | 844 | "4xm", |
| 845 | CODEC_TYPE_VIDEO, | 845 | AVMEDIA_TYPE_VIDEO, |
| 846 | CODEC_ID_4XM, | 846 | CODEC_ID_4XM, |
| 847 | sizeof(FourXContext), | 847 | sizeof(FourXContext), |
| 848 | decode_init, | 848 | decode_init, |
| @@ -221,7 +221,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 220 unmodified lines | |||
| 221 | 221 | ||
| 222 | AVCodec eightbps_decoder = { | 222 | AVCodec eightbps_decoder = { |
| 223 | "8bps", | 223 | "8bps", |
| 224 | CODEC_TYPE_VIDEO, | 224 | AVMEDIA_TYPE_VIDEO, |
| 225 | CODEC_ID_8BPS, | 225 | CODEC_ID_8BPS, |
| 226 | sizeof(EightBpsContext), | 226 | sizeof(EightBpsContext), |
| 227 | decode_init, | 227 | decode_init, |
| @@ -94,7 +94,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx) · 93 unmodified lines | |||
| 94 | 94 | ||
| 95 | AVCodec eightsvx_fib_decoder = { | 95 | AVCodec eightsvx_fib_decoder = { |
| 96 | .name = "8svx_fib", | 96 | .name = "8svx_fib", |
| 97 | .type = CODEC_TYPE_AUDIO, | 97 | .type = AVMEDIA_TYPE_AUDIO, |
| 98 | .id = CODEC_ID_8SVX_FIB, | 98 | .id = CODEC_ID_8SVX_FIB, |
| 99 | .priv_data_size = sizeof (EightSvxContext), | 99 | .priv_data_size = sizeof (EightSvxContext), |
| 100 | .init = eightsvx_decode_init, | 100 | .init = eightsvx_decode_init, |
| @@ -104,7 +104,7 @@ AVCodec eightsvx_fib_decoder = { · 3 unmodified lines | |||
| 104 | 104 | ||
| 105 | AVCodec eightsvx_exp_decoder = { | 105 | AVCodec eightsvx_exp_decoder = { |
| 106 | .name = "8svx_exp", | 106 | .name = "8svx_exp", |
| 107 | .type = CODEC_TYPE_AUDIO, | 107 | .type = AVMEDIA_TYPE_AUDIO, |
| 108 | .id = CODEC_ID_8SVX_EXP, | 108 | .id = CODEC_ID_8SVX_EXP, |
| 109 | .priv_data_size = sizeof (EightSvxContext), | 109 | .priv_data_size = sizeof (EightSvxContext), |
| 110 | .init = eightsvx_decode_init, | 110 | .init = eightsvx_decode_init, |
| @@ -2091,7 +2091,7 @@ static av_cold int aac_decode_close(AVCodecContext *avccontext) · 2090 unmodified lines | |||
| 2091 | 2091 | ||
| 2092 | AVCodec aac_decoder = { | 2092 | AVCodec aac_decoder = { |
| 2093 | "aac", | 2093 | "aac", |
| 2094 | CODEC_TYPE_AUDIO, | 2094 | AVMEDIA_TYPE_AUDIO, |
| 2095 | CODEC_ID_AAC, | 2095 | CODEC_ID_AAC, |
| 2096 | sizeof(AACContext), | 2096 | sizeof(AACContext), |
| 2097 | aac_decode_init, | 2097 | aac_decode_init, |
| @@ -629,7 +629,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx) · 628 unmodified lines | |||
| 629 | 629 | ||
| 630 | AVCodec aac_encoder = { | 630 | AVCodec aac_encoder = { |
| 631 | "aac", | 631 | "aac", |
| 632 | CODEC_TYPE_AUDIO, | 632 | AVMEDIA_TYPE_AUDIO, |
| 633 | CODEC_ID_AAC, | 633 | CODEC_ID_AAC, |
| 634 | sizeof(AACEncContext), | 634 | sizeof(AACEncContext), |
| 635 | aac_encode_init, | 635 | aac_encode_init, |
| @@ -111,7 +111,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) · 110 unmodified lines | |||
| 111 | 111 | ||
| 112 | AVCodec aasc_decoder = { | 112 | AVCodec aasc_decoder = { |
| 113 | "aasc", | 113 | "aasc", |
| 114 | CODEC_TYPE_VIDEO, | 114 | AVMEDIA_TYPE_VIDEO, |
| 115 | CODEC_ID_AASC, | 115 | CODEC_ID_AASC, |
| 116 | sizeof(AascContext), | 116 | sizeof(AascContext), |
| 117 | aasc_decode_init, | 117 | aasc_decode_init, |
| @@ -1439,7 +1439,7 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx) · 1438 unmodified lines | |||
| 1439 | 1439 | ||
| 1440 | AVCodec ac3_decoder = { | 1440 | AVCodec ac3_decoder = { |
| 1441 | .name = "ac3", | 1441 | .name = "ac3", |
| 1442 | .type = CODEC_TYPE_AUDIO, | 1442 | .type = AVMEDIA_TYPE_AUDIO, |
| 1443 | .id = CODEC_ID_AC3, | 1443 | .id = CODEC_ID_AC3, |
| 1444 | .priv_data_size = sizeof (AC3DecodeContext), | 1444 | .priv_data_size = sizeof (AC3DecodeContext), |
| 1445 | .init = ac3_decode_init, | 1445 | .init = ac3_decode_init, |
| @@ -1451,7 +1451,7 @@ AVCodec ac3_decoder = { · 5 unmodified lines | |||
| 1451 | #if CONFIG_EAC3_DECODER | 1451 | #if CONFIG_EAC3_DECODER |
| 1452 | AVCodec eac3_decoder = { | 1452 | AVCodec eac3_decoder = { |
| 1453 | .name = "eac3", | 1453 | .name = "eac3", |
| 1454 | .type = CODEC_TYPE_AUDIO, | 1454 | .type = AVMEDIA_TYPE_AUDIO, |
| 1455 | .id = CODEC_ID_EAC3, | 1455 | .id = CODEC_ID_EAC3, |
| 1456 | .priv_data_size = sizeof (AC3DecodeContext), | 1456 | .priv_data_size = sizeof (AC3DecodeContext), |
| 1457 | .init = ac3_decode_init, | 1457 | .init = ac3_decode_init, |
| @@ -1393,7 +1393,7 @@ void test_ac3(void) · 1392 unmodified lines | |||
| 1393 | 1393 | ||
| 1394 | AVCodec ac3_encoder = { | 1394 | AVCodec ac3_encoder = { |
| 1395 | "ac3", | 1395 | "ac3", |
| 1396 | CODEC_TYPE_AUDIO, | 1396 | AVMEDIA_TYPE_AUDIO, |
| 1397 | CODEC_ID_AC3, | 1397 | CODEC_ID_AC3, |
| 1398 | sizeof(AC3EncodeContext), | 1398 | sizeof(AC3EncodeContext), |
| 1399 | AC3_encode_init, | 1399 | AC3_encode_init, |
| @@ -1638,7 +1638,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, · 1637 unmodified lines | |||
| 1638 | #define ADPCM_ENCODER(id,name,long_name_) \ | 1638 | #define ADPCM_ENCODER(id,name,long_name_) \ |
| 1639 | AVCodec name ## _encoder = { \ | 1639 | AVCodec name ## _encoder = { \ |
| 1640 | #name, \ | 1640 | #name, \ |
| 1641 | CODEC_TYPE_AUDIO, \ | 1641 | AVMEDIA_TYPE_AUDIO, \ |
| 1642 | id, \ | 1642 | id, \ |
| 1643 | sizeof(ADPCMContext), \ | 1643 | sizeof(ADPCMContext), \ |
| 1644 | adpcm_encode_init, \ | 1644 | adpcm_encode_init, \ |
| @@ -1656,7 +1656,7 @@ AVCodec name ## _encoder = { \ · 11 unmodified lines | |||
| 1656 | #define ADPCM_DECODER(id,name,long_name_) \ | 1656 | #define ADPCM_DECODER(id,name,long_name_) \ |
| 1657 | AVCodec name ## _decoder = { \ | 1657 | AVCodec name ## _decoder = { \ |
| 1658 | #name, \ | 1658 | #name, \ |
| 1659 | CODEC_TYPE_AUDIO, \ | 1659 | AVMEDIA_TYPE_AUDIO, \ |
| 1660 | id, \ | 1660 | id, \ |
| 1661 | sizeof(ADPCMContext), \ | 1661 | sizeof(ADPCMContext), \ |
| 1662 | adpcm_decode_init, \ | 1662 | adpcm_decode_init, \ |
| @@ -168,7 +168,7 @@ static int adx_decode_frame(AVCodecContext *avctx, · 167 unmodified lines | |||
| 168 | 168 | ||
| 169 | AVCodec adpcm_adx_decoder = { | 169 | AVCodec adpcm_adx_decoder = { |
| 170 | "adpcm_adx", | 170 | "adpcm_adx", |
| 171 | CODEC_TYPE_AUDIO, | 171 | AVMEDIA_TYPE_AUDIO, |
| 172 | CODEC_ID_ADPCM_ADX, | 172 | CODEC_ID_ADPCM_ADX, |
| 173 | sizeof(ADXContext), | 173 | sizeof(ADXContext), |
| 174 | adx_decode_init, | 174 | adx_decode_init, |
| @@ -185,7 +185,7 @@ static int adx_encode_frame(AVCodecContext *avctx, · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | AVCodec adpcm_adx_encoder = { | 186 | AVCodec adpcm_adx_encoder = { |
| 187 | "adpcm_adx", | 187 | "adpcm_adx", |
| 188 | CODEC_TYPE_AUDIO, | 188 | AVMEDIA_TYPE_AUDIO, |
| 189 | CODEC_ID_ADPCM_ADX, | 189 | CODEC_ID_ADPCM_ADX, |
| 190 | sizeof(ADXContext), | 190 | sizeof(ADXContext), |
| 191 | adx_encode_init, | 191 | adx_encode_init, |
| @@ -701,7 +701,7 @@ static av_cold int alac_decode_close(AVCodecContext *avctx) · 700 unmodified lines | |||
| 701 | 701 | ||
| 702 | AVCodec alac_decoder = { | 702 | AVCodec alac_decoder = { |
| 703 | "alac", | 703 | "alac", |
| 704 | CODEC_TYPE_AUDIO, | 704 | AVMEDIA_TYPE_AUDIO, |
| 705 | CODEC_ID_ALAC, | 705 | CODEC_ID_ALAC, |
| 706 | sizeof(ALACContext), | 706 | sizeof(ALACContext), |
| 707 | alac_decode_init, | 707 | alac_decode_init, |
| @@ -521,7 +521,7 @@ static av_cold int alac_encode_close(AVCodecContext *avctx) · 520 unmodified lines | |||
| 521 | 521 | ||
| 522 | AVCodec alac_encoder = { | 522 | AVCodec alac_encoder = { |
| 523 | "alac", | 523 | "alac", |
| 524 | CODEC_TYPE_AUDIO, | 524 | AVMEDIA_TYPE_AUDIO, |
| 525 | CODEC_ID_ALAC, | 525 | CODEC_ID_ALAC, |
| 526 | sizeof(AlacEncodeContext), | 526 | sizeof(AlacEncodeContext), |
| 527 | alac_encode_init, | 527 | alac_encode_init, |
| @@ -1622,7 +1622,7 @@ static av_cold void flush(AVCodecContext *avctx) · 1621 unmodified lines | |||
| 1622 | 1622 | ||
| 1623 | AVCodec als_decoder = { | 1623 | AVCodec als_decoder = { |
| 1624 | "als", | 1624 | "als", |
| 1625 | CODEC_TYPE_AUDIO, | 1625 | AVMEDIA_TYPE_AUDIO, |
| 1626 | CODEC_ID_MP4ALS, | 1626 | CODEC_ID_MP4ALS, |
| 1627 | sizeof(ALSDecContext), | 1627 | sizeof(ALSDecContext), |
| 1628 | decode_init, | 1628 | decode_init, |
| @@ -1071,7 +1071,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 1070 unmodified lines | |||
| 1071 | 1071 | ||
| 1072 | AVCodec amrnb_decoder = { | 1072 | AVCodec amrnb_decoder = { |
| 1073 | .name = "amrnb", | 1073 | .name = "amrnb", |
| 1074 | .type = CODEC_TYPE_AUDIO, | 1074 | .type = AVMEDIA_TYPE_AUDIO, |
| 1075 | .id = CODEC_ID_AMR_NB, | 1075 | .id = CODEC_ID_AMR_NB, |
| 1076 | .priv_data_size = sizeof(AMRContext), | 1076 | .priv_data_size = sizeof(AMRContext), |
| 1077 | .init = amrnb_decode_init, | 1077 | .init = amrnb_decode_init, |
| @@ -185,7 +185,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | AVCodec anm_decoder = { | 186 | AVCodec anm_decoder = { |
| 187 | "anm", | 187 | "anm", |
| 188 | CODEC_TYPE_VIDEO, | 188 | AVMEDIA_TYPE_VIDEO, |
| 189 | CODEC_ID_ANM, | 189 | CODEC_ID_ANM, |
| 190 | sizeof(AnmContext), | 190 | sizeof(AnmContext), |
| 191 | decode_init, | 191 | decode_init, |
| @@ -879,7 +879,7 @@ static int ape_decode_frame(AVCodecContext * avctx, · 878 unmodified lines | |||
| 879 | 879 | ||
| 880 | AVCodec ape_decoder = { | 880 | AVCodec ape_decoder = { |
| 881 | "ape", | 881 | "ape", |
| 882 | CODEC_TYPE_AUDIO, | 882 | AVMEDIA_TYPE_AUDIO, |
| 883 | CODEC_ID_APE, | 883 | CODEC_ID_APE, |
| 884 | sizeof(APEContext), | 884 | sizeof(APEContext), |
| 885 | ape_decode_init, | 885 | ape_decode_init, |
| @@ -615,7 +615,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 614 unmodified lines | |||
| 615 | 615 | ||
| 616 | AVCodec asv1_decoder = { | 616 | AVCodec asv1_decoder = { |
| 617 | "asv1", | 617 | "asv1", |
| 618 | CODEC_TYPE_VIDEO, | 618 | AVMEDIA_TYPE_VIDEO, |
| 619 | CODEC_ID_ASV1, | 619 | CODEC_ID_ASV1, |
| 620 | sizeof(ASV1Context), | 620 | sizeof(ASV1Context), |
| 621 | decode_init, | 621 | decode_init, |
| @@ -628,7 +628,7 @@ AVCodec asv1_decoder = { · 6 unmodified lines | |||
| 628 | 628 | ||
| 629 | AVCodec asv2_decoder = { | 629 | AVCodec asv2_decoder = { |
| 630 | "asv2", | 630 | "asv2", |
| 631 | CODEC_TYPE_VIDEO, | 631 | AVMEDIA_TYPE_VIDEO, |
| 632 | CODEC_ID_ASV2, | 632 | CODEC_ID_ASV2, |
| 633 | sizeof(ASV1Context), | 633 | sizeof(ASV1Context), |
| 634 | decode_init, | 634 | decode_init, |
| @@ -642,7 +642,7 @@ AVCodec asv2_decoder = { · 7 unmodified lines | |||
| 642 | #if CONFIG_ASV1_ENCODER | 642 | #if CONFIG_ASV1_ENCODER |
| 643 | AVCodec asv1_encoder = { | 643 | AVCodec asv1_encoder = { |
| 644 | "asv1", | 644 | "asv1", |
| 645 | CODEC_TYPE_VIDEO, | 645 | AVMEDIA_TYPE_VIDEO, |
| 646 | CODEC_ID_ASV1, | 646 | CODEC_ID_ASV1, |
| 647 | sizeof(ASV1Context), | 647 | sizeof(ASV1Context), |
| 648 | encode_init, | 648 | encode_init, |
| @@ -656,7 +656,7 @@ AVCodec asv1_encoder = { · 7 unmodified lines | |||
| 656 | #if CONFIG_ASV2_ENCODER | 656 | #if CONFIG_ASV2_ENCODER |
| 657 | AVCodec asv2_encoder = { | 657 | AVCodec asv2_encoder = { |
| 658 | "asv2", | 658 | "asv2", |
| 659 | CODEC_TYPE_VIDEO, | 659 | AVMEDIA_TYPE_VIDEO, |
| 660 | CODEC_ID_ASV2, | 660 | CODEC_ID_ASV2, |
| 661 | sizeof(ASV1Context), | 661 | sizeof(ASV1Context), |
| 662 | encode_init, | 662 | encode_init, |
| @@ -372,7 +372,7 @@ static av_cold int atrac1_decode_end(AVCodecContext * avctx) { · 371 unmodified lines | |||
| 372 | 372 | ||
| 373 | AVCodec atrac1_decoder = { | 373 | AVCodec atrac1_decoder = { |
| 374 | .name = "atrac1", | 374 | .name = "atrac1", |
| 375 | .type = CODEC_TYPE_AUDIO, | 375 | .type = AVMEDIA_TYPE_AUDIO, |
| 376 | .id = CODEC_ID_ATRAC1, | 376 | .id = CODEC_ID_ATRAC1, |
| 377 | .priv_data_size = sizeof(AT1Ctx), | 377 | .priv_data_size = sizeof(AT1Ctx), |
| 378 | .init = atrac1_decode_init, | 378 | .init = atrac1_decode_init, |
| @@ -1016,7 +1016,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) · 1015 unmodified lines | |||
| 1016 | AVCodec atrac3_decoder = | 1016 | AVCodec atrac3_decoder = |
| 1017 | { | 1017 | { |
| 1018 | .name = "atrac3", | 1018 | .name = "atrac3", |
| 1019 | .type = CODEC_TYPE_AUDIO, | 1019 | .type = AVMEDIA_TYPE_AUDIO, |
| 1020 | .id = CODEC_ID_ATRAC3, | 1020 | .id = CODEC_ID_ATRAC3, |
| 1021 | .priv_data_size = sizeof(ATRAC3Context), | 1021 | .priv_data_size = sizeof(ATRAC3Context), |
| 1022 | .init = atrac3_decode_init, | 1022 | .init = atrac3_decode_init, |
| @@ -124,7 +124,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx) · 123 unmodified lines | |||
| 124 | 124 | ||
| 125 | AVCodec aura2_decoder = { | 125 | AVCodec aura2_decoder = { |
| 126 | "aura2", | 126 | "aura2", |
| 127 | CODEC_TYPE_VIDEO, | 127 | AVMEDIA_TYPE_VIDEO, |
| 128 | CODEC_ID_AURA2, | 128 | CODEC_ID_AURA2, |
| 129 | sizeof(AuraDecodeContext), | 129 | sizeof(AuraDecodeContext), |
| 130 | aura_decode_init, | 130 | aura_decode_init, |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "libavutil/avutil.h" | 30 | #include "libavutil/avutil.h" |
| 31 | 31 | ||
| 32 | #define LIBAVCODEC_VERSION_MAJOR 52 | 32 | #define LIBAVCODEC_VERSION_MAJOR 52 |
| 33 | #define LIBAVCODEC_VERSION_MINOR 63 | 33 | #define LIBAVCODEC_VERSION_MINOR 64 |
| 34 | #define LIBAVCODEC_VERSION_MICRO 0 | 34 | #define LIBAVCODEC_VERSION_MICRO 0 |
| 35 | 35 | ||
| 36 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 36 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| @@ -355,16 +355,28 @@ enum CodecID { · 318 unmodified lines | |||
| 355 | * stream (only used by libavformat) */ | 355 | * stream (only used by libavformat) */ |
| 356 | }; | 356 | }; |
| 357 | 357 | ||
| 358 | enum CodecType { | 358 | enum AVMediaType { |
| 359 | CODEC_TYPE_UNKNOWN = -1, | 359 | AVMEDIA_TYPE_UNKNOWN = -1, |
| 360 | CODEC_TYPE_VIDEO, | 360 | AVMEDIA_TYPE_VIDEO, |
| 361 | CODEC_TYPE_AUDIO, | 361 | AVMEDIA_TYPE_AUDIO, |
| 362 | CODEC_TYPE_DATA, | 362 | AVMEDIA_TYPE_DATA, |
| 363 | CODEC_TYPE_SUBTITLE, | 363 | AVMEDIA_TYPE_SUBTITLE, |
| 364 | CODEC_TYPE_ATTACHMENT, | 364 | AVMEDIA_TYPE_ATTACHMENT, |
| 365 | CODEC_TYPE_NB | 365 | AVMEDIA_TYPE_NB |
| 366 | }; | 366 | }; |
| 367 | 367 | ||
| 368 | #if LIBAVCODEC_VERSION_MAJOR < 53 | ||
| 369 | #define CodecType AVMediaType | ||
| 370 | |||
| 371 | #define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN | ||
| 372 | #define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO | ||
| 373 | #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO | ||
| 374 | #define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA | ||
| 375 | #define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE | ||
| 376 | #define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT | ||
| 377 | #define CODEC_TYPE_NB AVMEDIA_TYPE_NB | ||
| 378 | #endif | ||
| 379 | |||
| 368 | /** | 380 | /** |
| 369 | * all in native-endian format | 381 | * all in native-endian format |
| 370 | */ | 382 | */ |
| @@ -1277,7 +1289,7 @@ typedef struct AVCodecContext { · 906 unmodified lines | |||
| 1277 | void *opaque; | 1289 | void *opaque; |
| 1278 | 1290 | ||
| 1279 | char codec_name[32]; | 1291 | char codec_name[32]; |
| 1280 | enum CodecType codec_type; /* see CODEC_TYPE_xxx */ | 1292 | enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ |
| 1281 | enum CodecID codec_id; /* see CODEC_ID_xxx */ | 1293 | enum CodecID codec_id; /* see CODEC_ID_xxx */ |
| 1282 | 1294 | ||
| 1283 | /** | 1295 | /** |
| @@ -2657,7 +2669,7 @@ typedef struct AVCodec { · 1373 unmodified lines | |||
| 2657 | * This is the primary way to find a codec from the user perspective. | 2669 | * This is the primary way to find a codec from the user perspective. |
| 2658 | */ | 2670 | */ |
| 2659 | const char *name; | 2671 | const char *name; |
| 2660 | enum CodecType type; | 2672 | enum AVMediaType type; |
| 2661 | enum CodecID id; | 2673 | enum CodecID id; |
| 2662 | int priv_data_size; | 2674 | int priv_data_size; |
| 2663 | int (*init)(AVCodecContext *); | 2675 | int (*init)(AVCodecContext *); |
| @@ -2701,9 +2713,9 @@ typedef struct AVHWAccel { · 37 unmodified lines | |||
| 2701 | /** | 2713 | /** |
| 2702 | * Type of codec implemented by the hardware accelerator. | 2714 | * Type of codec implemented by the hardware accelerator. |
| 2703 | * | 2715 | * |
| 2704 | * See CODEC_TYPE_xxx | 2716 | * See AVMEDIA_TYPE_xxx |
| 2705 | */ | 2717 | */ |
| 2706 | enum CodecType type; | 2718 | enum AVMediaType type; |
| 2707 | 2719 | ||
| 2708 | /** | 2720 | /** |
| 2709 | * Codec implemented by the hardware accelerator. | 2721 | * Codec implemented by the hardware accelerator. |
| @@ -3241,7 +3253,7 @@ void avcodec_get_context_defaults(AVCodecContext *s); · 531 unmodified lines | |||
| 3241 | 3253 | ||
| 3242 | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | 3254 | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! |
| 3243 | * we WILL change its arguments and name a few times! */ | 3255 | * we WILL change its arguments and name a few times! */ |
| 3244 | void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType); | 3256 | void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType); |
| 3245 | 3257 | ||
| 3246 | /** | 3258 | /** |
| 3247 | * Allocates an AVCodecContext and sets its fields to default values. The | 3259 | * Allocates an AVCodecContext and sets its fields to default values. The |
| @@ -3254,7 +3266,7 @@ AVCodecContext *avcodec_alloc_context(void); · 6 unmodified lines | |||
| 3254 | 3266 | ||
| 3255 | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | 3267 | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! |
| 3256 | * we WILL change its arguments and name a few times! */ | 3268 | * we WILL change its arguments and name a few times! */ |
| 3257 | AVCodecContext *avcodec_alloc_context2(enum CodecType); | 3269 | AVCodecContext *avcodec_alloc_context2(enum AVMediaType); |
| 3258 | 3270 | ||
| 3259 | /** | 3271 | /** |
| 3260 | * Sets the fields of the given AVFrame to default values. | 3272 | * Sets the fields of the given AVFrame to default values. |
| @@ -152,7 +152,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) · 151 unmodified lines | |||
| 152 | 152 | ||
| 153 | AVCodec avs_decoder = { | 153 | AVCodec avs_decoder = { |
| 154 | "avs", | 154 | "avs", |
| 155 | CODEC_TYPE_VIDEO, | 155 | AVMEDIA_TYPE_VIDEO, |
| 156 | CODEC_ID_AVS, | 156 | CODEC_ID_AVS, |
| 157 | sizeof(AvsContext), | 157 | sizeof(AvsContext), |
| 158 | avs_decode_init, | 158 | avs_decode_init, |
| @@ -132,7 +132,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) · 131 unmodified lines | |||
| 132 | 132 | ||
| 133 | AVCodec bethsoftvid_decoder = { | 133 | AVCodec bethsoftvid_decoder = { |
| 134 | .name = "bethsoftvid", | 134 | .name = "bethsoftvid", |
| 135 | .type = CODEC_TYPE_VIDEO, | 135 | .type = AVMEDIA_TYPE_VIDEO, |
| 136 | .id = CODEC_ID_BETHSOFTVID, | 136 | .id = CODEC_ID_BETHSOFTVID, |
| 137 | .priv_data_size = sizeof(BethsoftvidContext), | 137 | .priv_data_size = sizeof(BethsoftvidContext), |
| 138 | .init = bethsoftvid_decode_init, | 138 | .init = bethsoftvid_decode_init, |
| @@ -173,7 +173,7 @@ static av_cold int bfi_decode_close(AVCodecContext * avctx) · 172 unmodified lines | |||
| 173 | 173 | ||
| 174 | AVCodec bfi_decoder = { | 174 | AVCodec bfi_decoder = { |
| 175 | .name = "bfi", | 175 | .name = "bfi", |
| 176 | .type = CODEC_TYPE_VIDEO, | 176 | .type = AVMEDIA_TYPE_VIDEO, |
| 177 | .id = CODEC_ID_BFI, | 177 | .id = CODEC_ID_BFI, |
| 178 | .priv_data_size = sizeof(BFIContext), | 178 | .priv_data_size = sizeof(BFIContext), |
| 179 | .init = bfi_decode_init, | 179 | .init = bfi_decode_init, |
| @@ -1001,7 +1001,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1000 unmodified lines | |||
| 1001 | 1001 | ||
| 1002 | AVCodec bink_decoder = { | 1002 | AVCodec bink_decoder = { |
| 1003 | "binkvideo", | 1003 | "binkvideo", |
| 1004 | CODEC_TYPE_VIDEO, | 1004 | AVMEDIA_TYPE_VIDEO, |
| 1005 | CODEC_ID_BINKVIDEO, | 1005 | CODEC_ID_BINKVIDEO, |
| 1006 | sizeof(BinkContext), | 1006 | sizeof(BinkContext), |
| 1007 | decode_init, | 1007 | decode_init, |
| @@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *avctx, · 287 unmodified lines | |||
| 288 | 288 | ||
| 289 | AVCodec binkaudio_rdft_decoder = { | 289 | AVCodec binkaudio_rdft_decoder = { |
| 290 | "binkaudio_rdft", | 290 | "binkaudio_rdft", |
| 291 | CODEC_TYPE_AUDIO, | 291 | AVMEDIA_TYPE_AUDIO, |
| 292 | CODEC_ID_BINKAUDIO_RDFT, | 292 | CODEC_ID_BINKAUDIO_RDFT, |
| 293 | sizeof(BinkAudioContext), | 293 | sizeof(BinkAudioContext), |
| 294 | decode_init, | 294 | decode_init, |
| @@ -300,7 +300,7 @@ AVCodec binkaudio_rdft_decoder = { · 5 unmodified lines | |||
| 300 | 300 | ||
| 301 | AVCodec binkaudio_dct_decoder = { | 301 | AVCodec binkaudio_dct_decoder = { |
| 302 | "binkaudio_dct", | 302 | "binkaudio_dct", |
| 303 | CODEC_TYPE_AUDIO, | 303 | AVMEDIA_TYPE_AUDIO, |
| 304 | CODEC_ID_BINKAUDIO_DCT, | 304 | CODEC_ID_BINKAUDIO_DCT, |
| 305 | sizeof(BinkAudioContext), | 305 | sizeof(BinkAudioContext), |
| 306 | decode_init, | 306 | decode_init, |
| @@ -337,7 +337,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx) · 336 unmodified lines | |||
| 337 | 337 | ||
| 338 | AVCodec bmp_decoder = { | 338 | AVCodec bmp_decoder = { |
| 339 | "bmp", | 339 | "bmp", |
| 340 | CODEC_TYPE_VIDEO, | 340 | AVMEDIA_TYPE_VIDEO, |
| 341 | CODEC_ID_BMP, | 341 | CODEC_ID_BMP, |
| 342 | sizeof(BMPContext), | 342 | sizeof(BMPContext), |
| 343 | bmp_decode_init, | 343 | bmp_decode_init, |
| @@ -133,7 +133,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_s · 132 unmodified lines | |||
| 133 | 133 | ||
| 134 | AVCodec bmp_encoder = { | 134 | AVCodec bmp_encoder = { |
| 135 | "bmp", | 135 | "bmp", |
| 136 | CODEC_TYPE_VIDEO, | 136 | AVMEDIA_TYPE_VIDEO, |
| 137 | CODEC_ID_BMP, | 137 | CODEC_ID_BMP, |
| 138 | sizeof(BMPContext), | 138 | sizeof(BMPContext), |
| 139 | bmp_encode_init, | 139 | bmp_encode_init, |
| @@ -244,7 +244,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 243 unmodified lines | |||
| 244 | 244 | ||
| 245 | AVCodec c93_decoder = { | 245 | AVCodec c93_decoder = { |
| 246 | "c93", | 246 | "c93", |
| 247 | CODEC_TYPE_VIDEO, | 247 | AVMEDIA_TYPE_VIDEO, |
| 248 | CODEC_ID_C93, | 248 | CODEC_ID_C93, |
| 249 | sizeof(C93DecoderContext), | 249 | sizeof(C93DecoderContext), |
| 250 | decode_init, | 250 | decode_init, |
| @@ -711,7 +711,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, · 710 unmodified lines | |||
| 711 | 711 | ||
| 712 | AVCodec cavs_decoder = { | 712 | AVCodec cavs_decoder = { |
| 713 | "cavs", | 713 | "cavs", |
| 714 | CODEC_TYPE_VIDEO, | 714 | AVMEDIA_TYPE_VIDEO, |
| 715 | CODEC_ID_CAVS, | 715 | CODEC_ID_CAVS, |
| 716 | sizeof(AVSContext), | 716 | sizeof(AVSContext), |
| 717 | ff_cavs_init, | 717 | ff_cavs_init, |
| @@ -369,7 +369,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) · 368 unmodified lines | |||
| 369 | 369 | ||
| 370 | AVCodec cdgraphics_decoder = { | 370 | AVCodec cdgraphics_decoder = { |
| 371 | "cdgraphics", | 371 | "cdgraphics", |
| 372 | CODEC_TYPE_VIDEO, | 372 | AVMEDIA_TYPE_VIDEO, |
| 373 | CODEC_ID_CDGRAPHICS, | 373 | CODEC_ID_CDGRAPHICS, |
| 374 | sizeof(CDGraphicsContext), | 374 | sizeof(CDGraphicsContext), |
| 375 | cdg_decode_init, | 375 | cdg_decode_init, |
| @@ -457,7 +457,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) · 456 unmodified lines | |||
| 457 | 457 | ||
| 458 | AVCodec cinepak_decoder = { | 458 | AVCodec cinepak_decoder = { |
| 459 | "cinepak", | 459 | "cinepak", |
| 460 | CODEC_TYPE_VIDEO, | 460 | AVMEDIA_TYPE_VIDEO, |
| 461 | CODEC_ID_CINEPAK, | 461 | CODEC_ID_CINEPAK, |
| 462 | sizeof(CinepakContext), | 462 | sizeof(CinepakContext), |
| 463 | cinepak_decode_init, | 463 | cinepak_decode_init, |
| @@ -137,7 +137,7 @@ static av_cold int encode_init(AVCodecContext *avctx){ · 136 unmodified lines | |||
| 137 | 137 | ||
| 138 | AVCodec cljr_decoder = { | 138 | AVCodec cljr_decoder = { |
| 139 | "cljr", | 139 | "cljr", |
| 140 | CODEC_TYPE_VIDEO, | 140 | AVMEDIA_TYPE_VIDEO, |
| 141 | CODEC_ID_CLJR, | 141 | CODEC_ID_CLJR, |
| 142 | sizeof(CLJRContext), | 142 | sizeof(CLJRContext), |
| 143 | decode_init, | 143 | decode_init, |
| @@ -151,7 +151,7 @@ AVCodec cljr_decoder = { · 7 unmodified lines | |||
| 151 | #if CONFIG_CLJR_ENCODER | 151 | #if CONFIG_CLJR_ENCODER |
| 152 | AVCodec cljr_encoder = { | 152 | AVCodec cljr_encoder = { |
| 153 | "cljr", | 153 | "cljr", |
| 154 | CODEC_TYPE_VIDEO, | 154 | AVMEDIA_TYPE_VIDEO, |
| 155 | CODEC_ID_CLJR, | 155 | CODEC_ID_CLJR, |
| 156 | sizeof(CLJRContext), | 156 | sizeof(CLJRContext), |
| 157 | encode_init, | 157 | encode_init, |
| @@ -1288,7 +1288,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1287 unmodified lines | |||
| 1288 | AVCodec cook_decoder = | 1288 | AVCodec cook_decoder = |
| 1289 | { | 1289 | { |
| 1290 | .name = "cook", | 1290 | .name = "cook", |
| 1291 | .type = CODEC_TYPE_AUDIO, | 1291 | .type = AVMEDIA_TYPE_AUDIO, |
| 1292 | .id = CODEC_ID_COOK, | 1292 | .id = CODEC_ID_COOK, |
| 1293 | .priv_data_size = sizeof(COOKContext), | 1293 | .priv_data_size = sizeof(COOKContext), |
| 1294 | .init = cook_decode_init, | 1294 | .init = cook_decode_init, |
| @@ -249,7 +249,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { · 248 unmodified lines | |||
| 249 | 249 | ||
| 250 | AVCodec cscd_decoder = { | 250 | AVCodec cscd_decoder = { |
| 251 | "camstudio", | 251 | "camstudio", |
| 252 | CODEC_TYPE_VIDEO, | 252 | AVMEDIA_TYPE_VIDEO, |
| 253 | CODEC_ID_CSCD, | 253 | CODEC_ID_CSCD, |
| 254 | sizeof(CamStudioContext), | 254 | sizeof(CamStudioContext), |
| 255 | decode_init, | 255 | decode_init, |
| @@ -180,7 +180,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx) · 179 unmodified lines | |||
| 180 | #if CONFIG_AURA_DECODER | 180 | #if CONFIG_AURA_DECODER |
| 181 | AVCodec aura_decoder = { | 181 | AVCodec aura_decoder = { |
| 182 | "aura", | 182 | "aura", |
| 183 | CODEC_TYPE_VIDEO, | 183 | AVMEDIA_TYPE_VIDEO, |
| 184 | CODEC_ID_AURA, | 184 | CODEC_ID_AURA, |
| 185 | sizeof(CyuvDecodeContext), | 185 | sizeof(CyuvDecodeContext), |
| 186 | cyuv_decode_init, | 186 | cyuv_decode_init, |
| @@ -196,7 +196,7 @@ AVCodec aura_decoder = { · 9 unmodified lines | |||
| 196 | #if CONFIG_CYUV_DECODER | 196 | #if CONFIG_CYUV_DECODER |
| 197 | AVCodec cyuv_decoder = { | 197 | AVCodec cyuv_decoder = { |
| 198 | "cyuv", | 198 | "cyuv", |
| 199 | CODEC_TYPE_VIDEO, | 199 | AVMEDIA_TYPE_VIDEO, |
| 200 | CODEC_ID_CYUV, | 200 | CODEC_ID_CYUV, |
| 201 | sizeof(CyuvDecodeContext), | 201 | sizeof(CyuvDecodeContext), |
| 202 | cyuv_decode_init, | 202 | cyuv_decode_init, |
| @@ -1330,7 +1330,7 @@ static av_cold int dca_decode_end(AVCodecContext * avctx) · 1329 unmodified lines | |||
| 1330 | 1330 | ||
| 1331 | AVCodec dca_decoder = { | 1331 | AVCodec dca_decoder = { |
| 1332 | .name = "dca", | 1332 | .name = "dca", |
| 1333 | .type = CODEC_TYPE_AUDIO, | 1333 | .type = AVMEDIA_TYPE_AUDIO, |
| 1334 | .id = CODEC_ID_DTS, | 1334 | .id = CODEC_ID_DTS, |
| 1335 | .priv_data_size = sizeof(DCAContext), | 1335 | .priv_data_size = sizeof(DCAContext), |
| 1336 | .init = dca_decode_init, | 1336 | .init = dca_decode_init, |
| @@ -346,7 +346,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) · 345 unmodified lines | |||
| 346 | 346 | ||
| 347 | AVCodec dnxhd_decoder = { | 347 | AVCodec dnxhd_decoder = { |
| 348 | "dnxhd", | 348 | "dnxhd", |
| 349 | CODEC_TYPE_VIDEO, | 349 | AVMEDIA_TYPE_VIDEO, |
| 350 | CODEC_ID_DNXHD, | 350 | CODEC_ID_DNXHD, |
| 351 | sizeof(DNXHDContext), | 351 | sizeof(DNXHDContext), |
| 352 | dnxhd_decode_init, | 352 | dnxhd_decode_init, |
| @@ -850,7 +850,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx) · 849 unmodified lines | |||
| 850 | 850 | ||
| 851 | AVCodec dnxhd_encoder = { | 851 | AVCodec dnxhd_encoder = { |
| 852 | "dnxhd", | 852 | "dnxhd", |
| 853 | CODEC_TYPE_VIDEO, | 853 | AVMEDIA_TYPE_VIDEO, |
| 854 | CODEC_ID_DNXHD, | 854 | CODEC_ID_DNXHD, |
| 855 | sizeof(DNXHDEncContext), | 855 | sizeof(DNXHDEncContext), |
| 856 | dnxhd_encode_init, | 856 | dnxhd_encode_init, |
| @@ -301,7 +301,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, · 300 unmodified lines | |||
| 301 | #define DPCM_DECODER(id, name, long_name_) \ | 301 | #define DPCM_DECODER(id, name, long_name_) \ |
| 302 | AVCodec name ## _decoder = { \ | 302 | AVCodec name ## _decoder = { \ |
| 303 | #name, \ | 303 | #name, \ |
| 304 | CODEC_TYPE_AUDIO, \ | 304 | AVMEDIA_TYPE_AUDIO, \ |
| 305 | id, \ | 305 | id, \ |
| 306 | sizeof(DPCMContext), \ | 306 | sizeof(DPCMContext), \ |
| 307 | dpcm_decode_init, \ | 307 | dpcm_decode_init, \ |
| @@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 215 unmodified lines | |||
| 216 | 216 | ||
| 217 | AVCodec dpx_decoder = { | 217 | AVCodec dpx_decoder = { |
| 218 | "dpx", | 218 | "dpx", |
| 219 | CODEC_TYPE_VIDEO, | 219 | AVMEDIA_TYPE_VIDEO, |
| 220 | CODEC_ID_DPX, | 220 | CODEC_ID_DPX, |
| 221 | sizeof(DPXContext), | 221 | sizeof(DPXContext), |
| 222 | decode_init, | 222 | decode_init, |
| @@ -345,7 +345,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, · 344 unmodified lines | |||
| 345 | 345 | ||
| 346 | AVCodec dsicinvideo_decoder = { | 346 | AVCodec dsicinvideo_decoder = { |
| 347 | "dsicinvideo", | 347 | "dsicinvideo", |
| 348 | CODEC_TYPE_VIDEO, | 348 | AVMEDIA_TYPE_VIDEO, |
| 349 | CODEC_ID_DSICINVIDEO, | 349 | CODEC_ID_DSICINVIDEO, |
| 350 | sizeof(CinVideoContext), | 350 | sizeof(CinVideoContext), |
| 351 | cinvideo_decode_init, | 351 | cinvideo_decode_init, |
| @@ -358,7 +358,7 @@ AVCodec dsicinvideo_decoder = { · 6 unmodified lines | |||
| 358 | 358 | ||
| 359 | AVCodec dsicinaudio_decoder = { | 359 | AVCodec dsicinaudio_decoder = { |
| 360 | "dsicinaudio", | 360 | "dsicinaudio", |
| 361 | CODEC_TYPE_AUDIO, | 361 | AVMEDIA_TYPE_AUDIO, |
| 362 | CODEC_ID_DSICINAUDIO, | 362 | CODEC_ID_DSICINAUDIO, |
| 363 | sizeof(CinAudioContext), | 363 | sizeof(CinAudioContext), |
| 364 | cinaudio_decode_init, | 364 | cinaudio_decode_init, |
| @@ -1282,7 +1282,7 @@ static int dvvideo_close(AVCodecContext *c) · 1281 unmodified lines | |||
| 1282 | #if CONFIG_DVVIDEO_ENCODER | 1282 | #if CONFIG_DVVIDEO_ENCODER |
| 1283 | AVCodec dvvideo_encoder = { | 1283 | AVCodec dvvideo_encoder = { |
| 1284 | "dvvideo", | 1284 | "dvvideo", |
| 1285 | CODEC_TYPE_VIDEO, | 1285 | AVMEDIA_TYPE_VIDEO, |
| 1286 | CODEC_ID_DVVIDEO, | 1286 | CODEC_ID_DVVIDEO, |
| 1287 | sizeof(DVVideoContext), | 1287 | sizeof(DVVideoContext), |
| 1288 | dvvideo_init_encoder, | 1288 | dvvideo_init_encoder, |
| @@ -1295,7 +1295,7 @@ AVCodec dvvideo_encoder = { · 6 unmodified lines | |||
| 1295 | #if CONFIG_DVVIDEO_DECODER | 1295 | #if CONFIG_DVVIDEO_DECODER |
| 1296 | AVCodec dvvideo_decoder = { | 1296 | AVCodec dvvideo_decoder = { |
| 1297 | "dvvideo", | 1297 | "dvvideo", |
| 1298 | CODEC_TYPE_VIDEO, | 1298 | AVMEDIA_TYPE_VIDEO, |
| 1299 | CODEC_ID_DVVIDEO, | 1299 | CODEC_ID_DVVIDEO, |
| 1300 | sizeof(DVVideoContext), | 1300 | sizeof(DVVideoContext), |
| 1301 | dvvideo_init, | 1301 | dvvideo_init, |
| @@ -404,7 +404,7 @@ static int dvbsub_encode(AVCodecContext *avctx, · 403 unmodified lines | |||
| 404 | 404 | ||
| 405 | AVCodec dvbsub_encoder = { | 405 | AVCodec dvbsub_encoder = { |
| 406 | "dvbsub", | 406 | "dvbsub", |
| 407 | CODEC_TYPE_SUBTITLE, | 407 | AVMEDIA_TYPE_SUBTITLE, |
| 408 | CODEC_ID_DVB_SUBTITLE, | 408 | CODEC_ID_DVB_SUBTITLE, |
| 409 | sizeof(DVBSubtitleContext), | 409 | sizeof(DVBSubtitleContext), |
| 410 | NULL, | 410 | NULL, |
| @@ -1413,7 +1413,7 @@ static int dvbsub_decode(AVCodecContext *avctx, · 1412 unmodified lines | |||
| 1413 | 1413 | ||
| 1414 | AVCodec dvbsub_decoder = { | 1414 | AVCodec dvbsub_decoder = { |
| 1415 | "dvbsub", | 1415 | "dvbsub", |
| 1416 | CODEC_TYPE_SUBTITLE, | 1416 | AVMEDIA_TYPE_SUBTITLE, |
| 1417 | CODEC_ID_DVB_SUBTITLE, | 1417 | CODEC_ID_DVB_SUBTITLE, |
| 1418 | sizeof(DVBSubContext), | 1418 | sizeof(DVBSubContext), |
| 1419 | dvbsub_init_decoder, | 1419 | dvbsub_init_decoder, |
| @@ -488,7 +488,7 @@ static int dvdsub_decode(AVCodecContext *avctx, · 487 unmodified lines | |||
| 488 | 488 | ||
| 489 | AVCodec dvdsub_decoder = { | 489 | AVCodec dvdsub_decoder = { |
| 490 | "dvdsub", | 490 | "dvdsub", |
| 491 | CODEC_TYPE_SUBTITLE, | 491 | AVMEDIA_TYPE_SUBTITLE, |
| 492 | CODEC_ID_DVD_SUBTITLE, | 492 | CODEC_ID_DVD_SUBTITLE, |
| 493 | 0, | 493 | 0, |
| 494 | NULL, | 494 | NULL, |
| @@ -217,7 +217,7 @@ static int dvdsub_encode(AVCodecContext *avctx, · 216 unmodified lines | |||
| 217 | 217 | ||
| 218 | AVCodec dvdsub_encoder = { | 218 | AVCodec dvdsub_encoder = { |
| 219 | "dvdsub", | 219 | "dvdsub", |
| 220 | CODEC_TYPE_SUBTITLE, | 220 | AVMEDIA_TYPE_SUBTITLE, |
| 221 | CODEC_ID_DVD_SUBTITLE, | 221 | CODEC_ID_DVD_SUBTITLE, |
| 222 | 0, | 222 | 0, |
| 223 | NULL, | 223 | NULL, |
| @@ -319,7 +319,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 318 unmodified lines | |||
| 319 | 319 | ||
| 320 | AVCodec dxa_decoder = { | 320 | AVCodec dxa_decoder = { |
| 321 | "dxa", | 321 | "dxa", |
| 322 | CODEC_TYPE_VIDEO, | 322 | AVMEDIA_TYPE_VIDEO, |
| 323 | CODEC_ID_DXA, | 323 | CODEC_ID_DXA, |
| 324 | sizeof(DxaDecContext), | 324 | sizeof(DxaDecContext), |
| 325 | decode_init, | 325 | decode_init, |
| @@ -425,7 +425,7 @@ static int end_frame(AVCodecContext *avctx) · 424 unmodified lines | |||
| 425 | 425 | ||
| 426 | AVHWAccel h264_dxva2_hwaccel = { | 426 | AVHWAccel h264_dxva2_hwaccel = { |
| 427 | .name = "h264_dxva2", | 427 | .name = "h264_dxva2", |
| 428 | .type = CODEC_TYPE_VIDEO, | 428 | .type = AVMEDIA_TYPE_VIDEO, |
| 429 | .id = CODEC_ID_H264, | 429 | .id = CODEC_ID_H264, |
| 430 | .pix_fmt = PIX_FMT_DXVA2_VLD, | 430 | .pix_fmt = PIX_FMT_DXVA2_VLD, |
| 431 | .capabilities = 0, | 431 | .capabilities = 0, |
| @@ -266,7 +266,7 @@ static int end_frame(AVCodecContext *avctx) · 265 unmodified lines | |||
| 266 | #if CONFIG_WMV3_DXVA2_HWACCEL | 266 | #if CONFIG_WMV3_DXVA2_HWACCEL |
| 267 | AVHWAccel wmv3_dxva2_hwaccel = { | 267 | AVHWAccel wmv3_dxva2_hwaccel = { |
| 268 | .name = "wmv3_dxva2", | 268 | .name = "wmv3_dxva2", |
| 269 | .type = CODEC_TYPE_VIDEO, | 269 | .type = AVMEDIA_TYPE_VIDEO, |
| 270 | .id = CODEC_ID_WMV3, | 270 | .id = CODEC_ID_WMV3, |
| 271 | .pix_fmt = PIX_FMT_DXVA2_VLD, | 271 | .pix_fmt = PIX_FMT_DXVA2_VLD, |
| 272 | .capabilities = 0, | 272 | .capabilities = 0, |
| @@ -279,7 +279,7 @@ AVHWAccel wmv3_dxva2_hwaccel = { · 6 unmodified lines | |||
| 279 | 279 | ||
| 280 | AVHWAccel vc1_dxva2_hwaccel = { | 280 | AVHWAccel vc1_dxva2_hwaccel = { |
| 281 | .name = "vc1_dxva2", | 281 | .name = "vc1_dxva2", |
| 282 | .type = CODEC_TYPE_VIDEO, | 282 | .type = AVMEDIA_TYPE_VIDEO, |
| 283 | .id = CODEC_ID_VC1, | 283 | .id = CODEC_ID_VC1, |
| 284 | .pix_fmt = PIX_FMT_DXVA2_VLD, | 284 | .pix_fmt = PIX_FMT_DXVA2_VLD, |
| 285 | .capabilities = 0, | 285 | .capabilities = 0, |
| @@ -205,7 +205,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ · 204 unmodified lines | |||
| 205 | 205 | ||
| 206 | AVCodec eacmv_decoder = { | 206 | AVCodec eacmv_decoder = { |
| 207 | "eacmv", | 207 | "eacmv", |
| 208 | CODEC_TYPE_VIDEO, | 208 | AVMEDIA_TYPE_VIDEO, |
| 209 | CODEC_ID_CMV, | 209 | CODEC_ID_CMV, |
| 210 | sizeof(CmvContext), | 210 | sizeof(CmvContext), |
| 211 | cmv_decode_init, | 211 | cmv_decode_init, |
| @@ -307,7 +307,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 306 unmodified lines | |||
| 307 | 307 | ||
| 308 | AVCodec eamad_decoder = { | 308 | AVCodec eamad_decoder = { |
| 309 | "eamad", | 309 | "eamad", |
| 310 | CODEC_TYPE_VIDEO, | 310 | AVMEDIA_TYPE_VIDEO, |
| 311 | CODEC_ID_MAD, | 311 | CODEC_ID_MAD, |
| 312 | sizeof(MadContext), | 312 | sizeof(MadContext), |
| 313 | decode_init, | 313 | decode_init, |
| @@ -245,7 +245,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){ · 244 unmodified lines | |||
| 245 | 245 | ||
| 246 | AVCodec eatgq_decoder = { | 246 | AVCodec eatgq_decoder = { |
| 247 | "eatgq", | 247 | "eatgq", |
| 248 | CODEC_TYPE_VIDEO, | 248 | AVMEDIA_TYPE_VIDEO, |
| 249 | CODEC_ID_TGQ, | 249 | CODEC_ID_TGQ, |
| 250 | sizeof(TgqContext), | 250 | sizeof(TgqContext), |
| 251 | tgq_decode_init, | 251 | tgq_decode_init, |
| @@ -335,7 +335,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) · 334 unmodified lines | |||
| 335 | 335 | ||
| 336 | AVCodec eatgv_decoder = { | 336 | AVCodec eatgv_decoder = { |
| 337 | "eatgv", | 337 | "eatgv", |
| 338 | CODEC_TYPE_VIDEO, | 338 | AVMEDIA_TYPE_VIDEO, |
| 339 | CODEC_ID_TGV, | 339 | CODEC_ID_TGV, |
| 340 | sizeof(TgvContext), | 340 | sizeof(TgvContext), |
| 341 | tgv_decode_init, | 341 | tgv_decode_init, |
| @@ -156,7 +156,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) · 155 unmodified lines | |||
| 156 | 156 | ||
| 157 | AVCodec eatqi_decoder = { | 157 | AVCodec eatqi_decoder = { |
| 158 | "eatqi", | 158 | "eatqi", |
| 159 | CODEC_TYPE_VIDEO, | 159 | AVMEDIA_TYPE_VIDEO, |
| 160 | CODEC_ID_TQI, | 160 | CODEC_ID_TQI, |
| 161 | sizeof(TqiContext), | 161 | sizeof(TqiContext), |
| 162 | tqi_decode_init, | 162 | tqi_decode_init, |
| @@ -374,7 +374,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, · 373 unmodified lines | |||
| 374 | 374 | ||
| 375 | AVCodec escape124_decoder = { | 375 | AVCodec escape124_decoder = { |
| 376 | "escape124", | 376 | "escape124", |
| 377 | CODEC_TYPE_VIDEO, | 377 | AVMEDIA_TYPE_VIDEO, |
| 378 | CODEC_ID_ESCAPE124, | 378 | CODEC_ID_ESCAPE124, |
| 379 | sizeof(Escape124Context), | 379 | sizeof(Escape124Context), |
| 380 | escape124_decode_init, | 380 | escape124_decode_init, |
| @@ -1125,7 +1125,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 1124 unmodified lines | |||
| 1125 | 1125 | ||
| 1126 | AVCodec ffv1_decoder = { | 1126 | AVCodec ffv1_decoder = { |
| 1127 | "ffv1", | 1127 | "ffv1", |
| 1128 | CODEC_TYPE_VIDEO, | 1128 | AVMEDIA_TYPE_VIDEO, |
| 1129 | CODEC_ID_FFV1, | 1129 | CODEC_ID_FFV1, |
| 1130 | sizeof(FFV1Context), | 1130 | sizeof(FFV1Context), |
| 1131 | decode_init, | 1131 | decode_init, |
| @@ -1140,7 +1140,7 @@ AVCodec ffv1_decoder = { · 8 unmodified lines | |||
| 1140 | #if CONFIG_FFV1_ENCODER | 1140 | #if CONFIG_FFV1_ENCODER |
| 1141 | AVCodec ffv1_encoder = { | 1141 | AVCodec ffv1_encoder = { |
| 1142 | "ffv1", | 1142 | "ffv1", |
| 1143 | CODEC_TYPE_VIDEO, | 1143 | AVMEDIA_TYPE_VIDEO, |
| 1144 | CODEC_ID_FFV1, | 1144 | CODEC_ID_FFV1, |
| 1145 | sizeof(FFV1Context), | 1145 | sizeof(FFV1Context), |
| 1146 | encode_init, | 1146 | encode_init, |
| @@ -799,7 +799,7 @@ static void flac_flush(AVCodecContext *avctx) · 798 unmodified lines | |||
| 799 | 799 | ||
| 800 | AVCodec flac_decoder = { | 800 | AVCodec flac_decoder = { |
| 801 | "flac", | 801 | "flac", |
| 802 | CODEC_TYPE_AUDIO, | 802 | AVMEDIA_TYPE_AUDIO, |
| 803 | CODEC_ID_FLAC, | 803 | CODEC_ID_FLAC, |
| 804 | sizeof(FLACContext), | 804 | sizeof(FLACContext), |
| 805 | flac_decode_init, | 805 | flac_decode_init, |
| @@ -1253,7 +1253,7 @@ static av_cold int flac_encode_close(AVCodecContext *avctx) · 1252 unmodified lines | |||
| 1253 | 1253 | ||
| 1254 | AVCodec flac_encoder = { | 1254 | AVCodec flac_encoder = { |
| 1255 | "flac", | 1255 | "flac", |
| 1256 | CODEC_TYPE_AUDIO, | 1256 | AVMEDIA_TYPE_AUDIO, |
| 1257 | CODEC_ID_FLAC, | 1257 | CODEC_ID_FLAC, |
| 1258 | sizeof(FlacEncodeContext), | 1258 | sizeof(FlacEncodeContext), |
| 1259 | flac_encode_init, | 1259 | flac_encode_init, |
| @@ -252,7 +252,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) · 251 unmodified lines | |||
| 252 | 252 | ||
| 253 | AVCodec flashsv_decoder = { | 253 | AVCodec flashsv_decoder = { |
| 254 | "flashsv", | 254 | "flashsv", |
| 255 | CODEC_TYPE_VIDEO, | 255 | AVMEDIA_TYPE_VIDEO, |
| 256 | CODEC_ID_FLASHSV, | 256 | CODEC_ID_FLASHSV, |
| 257 | sizeof(FlashSVContext), | 257 | sizeof(FlashSVContext), |
| 258 | flashsv_decode_init, | 258 | flashsv_decode_init, |
| @@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) · 281 unmodified lines | |||
| 282 | 282 | ||
| 283 | AVCodec flashsv_encoder = { | 283 | AVCodec flashsv_encoder = { |
| 284 | "flashsv", | 284 | "flashsv", |
| 285 | CODEC_TYPE_VIDEO, | 285 | AVMEDIA_TYPE_VIDEO, |
| 286 | CODEC_ID_FLASHSV, | 286 | CODEC_ID_FLASHSV, |
| 287 | sizeof(FlashSVContext), | 287 | sizeof(FlashSVContext), |
| 288 | flashsv_encode_init, | 288 | flashsv_encode_init, |
| @@ -739,7 +739,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) · 738 unmodified lines | |||
| 739 | 739 | ||
| 740 | AVCodec flic_decoder = { | 740 | AVCodec flic_decoder = { |
| 741 | "flic", | 741 | "flic", |
| 742 | CODEC_TYPE_VIDEO, | 742 | AVMEDIA_TYPE_VIDEO, |
| 743 | CODEC_ID_FLIC, | 743 | CODEC_ID_FLIC, |
| 744 | sizeof(FlicDecodeContext), | 744 | sizeof(FlicDecodeContext), |
| 745 | flic_decode_init, | 745 | flic_decode_init, |
| @@ -119,7 +119,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 118 unmodified lines | |||
| 119 | 119 | ||
| 120 | AVCodec flv_decoder = { | 120 | AVCodec flv_decoder = { |
| 121 | "flv", | 121 | "flv", |
| 122 | CODEC_TYPE_VIDEO, | 122 | AVMEDIA_TYPE_VIDEO, |
| 123 | CODEC_ID_FLV1, | 123 | CODEC_ID_FLV1, |
| 124 | sizeof(MpegEncContext), | 124 | sizeof(MpegEncContext), |
| 125 | ff_h263_decode_init, | 125 | ff_h263_decode_init, |
| @@ -86,7 +86,7 @@ void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run, in · 85 unmodified lines | |||
| 86 | 86 | ||
| 87 | AVCodec flv_encoder = { | 87 | AVCodec flv_encoder = { |
| 88 | "flv", | 88 | "flv", |
| 89 | CODEC_TYPE_VIDEO, | 89 | AVMEDIA_TYPE_VIDEO, |
| 90 | CODEC_ID_FLV1, | 90 | CODEC_ID_FLV1, |
| 91 | sizeof(MpegEncContext), | 91 | sizeof(MpegEncContext), |
| 92 | MPV_encode_init, | 92 | MPV_encode_init, |
| @@ -366,7 +366,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 365 unmodified lines | |||
| 366 | 366 | ||
| 367 | AVCodec fraps_decoder = { | 367 | AVCodec fraps_decoder = { |
| 368 | "fraps", | 368 | "fraps", |
| 369 | CODEC_TYPE_VIDEO, | 369 | AVMEDIA_TYPE_VIDEO, |
| 370 | CODEC_ID_FRAPS, | 370 | CODEC_ID_FRAPS, |
| 371 | sizeof(FrapsContext), | 371 | sizeof(FrapsContext), |
| 372 | decode_init, | 372 | decode_init, |
| @@ -111,7 +111,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 110 unmodified lines | |||
| 111 | 111 | ||
| 112 | AVCodec frwu_decoder = { | 112 | AVCodec frwu_decoder = { |
| 113 | "FRWU", | 113 | "FRWU", |
| 114 | CODEC_TYPE_VIDEO, | 114 | AVMEDIA_TYPE_VIDEO, |
| 115 | CODEC_ID_FRWU, | 115 | CODEC_ID_FRWU, |
| 116 | 0, | 116 | 0, |
| 117 | decode_init, | 117 | decode_init, |
| @@ -387,7 +387,7 @@ static int g726_decode_frame(AVCodecContext *avctx, · 386 unmodified lines | |||
| 387 | #if CONFIG_ADPCM_G726_ENCODER | 387 | #if CONFIG_ADPCM_G726_ENCODER |
| 388 | AVCodec adpcm_g726_encoder = { | 388 | AVCodec adpcm_g726_encoder = { |
| 389 | "g726", | 389 | "g726", |
| 390 | CODEC_TYPE_AUDIO, | 390 | AVMEDIA_TYPE_AUDIO, |
| 391 | CODEC_ID_ADPCM_G726, | 391 | CODEC_ID_ADPCM_G726, |
| 392 | sizeof(G726Context), | 392 | sizeof(G726Context), |
| 393 | g726_init, | 393 | g726_init, |
| @@ -401,7 +401,7 @@ AVCodec adpcm_g726_encoder = { · 7 unmodified lines | |||
| 401 | 401 | ||
| 402 | AVCodec adpcm_g726_decoder = { | 402 | AVCodec adpcm_g726_decoder = { |
| 403 | "g726", | 403 | "g726", |
| 404 | CODEC_TYPE_AUDIO, | 404 | AVMEDIA_TYPE_AUDIO, |
| 405 | CODEC_ID_ADPCM_G726, | 405 | CODEC_ID_ADPCM_G726, |
| 406 | sizeof(G726Context), | 406 | sizeof(G726Context), |
| 407 | g726_init, | 407 | g726_init, |
| @@ -315,7 +315,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 314 unmodified lines | |||
| 315 | AVCodec g729_decoder = | 315 | AVCodec g729_decoder = |
| 316 | { | 316 | { |
| 317 | "g729", | 317 | "g729", |
| 318 | CODEC_TYPE_AUDIO, | 318 | AVMEDIA_TYPE_AUDIO, |
| 319 | CODEC_ID_G729, | 319 | CODEC_ID_G729, |
| 320 | sizeof(G729Context), | 320 | sizeof(G729Context), |
| 321 | decoder_init, | 321 | decoder_init, |
| @@ -168,7 +168,7 @@ static int gif_encode_close(AVCodecContext *avctx) · 167 unmodified lines | |||
| 168 | 168 | ||
| 169 | AVCodec gif_encoder = { | 169 | AVCodec gif_encoder = { |
| 170 | "gif", | 170 | "gif", |
| 171 | CODEC_TYPE_VIDEO, | 171 | AVMEDIA_TYPE_VIDEO, |
| 172 | CODEC_ID_GIF, | 172 | CODEC_ID_GIF, |
| 173 | sizeof(GIFContext), | 173 | sizeof(GIFContext), |
| 174 | gif_encode_init, | 174 | gif_encode_init, |
| @@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx) · 327 unmodified lines | |||
| 328 | 328 | ||
| 329 | AVCodec gif_decoder = { | 329 | AVCodec gif_decoder = { |
| 330 | "gif", | 330 | "gif", |
| 331 | CODEC_TYPE_VIDEO, | 331 | AVMEDIA_TYPE_VIDEO, |
| 332 | CODEC_ID_GIF, | 332 | CODEC_ID_GIF, |
| 333 | sizeof(GifState), | 333 | sizeof(GifState), |
| 334 | gif_decode_init, | 334 | gif_decode_init, |
| @@ -643,7 +643,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) · 642 unmodified lines | |||
| 643 | 643 | ||
| 644 | AVCodec h261_decoder = { | 644 | AVCodec h261_decoder = { |
| 645 | "h261", | 645 | "h261", |
| 646 | CODEC_TYPE_VIDEO, | 646 | AVMEDIA_TYPE_VIDEO, |
| 647 | CODEC_ID_H261, | 647 | CODEC_ID_H261, |
| 648 | sizeof(H261Context), | 648 | sizeof(H261Context), |
| 649 | h261_decode_init, | 649 | h261_decode_init, |
| @@ -323,7 +323,7 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){ · 322 unmodified lines | |||
| 323 | 323 | ||
| 324 | AVCodec h261_encoder = { | 324 | AVCodec h261_encoder = { |
| 325 | "h261", | 325 | "h261", |
| 326 | CODEC_TYPE_VIDEO, | 326 | AVMEDIA_TYPE_VIDEO, |
| 327 | CODEC_ID_H261, | 327 | CODEC_ID_H261, |
| 328 | sizeof(H261Context), | 328 | sizeof(H261Context), |
| 329 | MPV_encode_init, | 329 | MPV_encode_init, |
| @@ -727,7 +727,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); · 726 unmodified lines | |||
| 727 | 727 | ||
| 728 | AVCodec h263_decoder = { | 728 | AVCodec h263_decoder = { |
| 729 | "h263", | 729 | "h263", |
| 730 | CODEC_TYPE_VIDEO, | 730 | AVMEDIA_TYPE_VIDEO, |
| 731 | CODEC_ID_H263, | 731 | CODEC_ID_H263, |
| 732 | sizeof(MpegEncContext), | 732 | sizeof(MpegEncContext), |
| 733 | ff_h263_decode_init, | 733 | ff_h263_decode_init, |
| @@ -3148,7 +3148,7 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) · 3147 unmodified lines | |||
| 3148 | 3148 | ||
| 3149 | AVCodec h264_decoder = { | 3149 | AVCodec h264_decoder = { |
| 3150 | "h264", | 3150 | "h264", |
| 3151 | CODEC_TYPE_VIDEO, | 3151 | AVMEDIA_TYPE_VIDEO, |
| 3152 | CODEC_ID_H264, | 3152 | CODEC_ID_H264, |
| 3153 | sizeof(H264Context), | 3153 | sizeof(H264Context), |
| 3154 | ff_h264_decode_init, | 3154 | ff_h264_decode_init, |
| @@ -3164,7 +3164,7 @@ AVCodec h264_decoder = { · 9 unmodified lines | |||
| 3164 | #if CONFIG_H264_VDPAU_DECODER | 3164 | #if CONFIG_H264_VDPAU_DECODER |
| 3165 | AVCodec h264_vdpau_decoder = { | 3165 | AVCodec h264_vdpau_decoder = { |
| 3166 | "h264_vdpau", | 3166 | "h264_vdpau", |
| 3167 | CODEC_TYPE_VIDEO, | 3167 | AVMEDIA_TYPE_VIDEO, |
| 3168 | CODEC_ID_H264, | 3168 | CODEC_ID_H264, |
| 3169 | sizeof(H264Context), | 3169 | sizeof(H264Context), |
| 3170 | ff_h264_decode_init, | 3170 | ff_h264_decode_init, |
| @@ -1414,7 +1414,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 1413 unmodified lines | |||
| 1414 | #if CONFIG_HUFFYUV_DECODER | 1414 | #if CONFIG_HUFFYUV_DECODER |
| 1415 | AVCodec huffyuv_decoder = { | 1415 | AVCodec huffyuv_decoder = { |
| 1416 | "huffyuv", | 1416 | "huffyuv", |
| 1417 | CODEC_TYPE_VIDEO, | 1417 | AVMEDIA_TYPE_VIDEO, |
| 1418 | CODEC_ID_HUFFYUV, | 1418 | CODEC_ID_HUFFYUV, |
| 1419 | sizeof(HYuvContext), | 1419 | sizeof(HYuvContext), |
| 1420 | decode_init, | 1420 | decode_init, |
| @@ -1430,7 +1430,7 @@ AVCodec huffyuv_decoder = { · 9 unmodified lines | |||
| 1430 | #if CONFIG_FFVHUFF_DECODER | 1430 | #if CONFIG_FFVHUFF_DECODER |
| 1431 | AVCodec ffvhuff_decoder = { | 1431 | AVCodec ffvhuff_decoder = { |
| 1432 | "ffvhuff", | 1432 | "ffvhuff", |
| 1433 | CODEC_TYPE_VIDEO, | 1433 | AVMEDIA_TYPE_VIDEO, |
| 1434 | CODEC_ID_FFVHUFF, | 1434 | CODEC_ID_FFVHUFF, |
| 1435 | sizeof(HYuvContext), | 1435 | sizeof(HYuvContext), |
| 1436 | decode_init, | 1436 | decode_init, |
| @@ -1446,7 +1446,7 @@ AVCodec ffvhuff_decoder = { · 9 unmodified lines | |||
| 1446 | #if CONFIG_HUFFYUV_ENCODER | 1446 | #if CONFIG_HUFFYUV_ENCODER |
| 1447 | AVCodec huffyuv_encoder = { | 1447 | AVCodec huffyuv_encoder = { |
| 1448 | "huffyuv", | 1448 | "huffyuv", |
| 1449 | CODEC_TYPE_VIDEO, | 1449 | AVMEDIA_TYPE_VIDEO, |
| 1450 | CODEC_ID_HUFFYUV, | 1450 | CODEC_ID_HUFFYUV, |
| 1451 | sizeof(HYuvContext), | 1451 | sizeof(HYuvContext), |
| 1452 | encode_init, | 1452 | encode_init, |
| @@ -1460,7 +1460,7 @@ AVCodec huffyuv_encoder = { · 7 unmodified lines | |||
| 1460 | #if CONFIG_FFVHUFF_ENCODER | 1460 | #if CONFIG_FFVHUFF_ENCODER |
| 1461 | AVCodec ffvhuff_encoder = { | 1461 | AVCodec ffvhuff_encoder = { |
| 1462 | "ffvhuff", | 1462 | "ffvhuff", |
| 1463 | CODEC_TYPE_VIDEO, | 1463 | AVMEDIA_TYPE_VIDEO, |
| 1464 | CODEC_ID_FFVHUFF, | 1464 | CODEC_ID_FFVHUFF, |
| 1465 | sizeof(HYuvContext), | 1465 | sizeof(HYuvContext), |
| 1466 | encode_init, | 1466 | encode_init, |
| @@ -255,7 +255,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx) · 254 unmodified lines | |||
| 255 | 255 | ||
| 256 | AVCodec idcin_decoder = { | 256 | AVCodec idcin_decoder = { |
| 257 | "idcinvideo", | 257 | "idcinvideo", |
| 258 | CODEC_TYPE_VIDEO, | 258 | AVMEDIA_TYPE_VIDEO, |
| 259 | CODEC_ID_IDCIN, | 259 | CODEC_ID_IDCIN, |
| 260 | sizeof(IdcinContext), | 260 | sizeof(IdcinContext), |
| 261 | idcin_decode_init, | 261 | idcin_decode_init, |
| @@ -218,7 +218,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 217 unmodified lines | |||
| 218 | 218 | ||
| 219 | AVCodec iff_ilbm_decoder = { | 219 | AVCodec iff_ilbm_decoder = { |
| 220 | "iff_ilbm", | 220 | "iff_ilbm", |
| 221 | CODEC_TYPE_VIDEO, | 221 | AVMEDIA_TYPE_VIDEO, |
| 222 | CODEC_ID_IFF_ILBM, | 222 | CODEC_ID_IFF_ILBM, |
| 223 | sizeof(IffContext), | 223 | sizeof(IffContext), |
| 224 | decode_init, | 224 | decode_init, |
| @@ -231,7 +231,7 @@ AVCodec iff_ilbm_decoder = { · 6 unmodified lines | |||
| 231 | 231 | ||
| 232 | AVCodec iff_byterun1_decoder = { | 232 | AVCodec iff_byterun1_decoder = { |
| 233 | "iff_byterun1", | 233 | "iff_byterun1", |
| 234 | CODEC_TYPE_VIDEO, | 234 | AVMEDIA_TYPE_VIDEO, |
| 235 | CODEC_ID_IFF_BYTERUN1, | 235 | CODEC_ID_IFF_BYTERUN1, |
| 236 | sizeof(IffContext), | 236 | sizeof(IffContext), |
| 237 | decode_init, | 237 | decode_init, |
| @@ -823,7 +823,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) · 822 unmodified lines | |||
| 823 | 823 | ||
| 824 | AVCodec imc_decoder = { | 824 | AVCodec imc_decoder = { |
| 825 | .name = "imc", | 825 | .name = "imc", |
| 826 | .type = CODEC_TYPE_AUDIO, | 826 | .type = AVMEDIA_TYPE_AUDIO, |
| 827 | .id = CODEC_ID_IMC, | 827 | .id = CODEC_ID_IMC, |
| 828 | .priv_data_size = sizeof(IMCContext), | 828 | .priv_data_size = sizeof(IMCContext), |
| 829 | .init = imc_decode_init, | 829 | .init = imc_decode_init, |
| @@ -226,7 +226,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){ · 225 unmodified lines | |||
| 226 | 226 | ||
| 227 | AVCodec indeo2_decoder = { | 227 | AVCodec indeo2_decoder = { |
| 228 | "indeo2", | 228 | "indeo2", |
| 229 | CODEC_TYPE_VIDEO, | 229 | AVMEDIA_TYPE_VIDEO, |
| 230 | CODEC_ID_INDEO2, | 230 | CODEC_ID_INDEO2, |
| 231 | sizeof(Ir2Context), | 231 | sizeof(Ir2Context), |
| 232 | ir2_decode_init, | 232 | ir2_decode_init, |
| @@ -1138,7 +1138,7 @@ static av_cold int indeo3_decode_end(AVCodecContext *avctx) · 1137 unmodified lines | |||
| 1138 | 1138 | ||
| 1139 | AVCodec indeo3_decoder = { | 1139 | AVCodec indeo3_decoder = { |
| 1140 | "indeo3", | 1140 | "indeo3", |
| 1141 | CODEC_TYPE_VIDEO, | 1141 | AVMEDIA_TYPE_VIDEO, |
| 1142 | CODEC_ID_INDEO3, | 1142 | CODEC_ID_INDEO3, |
| 1143 | sizeof(Indeo3DecodeContext), | 1143 | sizeof(Indeo3DecodeContext), |
| 1144 | indeo3_decode_init, | 1144 | indeo3_decode_init, |
| @@ -817,7 +817,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 816 unmodified lines | |||
| 817 | 817 | ||
| 818 | AVCodec indeo5_decoder = { | 818 | AVCodec indeo5_decoder = { |
| 819 | .name = "indeo5", | 819 | .name = "indeo5", |
| 820 | .type = CODEC_TYPE_VIDEO, | 820 | .type = AVMEDIA_TYPE_VIDEO, |
| 821 | .id = CODEC_ID_INDEO5, | 821 | .id = CODEC_ID_INDEO5, |
| 822 | .priv_data_size = sizeof(IVI5DecContext), | 822 | .priv_data_size = sizeof(IVI5DecContext), |
| 823 | .init = decode_init, | 823 | .init = decode_init, |
| @@ -117,7 +117,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 116 unmodified lines | |||
| 117 | 117 | ||
| 118 | AVCodec h263i_decoder = { | 118 | AVCodec h263i_decoder = { |
| 119 | "h263i", | 119 | "h263i", |
| 120 | CODEC_TYPE_VIDEO, | 120 | AVMEDIA_TYPE_VIDEO, |
| 121 | CODEC_ID_H263I, | 121 | CODEC_ID_H263I, |
| 122 | sizeof(MpegEncContext), | 122 | sizeof(MpegEncContext), |
| 123 | ff_h263_decode_init, | 123 | ff_h263_decode_init, |
| @@ -1095,7 +1095,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) · 1094 unmodified lines | |||
| 1095 | 1095 | ||
| 1096 | AVCodec interplay_video_decoder = { | 1096 | AVCodec interplay_video_decoder = { |
| 1097 | "interplayvideo", | 1097 | "interplayvideo", |
| 1098 | CODEC_TYPE_VIDEO, | 1098 | AVMEDIA_TYPE_VIDEO, |
| 1099 | CODEC_ID_INTERPLAY_VIDEO, | 1099 | CODEC_ID_INTERPLAY_VIDEO, |
| 1100 | sizeof(IpvideoContext), | 1100 | sizeof(IpvideoContext), |
| 1101 | ipvideo_decode_init, | 1101 | ipvideo_decode_init, |
| @@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor · 364 unmodified lines | |||
| 365 | 365 | ||
| 366 | AVCodec jpegls_decoder = { | 366 | AVCodec jpegls_decoder = { |
| 367 | "jpegls", | 367 | "jpegls", |
| 368 | CODEC_TYPE_VIDEO, | 368 | AVMEDIA_TYPE_VIDEO, |
| 369 | CODEC_ID_JPEGLS, | 369 | CODEC_ID_JPEGLS, |
| 370 | sizeof(MJpegDecodeContext), | 370 | sizeof(MJpegDecodeContext), |
| 371 | ff_mjpeg_decode_init, | 371 | ff_mjpeg_decode_init, |
| @@ -384,7 +384,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { · 383 unmodified lines | |||
| 384 | 384 | ||
| 385 | AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them | 385 | AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them |
| 386 | "jpegls", | 386 | "jpegls", |
| 387 | CODEC_TYPE_VIDEO, | 387 | AVMEDIA_TYPE_VIDEO, |
| 388 | CODEC_ID_JPEGLS, | 388 | CODEC_ID_JPEGLS, |
| 389 | sizeof(JpeglsContext), | 389 | sizeof(JpeglsContext), |
| 390 | encode_init_ls, | 390 | encode_init_ls, |
| @@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 164 unmodified lines | |||
| 165 | 165 | ||
| 166 | AVCodec kgv1_decoder = { | 166 | AVCodec kgv1_decoder = { |
| 167 | "kgv1", | 167 | "kgv1", |
| 168 | CODEC_TYPE_VIDEO, | 168 | AVMEDIA_TYPE_VIDEO, |
| 169 | CODEC_ID_KGV1, | 169 | CODEC_ID_KGV1, |
| 170 | sizeof(KgvContext), | 170 | sizeof(KgvContext), |
| 171 | decode_init, | 171 | decode_init, |
| @@ -403,7 +403,7 @@ static av_cold int decode_end(AVCodecContext * avctx) · 402 unmodified lines | |||
| 403 | 403 | ||
| 404 | AVCodec kmvc_decoder = { | 404 | AVCodec kmvc_decoder = { |
| 405 | "kmvc", | 405 | "kmvc", |
| 406 | CODEC_TYPE_VIDEO, | 406 | AVMEDIA_TYPE_VIDEO, |
| 407 | CODEC_ID_KMVC, | 407 | CODEC_ID_KMVC, |
| 408 | sizeof(KmvcContext), | 408 | sizeof(KmvcContext), |
| 409 | decode_init, | 409 | decode_init, |
| @@ -611,7 +611,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 610 unmodified lines | |||
| 611 | #if CONFIG_MSZH_DECODER | 611 | #if CONFIG_MSZH_DECODER |
| 612 | AVCodec mszh_decoder = { | 612 | AVCodec mszh_decoder = { |
| 613 | "mszh", | 613 | "mszh", |
| 614 | CODEC_TYPE_VIDEO, | 614 | AVMEDIA_TYPE_VIDEO, |
| 615 | CODEC_ID_MSZH, | 615 | CODEC_ID_MSZH, |
| 616 | sizeof(LclDecContext), | 616 | sizeof(LclDecContext), |
| 617 | decode_init, | 617 | decode_init, |
| @@ -626,7 +626,7 @@ AVCodec mszh_decoder = { · 8 unmodified lines | |||
| 626 | #if CONFIG_ZLIB_DECODER | 626 | #if CONFIG_ZLIB_DECODER |
| 627 | AVCodec zlib_decoder = { | 627 | AVCodec zlib_decoder = { |
| 628 | "zlib", | 628 | "zlib", |
| 629 | CODEC_TYPE_VIDEO, | 629 | AVMEDIA_TYPE_VIDEO, |
| 630 | CODEC_ID_ZLIB, | 630 | CODEC_ID_ZLIB, |
| 631 | sizeof(LclDecContext), | 631 | sizeof(LclDecContext), |
| 632 | decode_init, | 632 | decode_init, |
| @@ -180,7 +180,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 179 unmodified lines | |||
| 180 | 180 | ||
| 181 | AVCodec zlib_encoder = { | 181 | AVCodec zlib_encoder = { |
| 182 | "zlib", | 182 | "zlib", |
| 183 | CODEC_TYPE_VIDEO, | 183 | AVMEDIA_TYPE_VIDEO, |
| 184 | CODEC_ID_ZLIB, | 184 | CODEC_ID_ZLIB, |
| 185 | sizeof(LclEncContext), | 185 | sizeof(LclEncContext), |
| 186 | encode_init, | 186 | encode_init, |
| @@ -195,7 +195,7 @@ static void libdirac_flush(AVCodecContext *avccontext) · 194 unmodified lines | |||
| 195 | 195 | ||
| 196 | AVCodec libdirac_decoder = { | 196 | AVCodec libdirac_decoder = { |
| 197 | "libdirac", | 197 | "libdirac", |
| 198 | CODEC_TYPE_VIDEO, | 198 | AVMEDIA_TYPE_VIDEO, |
| 199 | CODEC_ID_DIRAC, | 199 | CODEC_ID_DIRAC, |
| 200 | sizeof(FfmpegDiracDecoderParams), | 200 | sizeof(FfmpegDiracDecoderParams), |
| 201 | libdirac_decode_init, | 201 | libdirac_decode_init, |
| @@ -393,7 +393,7 @@ static av_cold int libdirac_encode_close(AVCodecContext *avccontext) · 392 unmodified lines | |||
| 393 | 393 | ||
| 394 | AVCodec libdirac_encoder = { | 394 | AVCodec libdirac_encoder = { |
| 395 | "libdirac", | 395 | "libdirac", |
| 396 | CODEC_TYPE_VIDEO, | 396 | AVMEDIA_TYPE_VIDEO, |
| 397 | CODEC_ID_DIRAC, | 397 | CODEC_ID_DIRAC, |
| 398 | sizeof(FfmpegDiracEncoderParams), | 398 | sizeof(FfmpegDiracEncoderParams), |
| 399 | libdirac_encode_init, | 399 | libdirac_encode_init, |
| @@ -147,7 +147,7 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx) · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | AVCodec libfaac_encoder = { | 148 | AVCodec libfaac_encoder = { |
| 149 | "libfaac", | 149 | "libfaac", |
| 150 | CODEC_TYPE_AUDIO, | 150 | AVMEDIA_TYPE_AUDIO, |
| 151 | CODEC_ID_AAC, | 151 | CODEC_ID_AAC, |
| 152 | sizeof(FaacAudioContext), | 152 | sizeof(FaacAudioContext), |
| 153 | Faac_encode_init, | 153 | Faac_encode_init, |
| @@ -322,7 +322,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx) · 321 unmodified lines | |||
| 322 | 322 | ||
| 323 | AVCodec libfaad_decoder = { | 323 | AVCodec libfaad_decoder = { |
| 324 | "libfaad", | 324 | "libfaad", |
| 325 | CODEC_TYPE_AUDIO, | 325 | AVMEDIA_TYPE_AUDIO, |
| 326 | CODEC_ID_AAC, | 326 | CODEC_ID_AAC, |
| 327 | sizeof(FAACContext), | 327 | sizeof(FAACContext), |
| 328 | faac_decode_init, | 328 | faac_decode_init, |
| @@ -114,7 +114,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, · 113 unmodified lines | |||
| 114 | 114 | ||
| 115 | AVCodec libgsm_encoder = { | 115 | AVCodec libgsm_encoder = { |
| 116 | "libgsm", | 116 | "libgsm", |
| 117 | CODEC_TYPE_AUDIO, | 117 | AVMEDIA_TYPE_AUDIO, |
| 118 | CODEC_ID_GSM, | 118 | CODEC_ID_GSM, |
| 119 | 0, | 119 | 0, |
| 120 | libgsm_init, | 120 | libgsm_init, |
| @@ -126,7 +126,7 @@ AVCodec libgsm_encoder = { · 5 unmodified lines | |||
| 126 | 126 | ||
| 127 | AVCodec libgsm_ms_encoder = { | 127 | AVCodec libgsm_ms_encoder = { |
| 128 | "libgsm_ms", | 128 | "libgsm_ms", |
| 129 | CODEC_TYPE_AUDIO, | 129 | AVMEDIA_TYPE_AUDIO, |
| 130 | CODEC_ID_GSM_MS, | 130 | CODEC_ID_GSM_MS, |
| 131 | 0, | 131 | 0, |
| 132 | libgsm_init, | 132 | libgsm_init, |
| @@ -158,7 +158,7 @@ static int libgsm_decode_frame(AVCodecContext *avctx, · 25 unmodified lines | |||
| 158 | 158 | ||
| 159 | AVCodec libgsm_decoder = { | 159 | AVCodec libgsm_decoder = { |
| 160 | "libgsm", | 160 | "libgsm", |
| 161 | CODEC_TYPE_AUDIO, | 161 | AVMEDIA_TYPE_AUDIO, |
| 162 | CODEC_ID_GSM, | 162 | CODEC_ID_GSM, |
| 163 | 0, | 163 | 0, |
| 164 | libgsm_init, | 164 | libgsm_init, |
| @@ -170,7 +170,7 @@ AVCodec libgsm_decoder = { · 5 unmodified lines | |||
| 170 | 170 | ||
| 171 | AVCodec libgsm_ms_decoder = { | 171 | AVCodec libgsm_ms_decoder = { |
| 172 | "libgsm_ms", | 172 | "libgsm_ms", |
| 173 | CODEC_TYPE_AUDIO, | 173 | AVMEDIA_TYPE_AUDIO, |
| 174 | CODEC_ID_GSM_MS, | 174 | CODEC_ID_GSM_MS, |
| 175 | 0, | 175 | 0, |
| 176 | libgsm_init, | 176 | libgsm_init, |
| @@ -216,7 +216,7 @@ static av_cold int MP3lame_encode_close(AVCodecContext *avctx) · 215 unmodified lines | |||
| 216 | 216 | ||
| 217 | AVCodec libmp3lame_encoder = { | 217 | AVCodec libmp3lame_encoder = { |
| 218 | "libmp3lame", | 218 | "libmp3lame", |
| 219 | CODEC_TYPE_AUDIO, | 219 | AVMEDIA_TYPE_AUDIO, |
| 220 | CODEC_ID_MP3, | 220 | CODEC_ID_MP3, |
| 221 | sizeof(Mp3AudioContext), | 221 | sizeof(Mp3AudioContext), |
| 222 | MP3lame_encode_init, | 222 | MP3lame_encode_init, |
| @@ -141,7 +141,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, · 140 unmodified lines | |||
| 141 | 141 | ||
| 142 | AVCodec libopencore_amrnb_decoder = { | 142 | AVCodec libopencore_amrnb_decoder = { |
| 143 | "libopencore_amrnb", | 143 | "libopencore_amrnb", |
| 144 | CODEC_TYPE_AUDIO, | 144 | AVMEDIA_TYPE_AUDIO, |
| 145 | CODEC_ID_AMR_NB, | 145 | CODEC_ID_AMR_NB, |
| 146 | sizeof(AMRContext), | 146 | sizeof(AMRContext), |
| 147 | amr_nb_decode_init, | 147 | amr_nb_decode_init, |
| @@ -215,7 +215,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, · 67 unmodified lines | |||
| 215 | 215 | ||
| 216 | AVCodec libopencore_amrnb_encoder = { | 216 | AVCodec libopencore_amrnb_encoder = { |
| 217 | "libopencore_amrnb", | 217 | "libopencore_amrnb", |
| 218 | CODEC_TYPE_AUDIO, | 218 | AVMEDIA_TYPE_AUDIO, |
| 219 | CODEC_ID_AMR_NB, | 219 | CODEC_ID_AMR_NB, |
| 220 | sizeof(AMRContext), | 220 | sizeof(AMRContext), |
| 221 | amr_nb_encode_init, | 221 | amr_nb_encode_init, |
| @@ -312,7 +312,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) · 90 unmodified lines | |||
| 312 | 312 | ||
| 313 | AVCodec libopencore_amrwb_decoder = { | 313 | AVCodec libopencore_amrwb_decoder = { |
| 314 | "libopencore_amrwb", | 314 | "libopencore_amrwb", |
| 315 | CODEC_TYPE_AUDIO, | 315 | AVMEDIA_TYPE_AUDIO, |
| 316 | CODEC_ID_AMR_WB, | 316 | CODEC_ID_AMR_WB, |
| 317 | sizeof(AMRWBContext), | 317 | sizeof(AMRWBContext), |
| 318 | amr_wb_decode_init, | 318 | amr_wb_decode_init, |
| @@ -185,7 +185,7 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx) · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | AVCodec libopenjpeg_decoder = { | 186 | AVCodec libopenjpeg_decoder = { |
| 187 | "libopenjpeg", | 187 | "libopenjpeg", |
| 188 | CODEC_TYPE_VIDEO, | 188 | AVMEDIA_TYPE_VIDEO, |
| 189 | CODEC_ID_JPEG2000, | 189 | CODEC_ID_JPEG2000, |
| 190 | sizeof(LibOpenJPEGContext), | 190 | sizeof(LibOpenJPEGContext), |
| 191 | libopenjpeg_decode_init, | 191 | libopenjpeg_decode_init, |
| @@ -347,7 +347,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext) · 346 unmodified lines | |||
| 347 | 347 | ||
| 348 | AVCodec libschroedinger_decoder = { | 348 | AVCodec libschroedinger_decoder = { |
| 349 | "libschroedinger", | 349 | "libschroedinger", |
| 350 | CODEC_TYPE_VIDEO, | 350 | AVMEDIA_TYPE_VIDEO, |
| 351 | CODEC_ID_DIRAC, | 351 | CODEC_ID_DIRAC, |
| 352 | sizeof(FfmpegSchroDecoderParams), | 352 | sizeof(FfmpegSchroDecoderParams), |
| 353 | libschroedinger_decode_init, | 353 | libschroedinger_decode_init, |
| @@ -407,7 +407,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) · 406 unmodified lines | |||
| 407 | 407 | ||
| 408 | AVCodec libschroedinger_encoder = { | 408 | AVCodec libschroedinger_encoder = { |
| 409 | "libschroedinger", | 409 | "libschroedinger", |
| 410 | CODEC_TYPE_VIDEO, | 410 | AVMEDIA_TYPE_VIDEO, |
| 411 | CODEC_ID_DIRAC, | 411 | CODEC_ID_DIRAC, |
| 412 | sizeof(FfmpegSchroEncoderParams), | 412 | sizeof(FfmpegSchroEncoderParams), |
| 413 | libschroedinger_encode_init, | 413 | libschroedinger_encode_init, |
| @@ -140,7 +140,7 @@ static av_cold int libspeex_decode_close(AVCodecContext *avctx) · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | AVCodec libspeex_decoder = { | 141 | AVCodec libspeex_decoder = { |
| 142 | "libspeex", | 142 | "libspeex", |
| 143 | CODEC_TYPE_AUDIO, | 143 | AVMEDIA_TYPE_AUDIO, |
| 144 | CODEC_ID_SPEEX, | 144 | CODEC_ID_SPEEX, |
| 145 | sizeof(LibSpeexContext), | 145 | sizeof(LibSpeexContext), |
| 146 | libspeex_decode_init, | 146 | libspeex_decode_init, |
| @@ -361,7 +361,7 @@ static av_cold int encode_close(AVCodecContext* avc_context) · 360 unmodified lines | |||
| 361 | /*! AVCodec struct exposed to libavcodec */ | 361 | /*! AVCodec struct exposed to libavcodec */ |
| 362 | AVCodec libtheora_encoder = { | 362 | AVCodec libtheora_encoder = { |
| 363 | .name = "libtheora", | 363 | .name = "libtheora", |
| 364 | .type = CODEC_TYPE_VIDEO, | 364 | .type = AVMEDIA_TYPE_VIDEO, |
| 365 | .id = CODEC_ID_THEORA, | 365 | .id = CODEC_ID_THEORA, |
| 366 | .priv_data_size = sizeof(TheoraContext), | 366 | .priv_data_size = sizeof(TheoraContext), |
| 367 | .init = encode_init, | 367 | .init = encode_init, |
| @@ -217,7 +217,7 @@ static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) { · 216 unmodified lines | |||
| 217 | 217 | ||
| 218 | AVCodec libvorbis_encoder = { | 218 | AVCodec libvorbis_encoder = { |
| 219 | "libvorbis", | 219 | "libvorbis", |
| 220 | CODEC_TYPE_AUDIO, | 220 | AVMEDIA_TYPE_AUDIO, |
| 221 | CODEC_ID_VORBIS, | 221 | CODEC_ID_VORBIS, |
| 222 | sizeof(OggVorbisContext), | 222 | sizeof(OggVorbisContext), |
| 223 | oggvorbis_encode_init, | 223 | oggvorbis_encode_init, |
| @@ -317,7 +317,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 316 unmodified lines | |||
| 317 | 317 | ||
| 318 | AVCodec libx264_encoder = { | 318 | AVCodec libx264_encoder = { |
| 319 | .name = "libx264", | 319 | .name = "libx264", |
| 320 | .type = CODEC_TYPE_VIDEO, | 320 | .type = AVMEDIA_TYPE_VIDEO, |
| 321 | .id = CODEC_ID_H264, | 321 | .id = CODEC_ID_H264, |
| 322 | .priv_data_size = sizeof(X264Context), | 322 | .priv_data_size = sizeof(X264Context), |
| 323 | .init = X264_init, | 323 | .init = X264_init, |
| @@ -769,7 +769,7 @@ int xvid_ff_2pass(void *ref, int cmd, void *p1, void *p2) { · 768 unmodified lines | |||
| 769 | */ | 769 | */ |
| 770 | AVCodec libxvid_encoder = { | 770 | AVCodec libxvid_encoder = { |
| 771 | "libxvid", | 771 | "libxvid", |
| 772 | CODEC_TYPE_VIDEO, | 772 | AVMEDIA_TYPE_VIDEO, |
| 773 | CODEC_ID_MPEG4, | 773 | CODEC_ID_MPEG4, |
| 774 | sizeof(struct xvid_context), | 774 | sizeof(struct xvid_context), |
| 775 | xvid_encode_init, | 775 | xvid_encode_init, |
| @@ -188,7 +188,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in · 187 unmodified lines | |||
| 188 | 188 | ||
| 189 | AVCodec ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them | 189 | AVCodec ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them |
| 190 | "ljpeg", | 190 | "ljpeg", |
| 191 | CODEC_TYPE_VIDEO, | 191 | AVMEDIA_TYPE_VIDEO, |
| 192 | CODEC_ID_LJPEG, | 192 | CODEC_ID_LJPEG, |
| 193 | sizeof(MpegEncContext), | 193 | sizeof(MpegEncContext), |
| 194 | MPV_encode_init, | 194 | MPV_encode_init, |
| @@ -287,7 +287,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 286 unmodified lines | |||
| 287 | 287 | ||
| 288 | AVCodec loco_decoder = { | 288 | AVCodec loco_decoder = { |
| 289 | "loco", | 289 | "loco", |
| 290 | CODEC_TYPE_VIDEO, | 290 | AVMEDIA_TYPE_VIDEO, |
| 291 | CODEC_ID_LOCO, | 291 | CODEC_ID_LOCO, |
| 292 | sizeof(LOCOContext), | 292 | sizeof(LOCOContext), |
| 293 | decode_init, | 293 | decode_init, |
| @@ -281,7 +281,7 @@ static int mace_decode_frame(AVCodecContext *avctx, · 280 unmodified lines | |||
| 281 | 281 | ||
| 282 | AVCodec mace3_decoder = { | 282 | AVCodec mace3_decoder = { |
| 283 | "mace3", | 283 | "mace3", |
| 284 | CODEC_TYPE_AUDIO, | 284 | AVMEDIA_TYPE_AUDIO, |
| 285 | CODEC_ID_MACE3, | 285 | CODEC_ID_MACE3, |
| 286 | sizeof(MACEContext), | 286 | sizeof(MACEContext), |
| 287 | mace_decode_init, | 287 | mace_decode_init, |
| @@ -293,7 +293,7 @@ AVCodec mace3_decoder = { · 5 unmodified lines | |||
| 293 | 293 | ||
| 294 | AVCodec mace6_decoder = { | 294 | AVCodec mace6_decoder = { |
| 295 | "mace6", | 295 | "mace6", |
| 296 | CODEC_TYPE_AUDIO, | 296 | AVMEDIA_TYPE_AUDIO, |
| 297 | CODEC_ID_MACE6, | 297 | CODEC_ID_MACE6, |
| 298 | sizeof(MACEContext), | 298 | sizeof(MACEContext), |
| 299 | mace_decode_init, | 299 | mace_decode_init, |
| @@ -250,7 +250,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 249 unmodified lines | |||
| 250 | 250 | ||
| 251 | AVCodec mdec_decoder = { | 251 | AVCodec mdec_decoder = { |
| 252 | "mdec", | 252 | "mdec", |
| 253 | CODEC_TYPE_VIDEO, | 253 | AVMEDIA_TYPE_VIDEO, |
| 254 | CODEC_ID_MDEC, | 254 | CODEC_ID_MDEC, |
| 255 | sizeof(MDECContext), | 255 | sizeof(MDECContext), |
| 256 | decode_init, | 256 | decode_init, |
| @@ -380,7 +380,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) · 379 unmodified lines | |||
| 380 | 380 | ||
| 381 | AVCodec mimic_decoder = { | 381 | AVCodec mimic_decoder = { |
| 382 | "mimic", | 382 | "mimic", |
| 383 | CODEC_TYPE_VIDEO, | 383 | AVMEDIA_TYPE_VIDEO, |
| 384 | CODEC_ID_MIMIC, | 384 | CODEC_ID_MIMIC, |
| 385 | sizeof(MimicContext), | 385 | sizeof(MimicContext), |
| 386 | mimic_decode_init, | 386 | mimic_decode_init, |
| @@ -147,7 +147,7 @@ read_header: · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | AVCodec mjpegb_decoder = { | 148 | AVCodec mjpegb_decoder = { |
| 149 | "mjpegb", | 149 | "mjpegb", |
| 150 | CODEC_TYPE_VIDEO, | 150 | AVMEDIA_TYPE_VIDEO, |
| 151 | CODEC_ID_MJPEGB, | 151 | CODEC_ID_MJPEGB, |
| 152 | sizeof(MJpegDecodeContext), | 152 | sizeof(MJpegDecodeContext), |
| 153 | ff_mjpeg_decode_init, | 153 | ff_mjpeg_decode_init, |
| @@ -1533,7 +1533,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) · 1532 unmodified lines | |||
| 1533 | 1533 | ||
| 1534 | AVCodec mjpeg_decoder = { | 1534 | AVCodec mjpeg_decoder = { |
| 1535 | "mjpeg", | 1535 | "mjpeg", |
| 1536 | CODEC_TYPE_VIDEO, | 1536 | AVMEDIA_TYPE_VIDEO, |
| 1537 | CODEC_ID_MJPEG, | 1537 | CODEC_ID_MJPEG, |
| 1538 | sizeof(MJpegDecodeContext), | 1538 | sizeof(MJpegDecodeContext), |
| 1539 | ff_mjpeg_decode_init, | 1539 | ff_mjpeg_decode_init, |
| @@ -1547,7 +1547,7 @@ AVCodec mjpeg_decoder = { · 7 unmodified lines | |||
| 1547 | 1547 | ||
| 1548 | AVCodec thp_decoder = { | 1548 | AVCodec thp_decoder = { |
| 1549 | "thp", | 1549 | "thp", |
| 1550 | CODEC_TYPE_VIDEO, | 1550 | AVMEDIA_TYPE_VIDEO, |
| 1551 | CODEC_ID_THP, | 1551 | CODEC_ID_THP, |
| 1552 | sizeof(MJpegDecodeContext), | 1552 | sizeof(MJpegDecodeContext), |
| 1553 | ff_mjpeg_decode_init, | 1553 | ff_mjpeg_decode_init, |
| @@ -445,7 +445,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 444 unmodified lines | |||
| 445 | 445 | ||
| 446 | AVCodec mjpeg_encoder = { | 446 | AVCodec mjpeg_encoder = { |
| 447 | "mjpeg", | 447 | "mjpeg", |
| 448 | CODEC_TYPE_VIDEO, | 448 | AVMEDIA_TYPE_VIDEO, |
| 449 | CODEC_ID_MJPEG, | 449 | CODEC_ID_MJPEG, |
| 450 | sizeof(MpegEncContext), | 450 | sizeof(MpegEncContext), |
| 451 | MPV_encode_init, | 451 | MPV_encode_init, |
| @@ -1136,7 +1136,7 @@ error: · 1135 unmodified lines | |||
| 1136 | 1136 | ||
| 1137 | AVCodec mlp_decoder = { | 1137 | AVCodec mlp_decoder = { |
| 1138 | "mlp", | 1138 | "mlp", |
| 1139 | CODEC_TYPE_AUDIO, | 1139 | AVMEDIA_TYPE_AUDIO, |
| 1140 | CODEC_ID_MLP, | 1140 | CODEC_ID_MLP, |
| 1141 | sizeof(MLPDecodeContext), | 1141 | sizeof(MLPDecodeContext), |
| 1142 | mlp_decode_init, | 1142 | mlp_decode_init, |
| @@ -1149,7 +1149,7 @@ AVCodec mlp_decoder = { · 6 unmodified lines | |||
| 1149 | #if CONFIG_TRUEHD_DECODER | 1149 | #if CONFIG_TRUEHD_DECODER |
| 1150 | AVCodec truehd_decoder = { | 1150 | AVCodec truehd_decoder = { |
| 1151 | "truehd", | 1151 | "truehd", |
| 1152 | CODEC_TYPE_AUDIO, | 1152 | AVMEDIA_TYPE_AUDIO, |
| 1153 | CODEC_ID_TRUEHD, | 1153 | CODEC_ID_TRUEHD, |
| 1154 | sizeof(MLPDecodeContext), | 1154 | sizeof(MLPDecodeContext), |
| 1155 | mlp_decode_init, | 1155 | mlp_decode_init, |
| @@ -200,7 +200,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) · 199 unmodified lines | |||
| 200 | 200 | ||
| 201 | AVCodec mmvideo_decoder = { | 201 | AVCodec mmvideo_decoder = { |
| 202 | "mmvideo", | 202 | "mmvideo", |
| 203 | CODEC_TYPE_VIDEO, | 203 | AVMEDIA_TYPE_VIDEO, |
| 204 | CODEC_ID_MMVIDEO, | 204 | CODEC_ID_MMVIDEO, |
| 205 | sizeof(MmContext), | 205 | sizeof(MmContext), |
| 206 | mm_decode_init, | 206 | mm_decode_init, |
| @@ -304,7 +304,7 @@ static av_cold int mp_decode_end(AVCodecContext *avctx) · 303 unmodified lines | |||
| 304 | 304 | ||
| 305 | AVCodec motionpixels_decoder = { | 305 | AVCodec motionpixels_decoder = { |
| 306 | "motionpixels", | 306 | "motionpixels", |
| 307 | CODEC_TYPE_VIDEO, | 307 | AVMEDIA_TYPE_VIDEO, |
| 308 | CODEC_ID_MOTIONPIXELS, | 308 | CODEC_ID_MOTIONPIXELS, |
| 309 | sizeof(MotionPixelsContext), | 309 | sizeof(MotionPixelsContext), |
| 310 | mp_decode_init, | 310 | mp_decode_init, |
| @@ -290,7 +290,7 @@ static void mpc7_decode_flush(AVCodecContext *avctx) · 289 unmodified lines | |||
| 290 | 290 | ||
| 291 | AVCodec mpc7_decoder = { | 291 | AVCodec mpc7_decoder = { |
| 292 | "mpc7", | 292 | "mpc7", |
| 293 | CODEC_TYPE_AUDIO, | 293 | AVMEDIA_TYPE_AUDIO, |
| 294 | CODEC_ID_MUSEPACK7, | 294 | CODEC_ID_MUSEPACK7, |
| 295 | sizeof(MPCContext), | 295 | sizeof(MPCContext), |
| 296 | mpc7_decode_init, | 296 | mpc7_decode_init, |
| @@ -401,7 +401,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, · 400 unmodified lines | |||
| 401 | 401 | ||
| 402 | AVCodec mpc8_decoder = { | 402 | AVCodec mpc8_decoder = { |
| 403 | "mpc8", | 403 | "mpc8", |
| 404 | CODEC_TYPE_AUDIO, | 404 | AVMEDIA_TYPE_AUDIO, |
| 405 | CODEC_ID_MUSEPACK8, | 405 | CODEC_ID_MUSEPACK8, |
| 406 | sizeof(MPCContext), | 406 | sizeof(MPCContext), |
| 407 | mpc8_decode_init, | 407 | mpc8_decode_init, |
| @@ -2502,7 +2502,7 @@ static int mpeg_decode_end(AVCodecContext *avctx) · 2501 unmodified lines | |||
| 2502 | 2502 | ||
| 2503 | AVCodec mpeg1video_decoder = { | 2503 | AVCodec mpeg1video_decoder = { |
| 2504 | "mpeg1video", | 2504 | "mpeg1video", |
| 2505 | CODEC_TYPE_VIDEO, | 2505 | AVMEDIA_TYPE_VIDEO, |
| 2506 | CODEC_ID_MPEG1VIDEO, | 2506 | CODEC_ID_MPEG1VIDEO, |
| 2507 | sizeof(Mpeg1Context), | 2507 | sizeof(Mpeg1Context), |
| 2508 | mpeg_decode_init, | 2508 | mpeg_decode_init, |
| @@ -2516,7 +2516,7 @@ AVCodec mpeg1video_decoder = { · 7 unmodified lines | |||
| 2516 | 2516 | ||
| 2517 | AVCodec mpeg2video_decoder = { | 2517 | AVCodec mpeg2video_decoder = { |
| 2518 | "mpeg2video", | 2518 | "mpeg2video", |
| 2519 | CODEC_TYPE_VIDEO, | 2519 | AVMEDIA_TYPE_VIDEO, |
| 2520 | CODEC_ID_MPEG2VIDEO, | 2520 | CODEC_ID_MPEG2VIDEO, |
| 2521 | sizeof(Mpeg1Context), | 2521 | sizeof(Mpeg1Context), |
| 2522 | mpeg_decode_init, | 2522 | mpeg_decode_init, |
| @@ -2531,7 +2531,7 @@ AVCodec mpeg2video_decoder = { · 8 unmodified lines | |||
| 2531 | //legacy decoder | 2531 | //legacy decoder |
| 2532 | AVCodec mpegvideo_decoder = { | 2532 | AVCodec mpegvideo_decoder = { |
| 2533 | "mpegvideo", | 2533 | "mpegvideo", |
| 2534 | CODEC_TYPE_VIDEO, | 2534 | AVMEDIA_TYPE_VIDEO, |
| 2535 | CODEC_ID_MPEG2VIDEO, | 2535 | CODEC_ID_MPEG2VIDEO, |
| 2536 | sizeof(Mpeg1Context), | 2536 | sizeof(Mpeg1Context), |
| 2537 | mpeg_decode_init, | 2537 | mpeg_decode_init, |
| @@ -2562,7 +2562,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ · 24 unmodified lines | |||
| 2562 | 2562 | ||
| 2563 | AVCodec mpeg_xvmc_decoder = { | 2563 | AVCodec mpeg_xvmc_decoder = { |
| 2564 | "mpegvideo_xvmc", | 2564 | "mpegvideo_xvmc", |
| 2565 | CODEC_TYPE_VIDEO, | 2565 | AVMEDIA_TYPE_VIDEO, |
| 2566 | CODEC_ID_MPEG2VIDEO_XVMC, | 2566 | CODEC_ID_MPEG2VIDEO_XVMC, |
| 2567 | sizeof(Mpeg1Context), | 2567 | sizeof(Mpeg1Context), |
| 2568 | mpeg_mc_decode_init, | 2568 | mpeg_mc_decode_init, |
| @@ -2579,7 +2579,7 @@ AVCodec mpeg_xvmc_decoder = { · 10 unmodified lines | |||
| 2579 | #if CONFIG_MPEG_VDPAU_DECODER | 2579 | #if CONFIG_MPEG_VDPAU_DECODER |
| 2580 | AVCodec mpeg_vdpau_decoder = { | 2580 | AVCodec mpeg_vdpau_decoder = { |
| 2581 | "mpegvideo_vdpau", | 2581 | "mpegvideo_vdpau", |
| 2582 | CODEC_TYPE_VIDEO, | 2582 | AVMEDIA_TYPE_VIDEO, |
| 2583 | CODEC_ID_MPEG2VIDEO, | 2583 | CODEC_ID_MPEG2VIDEO, |
| 2584 | sizeof(Mpeg1Context), | 2584 | sizeof(Mpeg1Context), |
| 2585 | mpeg_decode_init, | 2585 | mpeg_decode_init, |
| @@ -2595,7 +2595,7 @@ AVCodec mpeg_vdpau_decoder = { · 9 unmodified lines | |||
| 2595 | #if CONFIG_MPEG1_VDPAU_DECODER | 2595 | #if CONFIG_MPEG1_VDPAU_DECODER |
| 2596 | AVCodec mpeg1_vdpau_decoder = { | 2596 | AVCodec mpeg1_vdpau_decoder = { |
| 2597 | "mpeg1video_vdpau", | 2597 | "mpeg1video_vdpau", |
| 2598 | CODEC_TYPE_VIDEO, | 2598 | AVMEDIA_TYPE_VIDEO, |
| 2599 | CODEC_ID_MPEG1VIDEO, | 2599 | CODEC_ID_MPEG1VIDEO, |
| 2600 | sizeof(Mpeg1Context), | 2600 | sizeof(Mpeg1Context), |
| 2601 | mpeg_decode_init, | 2601 | mpeg_decode_init, |
| @@ -932,7 +932,7 @@ static void mpeg1_encode_block(MpegEncContext *s, · 931 unmodified lines | |||
| 932 | 932 | ||
| 933 | AVCodec mpeg1video_encoder = { | 933 | AVCodec mpeg1video_encoder = { |
| 934 | "mpeg1video", | 934 | "mpeg1video", |
| 935 | CODEC_TYPE_VIDEO, | 935 | AVMEDIA_TYPE_VIDEO, |
| 936 | CODEC_ID_MPEG1VIDEO, | 936 | CODEC_ID_MPEG1VIDEO, |
| 937 | sizeof(MpegEncContext), | 937 | sizeof(MpegEncContext), |
| 938 | encode_init, | 938 | encode_init, |
| @@ -946,7 +946,7 @@ AVCodec mpeg1video_encoder = { · 7 unmodified lines | |||
| 946 | 946 | ||
| 947 | AVCodec mpeg2video_encoder = { | 947 | AVCodec mpeg2video_encoder = { |
| 948 | "mpeg2video", | 948 | "mpeg2video", |
| 949 | CODEC_TYPE_VIDEO, | 949 | AVMEDIA_TYPE_VIDEO, |
| 950 | CODEC_ID_MPEG2VIDEO, | 950 | CODEC_ID_MPEG2VIDEO, |
| 951 | sizeof(MpegEncContext), | 951 | sizeof(MpegEncContext), |
| 952 | encode_init, | 952 | encode_init, |
| @@ -2236,7 +2236,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 2235 unmodified lines | |||
| 2236 | 2236 | ||
| 2237 | AVCodec mpeg4_decoder = { | 2237 | AVCodec mpeg4_decoder = { |
| 2238 | "mpeg4", | 2238 | "mpeg4", |
| 2239 | CODEC_TYPE_VIDEO, | 2239 | AVMEDIA_TYPE_VIDEO, |
| 2240 | CODEC_ID_MPEG4, | 2240 | CODEC_ID_MPEG4, |
| 2241 | sizeof(MpegEncContext), | 2241 | sizeof(MpegEncContext), |
| 2242 | decode_init, | 2242 | decode_init, |
| @@ -2253,7 +2253,7 @@ AVCodec mpeg4_decoder = { · 10 unmodified lines | |||
| 2253 | #if CONFIG_MPEG4_VDPAU_DECODER | 2253 | #if CONFIG_MPEG4_VDPAU_DECODER |
| 2254 | AVCodec mpeg4_vdpau_decoder = { | 2254 | AVCodec mpeg4_vdpau_decoder = { |
| 2255 | "mpeg4_vdpau", | 2255 | "mpeg4_vdpau", |
| 2256 | CODEC_TYPE_VIDEO, | 2256 | AVMEDIA_TYPE_VIDEO, |
| 2257 | CODEC_ID_MPEG4, | 2257 | CODEC_ID_MPEG4, |
| 2258 | sizeof(MpegEncContext), | 2258 | sizeof(MpegEncContext), |
| 2259 | decode_init, | 2259 | decode_init, |
| @@ -1340,7 +1340,7 @@ void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) · 1339 unmodified lines | |||
| 1340 | 1340 | ||
| 1341 | AVCodec mpeg4_encoder = { | 1341 | AVCodec mpeg4_encoder = { |
| 1342 | "mpeg4", | 1342 | "mpeg4", |
| 1343 | CODEC_TYPE_VIDEO, | 1343 | AVMEDIA_TYPE_VIDEO, |
| 1344 | CODEC_ID_MPEG4, | 1344 | CODEC_ID_MPEG4, |
| 1345 | sizeof(MpegEncContext), | 1345 | sizeof(MpegEncContext), |
| 1346 | encode_init, | 1346 | encode_init, |
| @@ -2485,7 +2485,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, · 2484 unmodified lines | |||
| 2485 | AVCodec mp1_decoder = | 2485 | AVCodec mp1_decoder = |
| 2486 | { | 2486 | { |
| 2487 | "mp1", | 2487 | "mp1", |
| 2488 | CODEC_TYPE_AUDIO, | 2488 | AVMEDIA_TYPE_AUDIO, |
| 2489 | CODEC_ID_MP1, | 2489 | CODEC_ID_MP1, |
| 2490 | sizeof(MPADecodeContext), | 2490 | sizeof(MPADecodeContext), |
| 2491 | decode_init, | 2491 | decode_init, |
| @@ -2501,7 +2501,7 @@ AVCodec mp1_decoder = · 9 unmodified lines | |||
| 2501 | AVCodec mp2_decoder = | 2501 | AVCodec mp2_decoder = |
| 2502 | { | 2502 | { |
| 2503 | "mp2", | 2503 | "mp2", |
| 2504 | CODEC_TYPE_AUDIO, | 2504 | AVMEDIA_TYPE_AUDIO, |
| 2505 | CODEC_ID_MP2, | 2505 | CODEC_ID_MP2, |
| 2506 | sizeof(MPADecodeContext), | 2506 | sizeof(MPADecodeContext), |
| 2507 | decode_init, | 2507 | decode_init, |
| @@ -2517,7 +2517,7 @@ AVCodec mp2_decoder = · 9 unmodified lines | |||
| 2517 | AVCodec mp3_decoder = | 2517 | AVCodec mp3_decoder = |
| 2518 | { | 2518 | { |
| 2519 | "mp3", | 2519 | "mp3", |
| 2520 | CODEC_TYPE_AUDIO, | 2520 | AVMEDIA_TYPE_AUDIO, |
| 2521 | CODEC_ID_MP3, | 2521 | CODEC_ID_MP3, |
| 2522 | sizeof(MPADecodeContext), | 2522 | sizeof(MPADecodeContext), |
| 2523 | decode_init, | 2523 | decode_init, |
| @@ -2533,7 +2533,7 @@ AVCodec mp3_decoder = · 9 unmodified lines | |||
| 2533 | AVCodec mp3adu_decoder = | 2533 | AVCodec mp3adu_decoder = |
| 2534 | { | 2534 | { |
| 2535 | "mp3adu", | 2535 | "mp3adu", |
| 2536 | CODEC_TYPE_AUDIO, | 2536 | AVMEDIA_TYPE_AUDIO, |
| 2537 | CODEC_ID_MP3ADU, | 2537 | CODEC_ID_MP3ADU, |
| 2538 | sizeof(MPADecodeContext), | 2538 | sizeof(MPADecodeContext), |
| 2539 | decode_init, | 2539 | decode_init, |
| @@ -2549,7 +2549,7 @@ AVCodec mp3adu_decoder = · 9 unmodified lines | |||
| 2549 | AVCodec mp3on4_decoder = | 2549 | AVCodec mp3on4_decoder = |
| 2550 | { | 2550 | { |
| 2551 | "mp3on4", | 2551 | "mp3on4", |
| 2552 | CODEC_TYPE_AUDIO, | 2552 | AVMEDIA_TYPE_AUDIO, |
| 2553 | CODEC_ID_MP3ON4, | 2553 | CODEC_ID_MP3ON4, |
| 2554 | sizeof(MP3On4DecodeContext), | 2554 | sizeof(MP3On4DecodeContext), |
| 2555 | decode_init_mp3on4, | 2555 | decode_init_mp3on4, |
| @@ -790,7 +790,7 @@ static av_cold int MPA_encode_close(AVCodecContext *avctx) · 789 unmodified lines | |||
| 790 | 790 | ||
| 791 | AVCodec mp2_encoder = { | 791 | AVCodec mp2_encoder = { |
| 792 | "mp2", | 792 | "mp2", |
| 793 | CODEC_TYPE_AUDIO, | 793 | AVMEDIA_TYPE_AUDIO, |
| 794 | CODEC_ID_MP2, | 794 | CODEC_ID_MP2, |
| 795 | sizeof(MpegAudioContext), | 795 | sizeof(MpegAudioContext), |
| 796 | MPA_encode_init, | 796 | MPA_encode_init, |
| @@ -3771,7 +3771,7 @@ int dct_quantize_c(MpegEncContext *s, · 3770 unmodified lines | |||
| 3771 | 3771 | ||
| 3772 | AVCodec h263_encoder = { | 3772 | AVCodec h263_encoder = { |
| 3773 | "h263", | 3773 | "h263", |
| 3774 | CODEC_TYPE_VIDEO, | 3774 | AVMEDIA_TYPE_VIDEO, |
| 3775 | CODEC_ID_H263, | 3775 | CODEC_ID_H263, |
| 3776 | sizeof(MpegEncContext), | 3776 | sizeof(MpegEncContext), |
| 3777 | MPV_encode_init, | 3777 | MPV_encode_init, |
| @@ -3783,7 +3783,7 @@ AVCodec h263_encoder = { · 5 unmodified lines | |||
| 3783 | 3783 | ||
| 3784 | AVCodec h263p_encoder = { | 3784 | AVCodec h263p_encoder = { |
| 3785 | "h263p", | 3785 | "h263p", |
| 3786 | CODEC_TYPE_VIDEO, | 3786 | AVMEDIA_TYPE_VIDEO, |
| 3787 | CODEC_ID_H263P, | 3787 | CODEC_ID_H263P, |
| 3788 | sizeof(MpegEncContext), | 3788 | sizeof(MpegEncContext), |
| 3789 | MPV_encode_init, | 3789 | MPV_encode_init, |
| @@ -3795,7 +3795,7 @@ AVCodec h263p_encoder = { · 5 unmodified lines | |||
| 3795 | 3795 | ||
| 3796 | AVCodec msmpeg4v1_encoder = { | 3796 | AVCodec msmpeg4v1_encoder = { |
| 3797 | "msmpeg4v1", | 3797 | "msmpeg4v1", |
| 3798 | CODEC_TYPE_VIDEO, | 3798 | AVMEDIA_TYPE_VIDEO, |
| 3799 | CODEC_ID_MSMPEG4V1, | 3799 | CODEC_ID_MSMPEG4V1, |
| 3800 | sizeof(MpegEncContext), | 3800 | sizeof(MpegEncContext), |
| 3801 | MPV_encode_init, | 3801 | MPV_encode_init, |
| @@ -3807,7 +3807,7 @@ AVCodec msmpeg4v1_encoder = { · 5 unmodified lines | |||
| 3807 | 3807 | ||
| 3808 | AVCodec msmpeg4v2_encoder = { | 3808 | AVCodec msmpeg4v2_encoder = { |
| 3809 | "msmpeg4v2", | 3809 | "msmpeg4v2", |
| 3810 | CODEC_TYPE_VIDEO, | 3810 | AVMEDIA_TYPE_VIDEO, |
| 3811 | CODEC_ID_MSMPEG4V2, | 3811 | CODEC_ID_MSMPEG4V2, |
| 3812 | sizeof(MpegEncContext), | 3812 | sizeof(MpegEncContext), |
| 3813 | MPV_encode_init, | 3813 | MPV_encode_init, |
| @@ -3819,7 +3819,7 @@ AVCodec msmpeg4v2_encoder = { · 5 unmodified lines | |||
| 3819 | 3819 | ||
| 3820 | AVCodec msmpeg4v3_encoder = { | 3820 | AVCodec msmpeg4v3_encoder = { |
| 3821 | "msmpeg4", | 3821 | "msmpeg4", |
| 3822 | CODEC_TYPE_VIDEO, | 3822 | AVMEDIA_TYPE_VIDEO, |
| 3823 | CODEC_ID_MSMPEG4V3, | 3823 | CODEC_ID_MSMPEG4V3, |
| 3824 | sizeof(MpegEncContext), | 3824 | sizeof(MpegEncContext), |
| 3825 | MPV_encode_init, | 3825 | MPV_encode_init, |
| @@ -3831,7 +3831,7 @@ AVCodec msmpeg4v3_encoder = { · 5 unmodified lines | |||
| 3831 | 3831 | ||
| 3832 | AVCodec wmv1_encoder = { | 3832 | AVCodec wmv1_encoder = { |
| 3833 | "wmv1", | 3833 | "wmv1", |
| 3834 | CODEC_TYPE_VIDEO, | 3834 | AVMEDIA_TYPE_VIDEO, |
| 3835 | CODEC_ID_WMV1, | 3835 | CODEC_ID_WMV1, |
| 3836 | sizeof(MpegEncContext), | 3836 | sizeof(MpegEncContext), |
| 3837 | MPV_encode_init, | 3837 | MPV_encode_init, |
| @@ -1921,7 +1921,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, · 1920 unmodified lines | |||
| 1921 | 1921 | ||
| 1922 | AVCodec msmpeg4v1_decoder = { | 1922 | AVCodec msmpeg4v1_decoder = { |
| 1923 | "msmpeg4v1", | 1923 | "msmpeg4v1", |
| 1924 | CODEC_TYPE_VIDEO, | 1924 | AVMEDIA_TYPE_VIDEO, |
| 1925 | CODEC_ID_MSMPEG4V1, | 1925 | CODEC_ID_MSMPEG4V1, |
| 1926 | sizeof(MpegEncContext), | 1926 | sizeof(MpegEncContext), |
| 1927 | ff_msmpeg4_decode_init, | 1927 | ff_msmpeg4_decode_init, |
| @@ -1935,7 +1935,7 @@ AVCodec msmpeg4v1_decoder = { · 7 unmodified lines | |||
| 1935 | 1935 | ||
| 1936 | AVCodec msmpeg4v2_decoder = { | 1936 | AVCodec msmpeg4v2_decoder = { |
| 1937 | "msmpeg4v2", | 1937 | "msmpeg4v2", |
| 1938 | CODEC_TYPE_VIDEO, | 1938 | AVMEDIA_TYPE_VIDEO, |
| 1939 | CODEC_ID_MSMPEG4V2, | 1939 | CODEC_ID_MSMPEG4V2, |
| 1940 | sizeof(MpegEncContext), | 1940 | sizeof(MpegEncContext), |
| 1941 | ff_msmpeg4_decode_init, | 1941 | ff_msmpeg4_decode_init, |
| @@ -1949,7 +1949,7 @@ AVCodec msmpeg4v2_decoder = { · 7 unmodified lines | |||
| 1949 | 1949 | ||
| 1950 | AVCodec msmpeg4v3_decoder = { | 1950 | AVCodec msmpeg4v3_decoder = { |
| 1951 | "msmpeg4", | 1951 | "msmpeg4", |
| 1952 | CODEC_TYPE_VIDEO, | 1952 | AVMEDIA_TYPE_VIDEO, |
| 1953 | CODEC_ID_MSMPEG4V3, | 1953 | CODEC_ID_MSMPEG4V3, |
| 1954 | sizeof(MpegEncContext), | 1954 | sizeof(MpegEncContext), |
| 1955 | ff_msmpeg4_decode_init, | 1955 | ff_msmpeg4_decode_init, |
| @@ -1963,7 +1963,7 @@ AVCodec msmpeg4v3_decoder = { · 7 unmodified lines | |||
| 1963 | 1963 | ||
| 1964 | AVCodec wmv1_decoder = { | 1964 | AVCodec wmv1_decoder = { |
| 1965 | "wmv1", | 1965 | "wmv1", |
| 1966 | CODEC_TYPE_VIDEO, | 1966 | AVMEDIA_TYPE_VIDEO, |
| 1967 | CODEC_ID_WMV1, | 1967 | CODEC_ID_WMV1, |
| 1968 | sizeof(MpegEncContext), | 1968 | sizeof(MpegEncContext), |
| 1969 | ff_msmpeg4_decode_init, | 1969 | ff_msmpeg4_decode_init, |
| @@ -145,7 +145,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) · 144 unmodified lines | |||
| 145 | 145 | ||
| 146 | AVCodec msrle_decoder = { | 146 | AVCodec msrle_decoder = { |
| 147 | "msrle", | 147 | "msrle", |
| 148 | CODEC_TYPE_VIDEO, | 148 | AVMEDIA_TYPE_VIDEO, |
| 149 | CODEC_ID_MSRLE, | 149 | CODEC_ID_MSRLE, |
| 150 | sizeof(MsrleContext), | 150 | sizeof(MsrleContext), |
| 151 | msrle_decode_init, | 151 | msrle_decode_init, |
| @@ -333,7 +333,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) · 332 unmodified lines | |||
| 333 | 333 | ||
| 334 | AVCodec msvideo1_decoder = { | 334 | AVCodec msvideo1_decoder = { |
| 335 | "msvideo1", | 335 | "msvideo1", |
| 336 | CODEC_TYPE_VIDEO, | 336 | AVMEDIA_TYPE_VIDEO, |
| 337 | CODEC_ID_MSVIDEO1, | 337 | CODEC_ID_MSVIDEO1, |
| 338 | sizeof(Msvideo1Context), | 338 | sizeof(Msvideo1Context), |
| 339 | msvideo1_decode_init, | 339 | msvideo1_decode_init, |
| @@ -200,7 +200,7 @@ static av_cold int decode_end(AVCodecContext * avctx) { · 199 unmodified lines | |||
| 200 | 200 | ||
| 201 | AVCodec nellymoser_decoder = { | 201 | AVCodec nellymoser_decoder = { |
| 202 | "nellymoser", | 202 | "nellymoser", |
| 203 | CODEC_TYPE_AUDIO, | 203 | AVMEDIA_TYPE_AUDIO, |
| 204 | CODEC_ID_NELLYMOSER, | 204 | CODEC_ID_NELLYMOSER, |
| 205 | sizeof(NellyMoserDecodeContext), | 205 | sizeof(NellyMoserDecodeContext), |
| 206 | decode_init, | 206 | decode_init, |
| @@ -384,7 +384,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, voi · 383 unmodified lines | |||
| 384 | 384 | ||
| 385 | AVCodec nellymoser_encoder = { | 385 | AVCodec nellymoser_encoder = { |
| 386 | .name = "nellymoser", | 386 | .name = "nellymoser", |
| 387 | .type = CODEC_TYPE_AUDIO, | 387 | .type = AVMEDIA_TYPE_AUDIO, |
| 388 | .id = CODEC_ID_NELLYMOSER, | 388 | .id = CODEC_ID_NELLYMOSER, |
| 389 | .priv_data_size = sizeof(NellyMoserEncodeContext), | 389 | .priv_data_size = sizeof(NellyMoserEncodeContext), |
| 390 | .init = encode_init, | 390 | .init = encode_init, |
| @@ -274,7 +274,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { · 273 unmodified lines | |||
| 274 | 274 | ||
| 275 | AVCodec nuv_decoder = { | 275 | AVCodec nuv_decoder = { |
| 276 | "nuv", | 276 | "nuv", |
| 277 | CODEC_TYPE_VIDEO, | 277 | AVMEDIA_TYPE_VIDEO, |
| 278 | CODEC_ID_NUV, | 278 | CODEC_ID_NUV, |
| 279 | sizeof(NuvContext), | 279 | sizeof(NuvContext), |
| 280 | decode_init, | 280 | decode_init, |
| @@ -423,18 +423,18 @@ static const AVOption options[]={ · 422 unmodified lines | |||
| 423 | 423 | ||
| 424 | static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options }; | 424 | static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options }; |
| 425 | 425 | ||
| 426 | void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){ | 426 | void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){ |
| 427 | int flags=0; | 427 | int flags=0; |
| 428 | memset(s, 0, sizeof(AVCodecContext)); | 428 | memset(s, 0, sizeof(AVCodecContext)); |
| 429 | 429 | ||
| 430 | s->av_class= &av_codec_context_class; | 430 | s->av_class= &av_codec_context_class; |
| 431 | 431 | ||
| 432 | s->codec_type = codec_type; | 432 | s->codec_type = codec_type; |
| 433 | if(codec_type == CODEC_TYPE_AUDIO) | 433 | if(codec_type == AVMEDIA_TYPE_AUDIO) |
| 434 | flags= AV_OPT_FLAG_AUDIO_PARAM; | 434 | flags= AV_OPT_FLAG_AUDIO_PARAM; |
| 435 | else if(codec_type == CODEC_TYPE_VIDEO) | 435 | else if(codec_type == AVMEDIA_TYPE_VIDEO) |
| 436 | flags= AV_OPT_FLAG_VIDEO_PARAM; | 436 | flags= AV_OPT_FLAG_VIDEO_PARAM; |
| 437 | else if(codec_type == CODEC_TYPE_SUBTITLE) | 437 | else if(codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 438 | flags= AV_OPT_FLAG_SUBTITLE_PARAM; | 438 | flags= AV_OPT_FLAG_SUBTITLE_PARAM; |
| 439 | av_opt_set_defaults2(s, flags, flags); | 439 | av_opt_set_defaults2(s, flags, flags); |
| 440 | 440 | ||
| @@ -453,7 +453,7 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type) · 12 unmodified lines | |||
| 453 | s->reordered_opaque= AV_NOPTS_VALUE; | 453 | s->reordered_opaque= AV_NOPTS_VALUE; |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){ | 456 | AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){ |
| 457 | AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext)); | 457 | AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext)); |
| 458 | 458 | ||
| 459 | if(avctx==NULL) return NULL; | 459 | if(avctx==NULL) return NULL; |
| @@ -464,10 +464,10 @@ AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){ · 4 unmodified lines | |||
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | void avcodec_get_context_defaults(AVCodecContext *s){ | 466 | void avcodec_get_context_defaults(AVCodecContext *s){ |
| 467 | avcodec_get_context_defaults2(s, CODEC_TYPE_UNKNOWN); | 467 | avcodec_get_context_defaults2(s, AVMEDIA_TYPE_UNKNOWN); |
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | AVCodecContext *avcodec_alloc_context(void){ | 470 | AVCodecContext *avcodec_alloc_context(void){ |
| 471 | return avcodec_alloc_context2(CODEC_TYPE_UNKNOWN); | 471 | return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN); |
| 472 | } | 472 | } |
| 473 | 473 | ||
| @@ -110,7 +110,7 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 109 unmodified lines | |||
| 110 | 110 | ||
| 111 | AVCodec pam_encoder = { | 111 | AVCodec pam_encoder = { |
| 112 | "pam", | 112 | "pam", |
| 113 | CODEC_TYPE_VIDEO, | 113 | AVMEDIA_TYPE_VIDEO, |
| 114 | CODEC_ID_PAM, | 114 | CODEC_ID_PAM, |
| 115 | sizeof(PNMContext), | 115 | sizeof(PNMContext), |
| 116 | ff_pnm_init, | 116 | ff_pnm_init, |
| @@ -297,7 +297,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, · 296 unmodified lines | |||
| 297 | 297 | ||
| 298 | AVCodec pcm_bluray_decoder = { | 298 | AVCodec pcm_bluray_decoder = { |
| 299 | "pcm_bluray", | 299 | "pcm_bluray", |
| 300 | CODEC_TYPE_AUDIO, | 300 | AVMEDIA_TYPE_AUDIO, |
| 301 | CODEC_ID_PCM_BLURAY, | 301 | CODEC_ID_PCM_BLURAY, |
| 302 | 0, | 302 | 0, |
| 303 | NULL, | 303 | NULL, |
| @@ -516,7 +516,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, · 515 unmodified lines | |||
| 516 | #define PCM_ENCODER(id,sample_fmt_,name,long_name_) \ | 516 | #define PCM_ENCODER(id,sample_fmt_,name,long_name_) \ |
| 517 | AVCodec name ## _encoder = { \ | 517 | AVCodec name ## _encoder = { \ |
| 518 | #name, \ | 518 | #name, \ |
| 519 | CODEC_TYPE_AUDIO, \ | 519 | AVMEDIA_TYPE_AUDIO, \ |
| 520 | id, \ | 520 | id, \ |
| 521 | 0, \ | 521 | 0, \ |
| 522 | pcm_encode_init, \ | 522 | pcm_encode_init, \ |
| @@ -534,7 +534,7 @@ AVCodec name ## _encoder = { \ · 11 unmodified lines | |||
| 534 | #define PCM_DECODER(id,sample_fmt_,name,long_name_) \ | 534 | #define PCM_DECODER(id,sample_fmt_,name,long_name_) \ |
| 535 | AVCodec name ## _decoder = { \ | 535 | AVCodec name ## _decoder = { \ |
| 536 | #name, \ | 536 | #name, \ |
| 537 | CODEC_TYPE_AUDIO, \ | 537 | AVMEDIA_TYPE_AUDIO, \ |
| 538 | id, \ | 538 | id, \ |
| 539 | sizeof(PCMDecode), \ | 539 | sizeof(PCMDecode), \ |
| 540 | pcm_decode_init, \ | 540 | pcm_decode_init, \ |
| @@ -244,7 +244,7 @@ static av_cold int pcx_end(AVCodecContext *avctx) { · 243 unmodified lines | |||
| 244 | 244 | ||
| 245 | AVCodec pcx_decoder = { | 245 | AVCodec pcx_decoder = { |
| 246 | "pcx", | 246 | "pcx", |
| 247 | CODEC_TYPE_VIDEO, | 247 | AVMEDIA_TYPE_VIDEO, |
| 248 | CODEC_ID_PCX, | 248 | CODEC_ID_PCX, |
| 249 | sizeof(PCXContext), | 249 | sizeof(PCXContext), |
| 250 | pcx_init, | 250 | pcx_init, |
| @@ -191,7 +191,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, · 190 unmodified lines | |||
| 191 | 191 | ||
| 192 | AVCodec pcx_encoder = { | 192 | AVCodec pcx_encoder = { |
| 193 | "pcx", | 193 | "pcx", |
| 194 | CODEC_TYPE_VIDEO, | 194 | AVMEDIA_TYPE_VIDEO, |
| 195 | CODEC_ID_PCX, | 195 | CODEC_ID_PCX, |
| 196 | sizeof(PCXContext), | 196 | sizeof(PCXContext), |
| 197 | pcx_encode_init, | 197 | pcx_encode_init, |
| @@ -454,7 +454,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, · 453 unmodified lines | |||
| 454 | 454 | ||
| 455 | AVCodec pgssub_decoder = { | 455 | AVCodec pgssub_decoder = { |
| 456 | "pgssub", | 456 | "pgssub", |
| 457 | CODEC_TYPE_SUBTITLE, | 457 | AVMEDIA_TYPE_SUBTITLE, |
| 458 | CODEC_ID_HDMV_PGS_SUBTITLE, | 458 | CODEC_ID_HDMV_PGS_SUBTITLE, |
| 459 | sizeof(PGSSubContext), | 459 | sizeof(PGSSubContext), |
| 460 | init_decoder, | 460 | init_decoder, |
| @@ -656,7 +656,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx) · 655 unmodified lines | |||
| 656 | 656 | ||
| 657 | AVCodec png_decoder = { | 657 | AVCodec png_decoder = { |
| 658 | "png", | 658 | "png", |
| 659 | CODEC_TYPE_VIDEO, | 659 | AVMEDIA_TYPE_VIDEO, |
| 660 | CODEC_ID_PNG, | 660 | CODEC_ID_PNG, |
| 661 | sizeof(PNGDecContext), | 661 | sizeof(PNGDecContext), |
| 662 | png_dec_init, | 662 | png_dec_init, |
| @@ -438,7 +438,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ · 437 unmodified lines | |||
| 438 | 438 | ||
| 439 | AVCodec png_encoder = { | 439 | AVCodec png_encoder = { |
| 440 | "png", | 440 | "png", |
| 441 | CODEC_TYPE_VIDEO, | 441 | AVMEDIA_TYPE_VIDEO, |
| 442 | CODEC_ID_PNG, | 442 | CODEC_ID_PNG, |
| 443 | sizeof(PNGEncContext), | 443 | sizeof(PNGEncContext), |
| 444 | png_enc_init, | 444 | png_enc_init, |
| @@ -190,7 +190,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 189 unmodified lines | |||
| 190 | #if CONFIG_PGM_DECODER | 190 | #if CONFIG_PGM_DECODER |
| 191 | AVCodec pgm_decoder = { | 191 | AVCodec pgm_decoder = { |
| 192 | "pgm", | 192 | "pgm", |
| 193 | CODEC_TYPE_VIDEO, | 193 | AVMEDIA_TYPE_VIDEO, |
| 194 | CODEC_ID_PGM, | 194 | CODEC_ID_PGM, |
| 195 | sizeof(PNMContext), | 195 | sizeof(PNMContext), |
| 196 | ff_pnm_init, | 196 | ff_pnm_init, |
| @@ -206,7 +206,7 @@ AVCodec pgm_decoder = { · 9 unmodified lines | |||
| 206 | #if CONFIG_PGMYUV_DECODER | 206 | #if CONFIG_PGMYUV_DECODER |
| 207 | AVCodec pgmyuv_decoder = { | 207 | AVCodec pgmyuv_decoder = { |
| 208 | "pgmyuv", | 208 | "pgmyuv", |
| 209 | CODEC_TYPE_VIDEO, | 209 | AVMEDIA_TYPE_VIDEO, |
| 210 | CODEC_ID_PGMYUV, | 210 | CODEC_ID_PGMYUV, |
| 211 | sizeof(PNMContext), | 211 | sizeof(PNMContext), |
| 212 | ff_pnm_init, | 212 | ff_pnm_init, |
| @@ -222,7 +222,7 @@ AVCodec pgmyuv_decoder = { · 9 unmodified lines | |||
| 222 | #if CONFIG_PPM_DECODER | 222 | #if CONFIG_PPM_DECODER |
| 223 | AVCodec ppm_decoder = { | 223 | AVCodec ppm_decoder = { |
| 224 | "ppm", | 224 | "ppm", |
| 225 | CODEC_TYPE_VIDEO, | 225 | AVMEDIA_TYPE_VIDEO, |
| 226 | CODEC_ID_PPM, | 226 | CODEC_ID_PPM, |
| 227 | sizeof(PNMContext), | 227 | sizeof(PNMContext), |
| 228 | ff_pnm_init, | 228 | ff_pnm_init, |
| @@ -238,7 +238,7 @@ AVCodec ppm_decoder = { · 9 unmodified lines | |||
| 238 | #if CONFIG_PBM_DECODER | 238 | #if CONFIG_PBM_DECODER |
| 239 | AVCodec pbm_decoder = { | 239 | AVCodec pbm_decoder = { |
| 240 | "pbm", | 240 | "pbm", |
| 241 | CODEC_TYPE_VIDEO, | 241 | AVMEDIA_TYPE_VIDEO, |
| 242 | CODEC_ID_PBM, | 242 | CODEC_ID_PBM, |
| 243 | sizeof(PNMContext), | 243 | sizeof(PNMContext), |
| 244 | ff_pnm_init, | 244 | ff_pnm_init, |
| @@ -254,7 +254,7 @@ AVCodec pbm_decoder = { · 9 unmodified lines | |||
| 254 | #if CONFIG_PAM_DECODER | 254 | #if CONFIG_PAM_DECODER |
| 255 | AVCodec pam_decoder = { | 255 | AVCodec pam_decoder = { |
| 256 | "pam", | 256 | "pam", |
| 257 | CODEC_TYPE_VIDEO, | 257 | AVMEDIA_TYPE_VIDEO, |
| 258 | CODEC_ID_PAM, | 258 | CODEC_ID_PAM, |
| 259 | sizeof(PNMContext), | 259 | sizeof(PNMContext), |
| 260 | ff_pnm_init, | 260 | ff_pnm_init, |
| @@ -115,7 +115,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 114 unmodified lines | |||
| 115 | #if CONFIG_PGM_ENCODER | 115 | #if CONFIG_PGM_ENCODER |
| 116 | AVCodec pgm_encoder = { | 116 | AVCodec pgm_encoder = { |
| 117 | "pgm", | 117 | "pgm", |
| 118 | CODEC_TYPE_VIDEO, | 118 | AVMEDIA_TYPE_VIDEO, |
| 119 | CODEC_ID_PGM, | 119 | CODEC_ID_PGM, |
| 120 | sizeof(PNMContext), | 120 | sizeof(PNMContext), |
| 121 | ff_pnm_init, | 121 | ff_pnm_init, |
| @@ -128,7 +128,7 @@ AVCodec pgm_encoder = { · 6 unmodified lines | |||
| 128 | #if CONFIG_PGMYUV_ENCODER | 128 | #if CONFIG_PGMYUV_ENCODER |
| 129 | AVCodec pgmyuv_encoder = { | 129 | AVCodec pgmyuv_encoder = { |
| 130 | "pgmyuv", | 130 | "pgmyuv", |
| 131 | CODEC_TYPE_VIDEO, | 131 | AVMEDIA_TYPE_VIDEO, |
| 132 | CODEC_ID_PGMYUV, | 132 | CODEC_ID_PGMYUV, |
| 133 | sizeof(PNMContext), | 133 | sizeof(PNMContext), |
| 134 | ff_pnm_init, | 134 | ff_pnm_init, |
| @@ -141,7 +141,7 @@ AVCodec pgmyuv_encoder = { · 6 unmodified lines | |||
| 141 | #if CONFIG_PPM_ENCODER | 141 | #if CONFIG_PPM_ENCODER |
| 142 | AVCodec ppm_encoder = { | 142 | AVCodec ppm_encoder = { |
| 143 | "ppm", | 143 | "ppm", |
| 144 | CODEC_TYPE_VIDEO, | 144 | AVMEDIA_TYPE_VIDEO, |
| 145 | CODEC_ID_PPM, | 145 | CODEC_ID_PPM, |
| 146 | sizeof(PNMContext), | 146 | sizeof(PNMContext), |
| 147 | ff_pnm_init, | 147 | ff_pnm_init, |
| @@ -154,7 +154,7 @@ AVCodec ppm_encoder = { · 6 unmodified lines | |||
| 154 | #if CONFIG_PBM_ENCODER | 154 | #if CONFIG_PBM_ENCODER |
| 155 | AVCodec pbm_encoder = { | 155 | AVCodec pbm_encoder = { |
| 156 | "pbm", | 156 | "pbm", |
| 157 | CODEC_TYPE_VIDEO, | 157 | AVMEDIA_TYPE_VIDEO, |
| 158 | CODEC_ID_PBM, | 158 | CODEC_ID_PBM, |
| 159 | sizeof(PNMContext), | 159 | sizeof(PNMContext), |
| 160 | ff_pnm_init, | 160 | ff_pnm_init, |
| @@ -107,7 +107,7 @@ static av_cold int ptx_end(AVCodecContext *avctx) { · 106 unmodified lines | |||
| 107 | 107 | ||
| 108 | AVCodec ptx_decoder = { | 108 | AVCodec ptx_decoder = { |
| 109 | "ptx", | 109 | "ptx", |
| 110 | CODEC_TYPE_VIDEO, | 110 | AVMEDIA_TYPE_VIDEO, |
| 111 | CODEC_ID_PTX, | 111 | CODEC_ID_PTX, |
| 112 | sizeof(PTXContext), | 112 | sizeof(PTXContext), |
| 113 | ptx_init, | 113 | ptx_init, |
| @@ -813,7 +813,7 @@ erasure: · 812 unmodified lines | |||
| 813 | AVCodec qcelp_decoder = | 813 | AVCodec qcelp_decoder = |
| 814 | { | 814 | { |
| 815 | .name = "qcelp", | 815 | .name = "qcelp", |
| 816 | .type = CODEC_TYPE_AUDIO, | 816 | .type = AVMEDIA_TYPE_AUDIO, |
| 817 | .id = CODEC_ID_QCELP, | 817 | .id = CODEC_ID_QCELP, |
| 818 | .init = qcelp_decode_init, | 818 | .init = qcelp_decode_init, |
| 819 | .decode = qcelp_decode_frame, | 819 | .decode = qcelp_decode_frame, |
| @@ -1974,7 +1974,7 @@ static int qdm2_decode_frame(AVCodecContext *avctx, · 1973 unmodified lines | |||
| 1974 | AVCodec qdm2_decoder = | 1974 | AVCodec qdm2_decoder = |
| 1975 | { | 1975 | { |
| 1976 | .name = "qdm2", | 1976 | .name = "qdm2", |
| 1977 | .type = CODEC_TYPE_AUDIO, | 1977 | .type = AVMEDIA_TYPE_AUDIO, |
| 1978 | .id = CODEC_ID_QDM2, | 1978 | .id = CODEC_ID_QDM2, |
| 1979 | .priv_data_size = sizeof(QDM2Context), | 1979 | .priv_data_size = sizeof(QDM2Context), |
| 1980 | .init = qdm2_decode_init, | 1980 | .init = qdm2_decode_init, |
| @@ -152,7 +152,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 151 unmodified lines | |||
| 152 | 152 | ||
| 153 | AVCodec qdraw_decoder = { | 153 | AVCodec qdraw_decoder = { |
| 154 | "qdraw", | 154 | "qdraw", |
| 155 | CODEC_TYPE_VIDEO, | 155 | AVMEDIA_TYPE_VIDEO, |
| 156 | CODEC_ID_QDRAW, | 156 | CODEC_ID_QDRAW, |
| 157 | sizeof(QdrawContext), | 157 | sizeof(QdrawContext), |
| 158 | decode_init, | 158 | decode_init, |
| @@ -313,7 +313,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 312 unmodified lines | |||
| 313 | 313 | ||
| 314 | AVCodec qpeg_decoder = { | 314 | AVCodec qpeg_decoder = { |
| 315 | "qpeg", | 315 | "qpeg", |
| 316 | CODEC_TYPE_VIDEO, | 316 | AVMEDIA_TYPE_VIDEO, |
| 317 | CODEC_ID_QPEG, | 317 | CODEC_ID_QPEG, |
| 318 | sizeof(QpegContext), | 318 | sizeof(QpegContext), |
| 319 | decode_init, | 319 | decode_init, |
| @@ -539,7 +539,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) · 538 unmodified lines | |||
| 539 | 539 | ||
| 540 | AVCodec qtrle_decoder = { | 540 | AVCodec qtrle_decoder = { |
| 541 | "qtrle", | 541 | "qtrle", |
| 542 | CODEC_TYPE_VIDEO, | 542 | AVMEDIA_TYPE_VIDEO, |
| 543 | CODEC_ID_QTRLE, | 543 | CODEC_ID_QTRLE, |
| 544 | sizeof(QtrleContext), | 544 | sizeof(QtrleContext), |
| 545 | qtrle_decode_init, | 545 | qtrle_decode_init, |
| @@ -322,7 +322,7 @@ static av_cold int qtrle_encode_end(AVCodecContext *avctx) · 321 unmodified lines | |||
| 322 | 322 | ||
| 323 | AVCodec qtrle_encoder = { | 323 | AVCodec qtrle_encoder = { |
| 324 | "qtrle", | 324 | "qtrle", |
| 325 | CODEC_TYPE_VIDEO, | 325 | AVMEDIA_TYPE_VIDEO, |
| 326 | CODEC_ID_QTRLE, | 326 | CODEC_ID_QTRLE, |
| 327 | sizeof(QtrleEncContext), | 327 | sizeof(QtrleEncContext), |
| 328 | qtrle_encode_init, | 328 | qtrle_encode_init, |
| @@ -92,7 +92,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 91 unmodified lines | |||
| 92 | 92 | ||
| 93 | AVCodec r210_decoder = { | 93 | AVCodec r210_decoder = { |
| 94 | "r210", | 94 | "r210", |
| 95 | CODEC_TYPE_VIDEO, | 95 | AVMEDIA_TYPE_VIDEO, |
| 96 | CODEC_ID_R210, | 96 | CODEC_ID_R210, |
| 97 | 0, | 97 | 0, |
| 98 | decode_init, | 98 | decode_init, |
| @@ -353,7 +353,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, · 352 unmodified lines | |||
| 353 | AVCodec ra_144_decoder = | 353 | AVCodec ra_144_decoder = |
| 354 | { | 354 | { |
| 355 | "real_144", | 355 | "real_144", |
| 356 | CODEC_TYPE_AUDIO, | 356 | AVMEDIA_TYPE_AUDIO, |
| 357 | CODEC_ID_RA_144, | 357 | CODEC_ID_RA_144, |
| 358 | sizeof(RA144Context), | 358 | sizeof(RA144Context), |
| 359 | ra144_decode_init, | 359 | ra144_decode_init, |
| @@ -206,7 +206,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, · 205 unmodified lines | |||
| 206 | AVCodec ra_288_decoder = | 206 | AVCodec ra_288_decoder = |
| 207 | { | 207 | { |
| 208 | "real_288", | 208 | "real_288", |
| 209 | CODEC_TYPE_AUDIO, | 209 | AVMEDIA_TYPE_AUDIO, |
| 210 | CODEC_ID_RA_288, | 210 | CODEC_ID_RA_288, |
| 211 | sizeof(RA288Context), | 211 | sizeof(RA288Context), |
| 212 | ra288_decode_init, | 212 | ra288_decode_init, |
| @@ -185,7 +185,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | AVCodec rawvideo_decoder = { | 186 | AVCodec rawvideo_decoder = { |
| 187 | "rawvideo", | 187 | "rawvideo", |
| 188 | CODEC_TYPE_VIDEO, | 188 | AVMEDIA_TYPE_VIDEO, |
| 189 | CODEC_ID_RAWVIDEO, | 189 | CODEC_ID_RAWVIDEO, |
| 190 | sizeof(RawVideoContext), | 190 | sizeof(RawVideoContext), |
| 191 | raw_init_decoder, | 191 | raw_init_decoder, |
| @@ -57,7 +57,7 @@ static int raw_encode(AVCodecContext *avctx, · 56 unmodified lines | |||
| 57 | 57 | ||
| 58 | AVCodec rawvideo_encoder = { | 58 | AVCodec rawvideo_encoder = { |
| 59 | "rawvideo", | 59 | "rawvideo", |
| 60 | CODEC_TYPE_VIDEO, | 60 | AVMEDIA_TYPE_VIDEO, |
| 61 | CODEC_ID_RAWVIDEO, | 61 | CODEC_ID_RAWVIDEO, |
| 62 | sizeof(AVFrame), | 62 | sizeof(AVFrame), |
| 63 | raw_init_encoder, | 63 | raw_init_encoder, |
| @@ -230,7 +230,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) · 229 unmodified lines | |||
| 230 | 230 | ||
| 231 | AVCodec rl2_decoder = { | 231 | AVCodec rl2_decoder = { |
| 232 | "rl2", | 232 | "rl2", |
| 233 | CODEC_TYPE_VIDEO, | 233 | AVMEDIA_TYPE_VIDEO, |
| 234 | CODEC_ID_RL2, | 234 | CODEC_ID_RL2, |
| 235 | sizeof(Rl2Context), | 235 | sizeof(Rl2Context), |
| 236 | rl2_decode_init, | 236 | rl2_decode_init, |
| @@ -155,7 +155,7 @@ static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx) · 154 unmodified lines | |||
| 155 | 155 | ||
| 156 | AVCodec roq_dpcm_encoder = { | 156 | AVCodec roq_dpcm_encoder = { |
| 157 | "roq_dpcm", | 157 | "roq_dpcm", |
| 158 | CODEC_TYPE_AUDIO, | 158 | AVMEDIA_TYPE_AUDIO, |
| 159 | CODEC_ID_ROQ_DPCM, | 159 | CODEC_ID_ROQ_DPCM, |
| 160 | sizeof(ROQDPCMContext), | 160 | sizeof(ROQDPCMContext), |
| 161 | roq_dpcm_encode_init, | 161 | roq_dpcm_encode_init, |
| @@ -212,7 +212,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) · 211 unmodified lines | |||
| 212 | 212 | ||
| 213 | AVCodec roq_decoder = { | 213 | AVCodec roq_decoder = { |
| 214 | "roqvideo", | 214 | "roqvideo", |
| 215 | CODEC_TYPE_VIDEO, | 215 | AVMEDIA_TYPE_VIDEO, |
| 216 | CODEC_ID_ROQ, | 216 | CODEC_ID_ROQ, |
| 217 | sizeof(RoqContext), | 217 | sizeof(RoqContext), |
| 218 | roq_decode_init, | 218 | roq_decode_init, |
| @@ -1057,7 +1057,7 @@ static int roq_encode_end(AVCodecContext *avctx) · 1056 unmodified lines | |||
| 1057 | AVCodec roq_encoder = | 1057 | AVCodec roq_encoder = |
| 1058 | { | 1058 | { |
| 1059 | "roqvideo", | 1059 | "roqvideo", |
| 1060 | CODEC_TYPE_VIDEO, | 1060 | AVMEDIA_TYPE_VIDEO, |
| 1061 | CODEC_ID_ROQ, | 1061 | CODEC_ID_ROQ, |
| 1062 | sizeof(RoqContext), | 1062 | sizeof(RoqContext), |
| 1063 | roq_encode_init, | 1063 | roq_encode_init, |
| @@ -277,7 +277,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) · 276 unmodified lines | |||
| 277 | 277 | ||
| 278 | AVCodec rpza_decoder = { | 278 | AVCodec rpza_decoder = { |
| 279 | "rpza", | 279 | "rpza", |
| 280 | CODEC_TYPE_VIDEO, | 280 | AVMEDIA_TYPE_VIDEO, |
| 281 | CODEC_ID_RPZA, | 281 | CODEC_ID_RPZA, |
| 282 | sizeof(RpzaContext), | 282 | sizeof(RpzaContext), |
| 283 | rpza_decode_init, | 283 | rpza_decode_init, |
| @@ -708,7 +708,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, · 707 unmodified lines | |||
| 708 | 708 | ||
| 709 | AVCodec rv10_decoder = { | 709 | AVCodec rv10_decoder = { |
| 710 | "rv10", | 710 | "rv10", |
| 711 | CODEC_TYPE_VIDEO, | 711 | AVMEDIA_TYPE_VIDEO, |
| 712 | CODEC_ID_RV10, | 712 | CODEC_ID_RV10, |
| 713 | sizeof(MpegEncContext), | 713 | sizeof(MpegEncContext), |
| 714 | rv10_decode_init, | 714 | rv10_decode_init, |
| @@ -722,7 +722,7 @@ AVCodec rv10_decoder = { · 7 unmodified lines | |||
| 722 | 722 | ||
| 723 | AVCodec rv20_decoder = { | 723 | AVCodec rv20_decoder = { |
| 724 | "rv20", | 724 | "rv20", |
| 725 | CODEC_TYPE_VIDEO, | 725 | AVMEDIA_TYPE_VIDEO, |
| 726 | CODEC_ID_RV20, | 726 | CODEC_ID_RV20, |
| 727 | sizeof(MpegEncContext), | 727 | sizeof(MpegEncContext), |
| 728 | rv10_decode_init, | 728 | rv10_decode_init, |
| @@ -58,7 +58,7 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) · 57 unmodified lines | |||
| 58 | 58 | ||
| 59 | AVCodec rv10_encoder = { | 59 | AVCodec rv10_encoder = { |
| 60 | "rv10", | 60 | "rv10", |
| 61 | CODEC_TYPE_VIDEO, | 61 | AVMEDIA_TYPE_VIDEO, |
| 62 | CODEC_ID_RV10, | 62 | CODEC_ID_RV10, |
| 63 | sizeof(MpegEncContext), | 63 | sizeof(MpegEncContext), |
| 64 | MPV_encode_init, | 64 | MPV_encode_init, |
| @@ -59,7 +59,7 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ · 58 unmodified lines | |||
| 59 | 59 | ||
| 60 | AVCodec rv20_encoder = { | 60 | AVCodec rv20_encoder = { |
| 61 | "rv20", | 61 | "rv20", |
| 62 | CODEC_TYPE_VIDEO, | 62 | AVMEDIA_TYPE_VIDEO, |
| 63 | CODEC_ID_RV20, | 63 | CODEC_ID_RV20, |
| 64 | sizeof(MpegEncContext), | 64 | sizeof(MpegEncContext), |
| 65 | MPV_encode_init, | 65 | MPV_encode_init, |
| @@ -268,7 +268,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) · 267 unmodified lines | |||
| 268 | 268 | ||
| 269 | AVCodec rv30_decoder = { | 269 | AVCodec rv30_decoder = { |
| 270 | "rv30", | 270 | "rv30", |
| 271 | CODEC_TYPE_VIDEO, | 271 | AVMEDIA_TYPE_VIDEO, |
| 272 | CODEC_ID_RV30, | 272 | CODEC_ID_RV30, |
| 273 | sizeof(RV34DecContext), | 273 | sizeof(RV34DecContext), |
| 274 | rv30_decode_init, | 274 | rv30_decode_init, |
| @@ -668,7 +668,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) · 667 unmodified lines | |||
| 668 | 668 | ||
| 669 | AVCodec rv40_decoder = { | 669 | AVCodec rv40_decoder = { |
| 670 | "rv40", | 670 | "rv40", |
| 671 | CODEC_TYPE_VIDEO, | 671 | AVMEDIA_TYPE_VIDEO, |
| 672 | CODEC_ID_RV40, | 672 | CODEC_ID_RV40, |
| 673 | sizeof(RV34DecContext), | 673 | sizeof(RV34DecContext), |
| 674 | rv40_decode_init, | 674 | rv40_decode_init, |
| @@ -260,7 +260,7 @@ static av_cold int sgi_end(AVCodecContext *avctx) · 259 unmodified lines | |||
| 260 | 260 | ||
| 261 | AVCodec sgi_decoder = { | 261 | AVCodec sgi_decoder = { |
| 262 | "sgi", | 262 | "sgi", |
| 263 | CODEC_TYPE_VIDEO, | 263 | AVMEDIA_TYPE_VIDEO, |
| 264 | CODEC_ID_SGI, | 264 | CODEC_ID_SGI, |
| 265 | sizeof(SgiState), | 265 | sizeof(SgiState), |
| 266 | sgi_init, | 266 | sgi_init, |
| @@ -161,7 +161,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, · 160 unmodified lines | |||
| 161 | 161 | ||
| 162 | AVCodec sgi_encoder = { | 162 | AVCodec sgi_encoder = { |
| 163 | "sgi", | 163 | "sgi", |
| 164 | CODEC_TYPE_VIDEO, | 164 | AVMEDIA_TYPE_VIDEO, |
| 165 | CODEC_ID_SGI, | 165 | CODEC_ID_SGI, |
| 166 | sizeof(SgiContext), | 166 | sizeof(SgiContext), |
| 167 | encode_init, | 167 | encode_init, |
| @@ -527,7 +527,7 @@ static void shorten_flush(AVCodecContext *avctx){ · 526 unmodified lines | |||
| 527 | 527 | ||
| 528 | AVCodec shorten_decoder = { | 528 | AVCodec shorten_decoder = { |
| 529 | "shorten", | 529 | "shorten", |
| 530 | CODEC_TYPE_AUDIO, | 530 | AVMEDIA_TYPE_AUDIO, |
| 531 | CODEC_ID_SHORTEN, | 531 | CODEC_ID_SHORTEN, |
| 532 | sizeof(ShortenContext), | 532 | sizeof(ShortenContext), |
| 533 | shorten_decode_init, | 533 | shorten_decode_init, |
| @@ -579,7 +579,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *datap, · 578 unmodified lines | |||
| 579 | 579 | ||
| 580 | AVCodec sipr_decoder = { | 580 | AVCodec sipr_decoder = { |
| 581 | "sipr", | 581 | "sipr", |
| 582 | CODEC_TYPE_AUDIO, | 582 | AVMEDIA_TYPE_AUDIO, |
| 583 | CODEC_ID_SIPR, | 583 | CODEC_ID_SIPR, |
| 584 | sizeof(SiprContext), | 584 | sizeof(SiprContext), |
| 585 | sipr_decoder_init, | 585 | sipr_decoder_init, |
| @@ -691,7 +691,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 690 unmodified lines | |||
| 691 | 691 | ||
| 692 | AVCodec smacker_decoder = { | 692 | AVCodec smacker_decoder = { |
| 693 | "smackvid", | 693 | "smackvid", |
| 694 | CODEC_TYPE_VIDEO, | 694 | AVMEDIA_TYPE_VIDEO, |
| 695 | CODEC_ID_SMACKVIDEO, | 695 | CODEC_ID_SMACKVIDEO, |
| 696 | sizeof(SmackVContext), | 696 | sizeof(SmackVContext), |
| 697 | decode_init, | 697 | decode_init, |
| @@ -704,7 +704,7 @@ AVCodec smacker_decoder = { · 6 unmodified lines | |||
| 704 | 704 | ||
| 705 | AVCodec smackaud_decoder = { | 705 | AVCodec smackaud_decoder = { |
| 706 | "smackaud", | 706 | "smackaud", |
| 707 | CODEC_TYPE_AUDIO, | 707 | AVMEDIA_TYPE_AUDIO, |
| 708 | CODEC_ID_SMACKAUDIO, | 708 | CODEC_ID_SMACKAUDIO, |
| 709 | 0, | 709 | 0, |
| 710 | smka_decode_init, | 710 | smka_decode_init, |
| @@ -473,7 +473,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) · 472 unmodified lines | |||
| 473 | 473 | ||
| 474 | AVCodec smc_decoder = { | 474 | AVCodec smc_decoder = { |
| 475 | "smc", | 475 | "smc", |
| 476 | CODEC_TYPE_VIDEO, | 476 | AVMEDIA_TYPE_VIDEO, |
| 477 | CODEC_ID_SMC, | 477 | CODEC_ID_SMC, |
| 478 | sizeof(SmcContext), | 478 | sizeof(SmcContext), |
| 479 | smc_decode_init, | 479 | smc_decode_init, |
| @@ -2237,7 +2237,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 2236 unmodified lines | |||
| 2237 | 2237 | ||
| 2238 | AVCodec snow_decoder = { | 2238 | AVCodec snow_decoder = { |
| 2239 | "snow", | 2239 | "snow", |
| 2240 | CODEC_TYPE_VIDEO, | 2240 | AVMEDIA_TYPE_VIDEO, |
| 2241 | CODEC_ID_SNOW, | 2241 | CODEC_ID_SNOW, |
| 2242 | sizeof(SnowContext), | 2242 | sizeof(SnowContext), |
| 2243 | decode_init, | 2243 | decode_init, |
| @@ -3988,7 +3988,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 1744 unmodified lines | |||
| 3988 | 3988 | ||
| 3989 | AVCodec snow_encoder = { | 3989 | AVCodec snow_encoder = { |
| 3990 | "snow", | 3990 | "snow", |
| 3991 | CODEC_TYPE_VIDEO, | 3991 | AVMEDIA_TYPE_VIDEO, |
| 3992 | CODEC_ID_SNOW, | 3992 | CODEC_ID_SNOW, |
| 3993 | sizeof(SnowContext), | 3993 | sizeof(SnowContext), |
| 3994 | encode_init, | 3994 | encode_init, |
| @@ -937,7 +937,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, · 936 unmodified lines | |||
| 937 | 937 | ||
| 938 | AVCodec sonic_decoder = { | 938 | AVCodec sonic_decoder = { |
| 939 | "sonic", | 939 | "sonic", |
| 940 | CODEC_TYPE_AUDIO, | 940 | AVMEDIA_TYPE_AUDIO, |
| 941 | CODEC_ID_SONIC, | 941 | CODEC_ID_SONIC, |
| 942 | sizeof(SonicContext), | 942 | sizeof(SonicContext), |
| 943 | sonic_decode_init, | 943 | sonic_decode_init, |
| @@ -951,7 +951,7 @@ AVCodec sonic_decoder = { · 7 unmodified lines | |||
| 951 | #if CONFIG_SONIC_ENCODER | 951 | #if CONFIG_SONIC_ENCODER |
| 952 | AVCodec sonic_encoder = { | 952 | AVCodec sonic_encoder = { |
| 953 | "sonic", | 953 | "sonic", |
| 954 | CODEC_TYPE_AUDIO, | 954 | AVMEDIA_TYPE_AUDIO, |
| 955 | CODEC_ID_SONIC, | 955 | CODEC_ID_SONIC, |
| 956 | sizeof(SonicContext), | 956 | sizeof(SonicContext), |
| 957 | sonic_encode_init, | 957 | sonic_encode_init, |
| @@ -965,7 +965,7 @@ AVCodec sonic_encoder = { · 7 unmodified lines | |||
| 965 | #if CONFIG_SONIC_LS_ENCODER | 965 | #if CONFIG_SONIC_LS_ENCODER |
| 966 | AVCodec sonic_ls_encoder = { | 966 | AVCodec sonic_ls_encoder = { |
| 967 | "sonicls", | 967 | "sonicls", |
| 968 | CODEC_TYPE_AUDIO, | 968 | AVMEDIA_TYPE_AUDIO, |
| 969 | CODEC_ID_SONIC_LS, | 969 | CODEC_ID_SONIC_LS, |
| 970 | sizeof(SonicContext), | 970 | sizeof(SonicContext), |
| 971 | sonic_encode_init, | 971 | sonic_encode_init, |
| @@ -195,7 +195,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, · 194 unmodified lines | |||
| 195 | 195 | ||
| 196 | AVCodec sp5x_decoder = { | 196 | AVCodec sp5x_decoder = { |
| 197 | "sp5x", | 197 | "sp5x", |
| 198 | CODEC_TYPE_VIDEO, | 198 | AVMEDIA_TYPE_VIDEO, |
| 199 | CODEC_ID_SP5X, | 199 | CODEC_ID_SP5X, |
| 200 | sizeof(MJpegDecodeContext), | 200 | sizeof(MJpegDecodeContext), |
| 201 | ff_mjpeg_decode_init, | 201 | ff_mjpeg_decode_init, |
| @@ -209,7 +209,7 @@ AVCodec sp5x_decoder = { · 7 unmodified lines | |||
| 209 | 209 | ||
| 210 | AVCodec amv_decoder = { | 210 | AVCodec amv_decoder = { |
| 211 | "amv", | 211 | "amv", |
| 212 | CODEC_TYPE_VIDEO, | 212 | AVMEDIA_TYPE_VIDEO, |
| 213 | CODEC_ID_AMV, | 213 | CODEC_ID_AMV, |
| 214 | sizeof(MJpegDecodeContext), | 214 | sizeof(MJpegDecodeContext), |
| 215 | ff_mjpeg_decode_init, | 215 | ff_mjpeg_decode_init, |
| @@ -185,7 +185,7 @@ static av_cold int sunrast_end(AVCodecContext *avctx) { · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | AVCodec sunrast_decoder = { | 186 | AVCodec sunrast_decoder = { |
| 187 | "sunrast", | 187 | "sunrast", |
| 188 | CODEC_TYPE_VIDEO, | 188 | AVMEDIA_TYPE_VIDEO, |
| 189 | CODEC_ID_SUNRAST, | 189 | CODEC_ID_SUNRAST, |
| 190 | sizeof(SUNRASTContext), | 190 | sizeof(SUNRASTContext), |
| 191 | sunrast_init, | 191 | sunrast_init, |
| @@ -828,7 +828,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) · 827 unmodified lines | |||
| 828 | 828 | ||
| 829 | AVCodec svq1_decoder = { | 829 | AVCodec svq1_decoder = { |
| 830 | "svq1", | 830 | "svq1", |
| 831 | CODEC_TYPE_VIDEO, | 831 | AVMEDIA_TYPE_VIDEO, |
| 832 | CODEC_ID_SVQ1, | 832 | CODEC_ID_SVQ1, |
| 833 | sizeof(MpegEncContext), | 833 | sizeof(MpegEncContext), |
| 834 | svq1_decode_init, | 834 | svq1_decode_init, |
| @@ -574,7 +574,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) · 573 unmodified lines | |||
| 574 | 574 | ||
| 575 | AVCodec svq1_encoder = { | 575 | AVCodec svq1_encoder = { |
| 576 | "svq1", | 576 | "svq1", |
| 577 | CODEC_TYPE_VIDEO, | 577 | AVMEDIA_TYPE_VIDEO, |
| 578 | CODEC_ID_SVQ1, | 578 | CODEC_ID_SVQ1, |
| 579 | sizeof(SVQ1Context), | 579 | sizeof(SVQ1Context), |
| 580 | svq1_encode_init, | 580 | svq1_encode_init, |
| @@ -1071,7 +1071,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 1070 unmodified lines | |||
| 1071 | 1071 | ||
| 1072 | AVCodec svq3_decoder = { | 1072 | AVCodec svq3_decoder = { |
| 1073 | "svq3", | 1073 | "svq3", |
| 1074 | CODEC_TYPE_VIDEO, | 1074 | AVMEDIA_TYPE_VIDEO, |
| 1075 | CODEC_ID_SVQ3, | 1075 | CODEC_ID_SVQ3, |
| 1076 | sizeof(H264Context), | 1076 | sizeof(H264Context), |
| 1077 | svq3_decode_init, | 1077 | svq3_decode_init, |
| @@ -243,7 +243,7 @@ static av_cold int targa_end(AVCodecContext *avctx){ · 242 unmodified lines | |||
| 243 | 243 | ||
| 244 | AVCodec targa_decoder = { | 244 | AVCodec targa_decoder = { |
| 245 | "targa", | 245 | "targa", |
| 246 | CODEC_TYPE_VIDEO, | 246 | AVMEDIA_TYPE_VIDEO, |
| 247 | CODEC_ID_TARGA, | 247 | CODEC_ID_TARGA, |
| 248 | sizeof(TargaContext), | 248 | sizeof(TargaContext), |
| 249 | targa_init, | 249 | targa_init, |
| @@ -153,7 +153,7 @@ static av_cold int targa_encode_init(AVCodecContext *avctx) · 152 unmodified lines | |||
| 153 | 153 | ||
| 154 | AVCodec targa_encoder = { | 154 | AVCodec targa_encoder = { |
| 155 | .name = "targa", | 155 | .name = "targa", |
| 156 | .type = CODEC_TYPE_VIDEO, | 156 | .type = AVMEDIA_TYPE_VIDEO, |
| 157 | .id = CODEC_ID_TARGA, | 157 | .id = CODEC_ID_TARGA, |
| 158 | .priv_data_size = sizeof(TargaContext), | 158 | .priv_data_size = sizeof(TargaContext), |
| 159 | .init = targa_encode_init, | 159 | .init = targa_encode_init, |
| @@ -221,7 +221,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) · 220 unmodified lines | |||
| 221 | 221 | ||
| 222 | AVCodec tiertexseqvideo_decoder = { | 222 | AVCodec tiertexseqvideo_decoder = { |
| 223 | "tiertexseqvideo", | 223 | "tiertexseqvideo", |
| 224 | CODEC_TYPE_VIDEO, | 224 | AVMEDIA_TYPE_VIDEO, |
| 225 | CODEC_ID_TIERTEXSEQVIDEO, | 225 | CODEC_ID_TIERTEXSEQVIDEO, |
| 226 | sizeof(SeqVideoContext), | 226 | sizeof(SeqVideoContext), |
| 227 | seqvideo_decode_init, | 227 | seqvideo_decode_init, |
| @@ -592,7 +592,7 @@ static av_cold int tiff_end(AVCodecContext *avctx) · 591 unmodified lines | |||
| 592 | 592 | ||
| 593 | AVCodec tiff_decoder = { | 593 | AVCodec tiff_decoder = { |
| 594 | "tiff", | 594 | "tiff", |
| 595 | CODEC_TYPE_VIDEO, | 595 | AVMEDIA_TYPE_VIDEO, |
| 596 | CODEC_ID_TIFF, | 596 | CODEC_ID_TIFF, |
| 597 | sizeof(TiffContext), | 597 | sizeof(TiffContext), |
| 598 | tiff_init, | 598 | tiff_init, |
| @@ -444,7 +444,7 @@ fail: · 443 unmodified lines | |||
| 444 | 444 | ||
| 445 | AVCodec tiff_encoder = { | 445 | AVCodec tiff_encoder = { |
| 446 | "tiff", | 446 | "tiff", |
| 447 | CODEC_TYPE_VIDEO, | 447 | AVMEDIA_TYPE_VIDEO, |
| 448 | CODEC_ID_TIFF, | 448 | CODEC_ID_TIFF, |
| 449 | sizeof(TiffEncoderContext), | 449 | sizeof(TiffEncoderContext), |
| 450 | NULL, | 450 | NULL, |
| @@ -100,7 +100,7 @@ static av_cold int tmv_decode_close(AVCodecContext *avctx) · 99 unmodified lines | |||
| 100 | 100 | ||
| 101 | AVCodec tmv_decoder = { | 101 | AVCodec tmv_decoder = { |
| 102 | .name = "tmv", | 102 | .name = "tmv", |
| 103 | .type = CODEC_TYPE_VIDEO, | 103 | .type = AVMEDIA_TYPE_VIDEO, |
| 104 | .id = CODEC_ID_TMV, | 104 | .id = CODEC_ID_TMV, |
| 105 | .priv_data_size = sizeof(TMVContext), | 105 | .priv_data_size = sizeof(TMVContext), |
| 106 | .close = tmv_decode_close, | 106 | .close = tmv_decode_close, |
| @@ -892,7 +892,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) · 891 unmodified lines | |||
| 892 | 892 | ||
| 893 | AVCodec truemotion1_decoder = { | 893 | AVCodec truemotion1_decoder = { |
| 894 | "truemotion1", | 894 | "truemotion1", |
| 895 | CODEC_TYPE_VIDEO, | 895 | AVMEDIA_TYPE_VIDEO, |
| 896 | CODEC_ID_TRUEMOTION1, | 896 | CODEC_ID_TRUEMOTION1, |
| 897 | sizeof(TrueMotion1Context), | 897 | sizeof(TrueMotion1Context), |
| 898 | truemotion1_decode_init, | 898 | truemotion1_decode_init, |
| @@ -872,7 +872,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 871 unmodified lines | |||
| 872 | 872 | ||
| 873 | AVCodec truemotion2_decoder = { | 873 | AVCodec truemotion2_decoder = { |
| 874 | "truemotion2", | 874 | "truemotion2", |
| 875 | CODEC_TYPE_VIDEO, | 875 | AVMEDIA_TYPE_VIDEO, |
| 876 | CODEC_ID_TRUEMOTION2, | 876 | CODEC_ID_TRUEMOTION2, |
| 877 | sizeof(TM2Context), | 877 | sizeof(TM2Context), |
| 878 | decode_init, | 878 | decode_init, |
| @@ -378,7 +378,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, · 377 unmodified lines | |||
| 378 | 378 | ||
| 379 | AVCodec truespeech_decoder = { | 379 | AVCodec truespeech_decoder = { |
| 380 | "truespeech", | 380 | "truespeech", |
| 381 | CODEC_TYPE_AUDIO, | 381 | AVMEDIA_TYPE_AUDIO, |
| 382 | CODEC_ID_TRUESPEECH, | 382 | CODEC_ID_TRUESPEECH, |
| 383 | sizeof(TSContext), | 383 | sizeof(TSContext), |
| 384 | truespeech_decode_init, | 384 | truespeech_decode_init, |
| @@ -199,7 +199,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 198 unmodified lines | |||
| 199 | 199 | ||
| 200 | AVCodec tscc_decoder = { | 200 | AVCodec tscc_decoder = { |
| 201 | "camtasia", | 201 | "camtasia", |
| 202 | CODEC_TYPE_VIDEO, | 202 | AVMEDIA_TYPE_VIDEO, |
| 203 | CODEC_ID_TSCC, | 203 | CODEC_ID_TSCC, |
| 204 | sizeof(CamtasiaContext), | 204 | sizeof(CamtasiaContext), |
| 205 | decode_init, | 205 | decode_init, |
| @@ -449,7 +449,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) { · 448 unmodified lines | |||
| 449 | 449 | ||
| 450 | AVCodec tta_decoder = { | 450 | AVCodec tta_decoder = { |
| 451 | "tta", | 451 | "tta", |
| 452 | CODEC_TYPE_AUDIO, | 452 | AVMEDIA_TYPE_AUDIO, |
| 453 | CODEC_ID_TTA, | 453 | CODEC_ID_TTA, |
| 454 | sizeof(TTAContext), | 454 | sizeof(TTAContext), |
| 455 | tta_decode_init, | 455 | tta_decode_init, |
| @@ -1119,7 +1119,7 @@ static av_cold int twin_decode_close(AVCodecContext *avctx) · 1118 unmodified lines | |||
| 1119 | AVCodec twinvq_decoder = | 1119 | AVCodec twinvq_decoder = |
| 1120 | { | 1120 | { |
| 1121 | "twinvq", | 1121 | "twinvq", |
| 1122 | CODEC_TYPE_AUDIO, | 1122 | AVMEDIA_TYPE_AUDIO, |
| 1123 | CODEC_ID_TWINVQ, | 1123 | CODEC_ID_TWINVQ, |
| 1124 | sizeof(TwinContext), | 1124 | sizeof(TwinContext), |
| 1125 | twin_decode_init, | 1125 | twin_decode_init, |
| @@ -156,7 +156,7 @@ static av_cold int txd_end(AVCodecContext *avctx) { · 155 unmodified lines | |||
| 156 | 156 | ||
| 157 | AVCodec txd_decoder = { | 157 | AVCodec txd_decoder = { |
| 158 | "txd", | 158 | "txd", |
| 159 | CODEC_TYPE_VIDEO, | 159 | AVMEDIA_TYPE_VIDEO, |
| 160 | CODEC_ID_TXD, | 160 | CODEC_ID_TXD, |
| 161 | sizeof(TXDContext), | 161 | sizeof(TXDContext), |
| 162 | txd_init, | 162 | txd_init, |
| @@ -406,7 +406,7 @@ static int ulti_decode_frame(AVCodecContext *avctx, · 405 unmodified lines | |||
| 406 | 406 | ||
| 407 | AVCodec ulti_decoder = { | 407 | AVCodec ulti_decoder = { |
| 408 | "ultimotion", | 408 | "ultimotion", |
| 409 | CODEC_TYPE_VIDEO, | 409 | AVMEDIA_TYPE_VIDEO, |
| 410 | CODEC_ID_ULTI, | 410 | CODEC_ID_ULTI, |
| 411 | sizeof(UltimotionDecodeContext), | 411 | sizeof(UltimotionDecodeContext), |
| 412 | ulti_decode_init, | 412 | ulti_decode_init, |
| @@ -497,7 +497,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) · 496 unmodified lines | |||
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | avctx->codec = codec; | 499 | avctx->codec = codec; |
| 500 | if ((avctx->codec_type == CODEC_TYPE_UNKNOWN || avctx->codec_type == codec->type) && | 500 | if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) && |
| 501 | avctx->codec_id == CODEC_ID_NONE) { | 501 | avctx->codec_id == CODEC_ID_NONE) { |
| 502 | avctx->codec_type = codec->type; | 502 | avctx->codec_type = codec->type; |
| 503 | avctx->codec_id = codec->id; | 503 | avctx->codec_id = codec->id; |
| @@ -775,20 +775,20 @@ static int get_bit_rate(AVCodecContext *ctx) · 271 unmodified lines | |||
| 775 | int bits_per_sample; | 775 | int bits_per_sample; |
| 776 | 776 | ||
| 777 | switch(ctx->codec_type) { | 777 | switch(ctx->codec_type) { |
| 778 | case CODEC_TYPE_VIDEO: | 778 | case AVMEDIA_TYPE_VIDEO: |
| 779 | bit_rate = ctx->bit_rate; | 779 | bit_rate = ctx->bit_rate; |
| 780 | break; | 780 | break; |
| 781 | case CODEC_TYPE_AUDIO: | 781 | case AVMEDIA_TYPE_AUDIO: |
| 782 | bits_per_sample = av_get_bits_per_sample(ctx->codec_id); | 782 | bits_per_sample = av_get_bits_per_sample(ctx->codec_id); |
| 783 | bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate; | 783 | bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate; |
| 784 | break; | 784 | break; |
| 785 | case CODEC_TYPE_DATA: | 785 | case AVMEDIA_TYPE_DATA: |
| 786 | bit_rate = ctx->bit_rate; | 786 | bit_rate = ctx->bit_rate; |
| 787 | break; | 787 | break; |
| 788 | case CODEC_TYPE_SUBTITLE: | 788 | case AVMEDIA_TYPE_SUBTITLE: |
| 789 | bit_rate = ctx->bit_rate; | 789 | bit_rate = ctx->bit_rate; |
| 790 | break; | 790 | break; |
| 791 | case CODEC_TYPE_ATTACHMENT: | 791 | case AVMEDIA_TYPE_ATTACHMENT: |
| 792 | bit_rate = ctx->bit_rate; | 792 | bit_rate = ctx->bit_rate; |
| 793 | break; | 793 | break; |
| 794 | default: | 794 | default: |
| @@ -836,7 +836,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 41 unmodified lines | |||
| 836 | } | 836 | } |
| 837 | 837 | ||
| 838 | switch(enc->codec_type) { | 838 | switch(enc->codec_type) { |
| 839 | case CODEC_TYPE_VIDEO: | 839 | case AVMEDIA_TYPE_VIDEO: |
| 840 | snprintf(buf, buf_size, | 840 | snprintf(buf, buf_size, |
| 841 | "Video: %s%s", | 841 | "Video: %s%s", |
| 842 | codec_name, enc->mb_decision ? " (hq)" : ""); | 842 | codec_name, enc->mb_decision ? " (hq)" : ""); |
| @@ -871,7 +871,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 28 unmodified lines | |||
| 871 | ", q=%d-%d", enc->qmin, enc->qmax); | 871 | ", q=%d-%d", enc->qmin, enc->qmax); |
| 872 | } | 872 | } |
| 873 | break; | 873 | break; |
| 874 | case CODEC_TYPE_AUDIO: | 874 | case AVMEDIA_TYPE_AUDIO: |
| 875 | snprintf(buf, buf_size, | 875 | snprintf(buf, buf_size, |
| 876 | "Audio: %s", | 876 | "Audio: %s", |
| 877 | codec_name); | 877 | codec_name); |
| @@ -886,13 +886,13 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 8 unmodified lines | |||
| 886 | ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt)); | 886 | ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt)); |
| 887 | } | 887 | } |
| 888 | break; | 888 | break; |
| 889 | case CODEC_TYPE_DATA: | 889 | case AVMEDIA_TYPE_DATA: |
| 890 | snprintf(buf, buf_size, "Data: %s", codec_name); | 890 | snprintf(buf, buf_size, "Data: %s", codec_name); |
| 891 | break; | 891 | break; |
| 892 | case CODEC_TYPE_SUBTITLE: | 892 | case AVMEDIA_TYPE_SUBTITLE: |
| 893 | snprintf(buf, buf_size, "Subtitle: %s", codec_name); | 893 | snprintf(buf, buf_size, "Subtitle: %s", codec_name); |
| 894 | break; | 894 | break; |
| 895 | case CODEC_TYPE_ATTACHMENT: | 895 | case AVMEDIA_TYPE_ATTACHMENT: |
| 896 | snprintf(buf, buf_size, "Attachment: %s", codec_name); | 896 | snprintf(buf, buf_size, "Attachment: %s", codec_name); |
| 897 | break; | 897 | break; |
| 898 | default: | 898 | default: |
| @@ -122,7 +122,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 121 unmodified lines | |||
| 122 | 122 | ||
| 123 | AVCodec v210_decoder = { | 123 | AVCodec v210_decoder = { |
| 124 | "v210", | 124 | "v210", |
| 125 | CODEC_TYPE_VIDEO, | 125 | AVMEDIA_TYPE_VIDEO, |
| 126 | CODEC_ID_V210, | 126 | CODEC_ID_V210, |
| 127 | 0, | 127 | 0, |
| 128 | decode_init, | 128 | decode_init, |
| @@ -119,7 +119,7 @@ static av_cold int encode_close(AVCodecContext *avctx) · 118 unmodified lines | |||
| 119 | 119 | ||
| 120 | AVCodec v210_encoder = { | 120 | AVCodec v210_encoder = { |
| 121 | "v210", | 121 | "v210", |
| 122 | CODEC_TYPE_VIDEO, | 122 | AVMEDIA_TYPE_VIDEO, |
| 123 | CODEC_ID_V210, | 123 | CODEC_ID_V210, |
| 124 | 0, | 124 | 0, |
| 125 | encode_init, | 125 | encode_init, |
| @@ -134,7 +134,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 133 unmodified lines | |||
| 134 | 134 | ||
| 135 | AVCodec v210x_decoder = { | 135 | AVCodec v210x_decoder = { |
| 136 | "v210x", | 136 | "v210x", |
| 137 | CODEC_TYPE_VIDEO, | 137 | AVMEDIA_TYPE_VIDEO, |
| 138 | CODEC_ID_V210X, | 138 | CODEC_ID_V210X, |
| 139 | 0, | 139 | 0, |
| 140 | decode_init, | 140 | decode_init, |
| @@ -336,7 +336,7 @@ static int decode_slice(AVCodecContext *avctx, · 335 unmodified lines | |||
| 336 | 336 | ||
| 337 | AVHWAccel h264_vaapi_hwaccel = { | 337 | AVHWAccel h264_vaapi_hwaccel = { |
| 338 | .name = "h264_vaapi", | 338 | .name = "h264_vaapi", |
| 339 | .type = CODEC_TYPE_VIDEO, | 339 | .type = AVMEDIA_TYPE_VIDEO, |
| 340 | .id = CODEC_ID_H264, | 340 | .id = CODEC_ID_H264, |
| 341 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 341 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 342 | .capabilities = 0, | 342 | .capabilities = 0, |
| @@ -140,7 +140,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | AVHWAccel mpeg2_vaapi_hwaccel = { | 141 | AVHWAccel mpeg2_vaapi_hwaccel = { |
| 142 | .name = "mpeg2_vaapi", | 142 | .name = "mpeg2_vaapi", |
| 143 | .type = CODEC_TYPE_VIDEO, | 143 | .type = AVMEDIA_TYPE_VIDEO, |
| 144 | .id = CODEC_ID_MPEG2VIDEO, | 144 | .id = CODEC_ID_MPEG2VIDEO, |
| 145 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 145 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 146 | .capabilities = 0, | 146 | .capabilities = 0, |
| @@ -151,7 +151,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 150 unmodified lines | |||
| 151 | #if CONFIG_MPEG4_VAAPI_HWACCEL | 151 | #if CONFIG_MPEG4_VAAPI_HWACCEL |
| 152 | AVHWAccel mpeg4_vaapi_hwaccel = { | 152 | AVHWAccel mpeg4_vaapi_hwaccel = { |
| 153 | .name = "mpeg4_vaapi", | 153 | .name = "mpeg4_vaapi", |
| 154 | .type = CODEC_TYPE_VIDEO, | 154 | .type = AVMEDIA_TYPE_VIDEO, |
| 155 | .id = CODEC_ID_MPEG4, | 155 | .id = CODEC_ID_MPEG4, |
| 156 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 156 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 157 | .capabilities = 0, | 157 | .capabilities = 0, |
| @@ -165,7 +165,7 @@ AVHWAccel mpeg4_vaapi_hwaccel = { · 7 unmodified lines | |||
| 165 | #if CONFIG_H263_VAAPI_HWACCEL | 165 | #if CONFIG_H263_VAAPI_HWACCEL |
| 166 | AVHWAccel h263_vaapi_hwaccel = { | 166 | AVHWAccel h263_vaapi_hwaccel = { |
| 167 | .name = "h263_vaapi", | 167 | .name = "h263_vaapi", |
| 168 | .type = CODEC_TYPE_VIDEO, | 168 | .type = AVMEDIA_TYPE_VIDEO, |
| 169 | .id = CODEC_ID_H263, | 169 | .id = CODEC_ID_H263, |
| 170 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 170 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 171 | .capabilities = 0, | 171 | .capabilities = 0, |
| @@ -328,7 +328,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 327 unmodified lines | |||
| 328 | #if CONFIG_WMV3_VAAPI_HWACCEL | 328 | #if CONFIG_WMV3_VAAPI_HWACCEL |
| 329 | AVHWAccel wmv3_vaapi_hwaccel = { | 329 | AVHWAccel wmv3_vaapi_hwaccel = { |
| 330 | .name = "wmv3_vaapi", | 330 | .name = "wmv3_vaapi", |
| 331 | .type = CODEC_TYPE_VIDEO, | 331 | .type = AVMEDIA_TYPE_VIDEO, |
| 332 | .id = CODEC_ID_WMV3, | 332 | .id = CODEC_ID_WMV3, |
| 333 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 333 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 334 | .capabilities = 0, | 334 | .capabilities = 0, |
| @@ -341,7 +341,7 @@ AVHWAccel wmv3_vaapi_hwaccel = { · 6 unmodified lines | |||
| 341 | 341 | ||
| 342 | AVHWAccel vc1_vaapi_hwaccel = { | 342 | AVHWAccel vc1_vaapi_hwaccel = { |
| 343 | .name = "vc1_vaapi", | 343 | .name = "vc1_vaapi", |
| 344 | .type = CODEC_TYPE_VIDEO, | 344 | .type = AVMEDIA_TYPE_VIDEO, |
| 345 | .id = CODEC_ID_VC1, | 345 | .id = CODEC_ID_VC1, |
| 346 | .pix_fmt = PIX_FMT_VAAPI_VLD, | 346 | .pix_fmt = PIX_FMT_VAAPI_VLD, |
| 347 | .capabilities = 0, | 347 | .capabilities = 0, |
| @@ -289,7 +289,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 288 unmodified lines | |||
| 289 | 289 | ||
| 290 | AVCodec vb_decoder = { | 290 | AVCodec vb_decoder = { |
| 291 | "vb", | 291 | "vb", |
| 292 | CODEC_TYPE_VIDEO, | 292 | AVMEDIA_TYPE_VIDEO, |
| 293 | CODEC_ID_VB, | 293 | CODEC_ID_VB, |
| 294 | sizeof(VBDecContext), | 294 | sizeof(VBDecContext), |
| 295 | decode_init, | 295 | decode_init, |
| @@ -3319,7 +3319,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx) · 3318 unmodified lines | |||
| 3319 | 3319 | ||
| 3320 | AVCodec vc1_decoder = { | 3320 | AVCodec vc1_decoder = { |
| 3321 | "vc1", | 3321 | "vc1", |
| 3322 | CODEC_TYPE_VIDEO, | 3322 | AVMEDIA_TYPE_VIDEO, |
| 3323 | CODEC_ID_VC1, | 3323 | CODEC_ID_VC1, |
| 3324 | sizeof(VC1Context), | 3324 | sizeof(VC1Context), |
| 3325 | vc1_decode_init, | 3325 | vc1_decode_init, |
| @@ -3335,7 +3335,7 @@ AVCodec vc1_decoder = { · 9 unmodified lines | |||
| 3335 | #if CONFIG_WMV3_DECODER | 3335 | #if CONFIG_WMV3_DECODER |
| 3336 | AVCodec wmv3_decoder = { | 3336 | AVCodec wmv3_decoder = { |
| 3337 | "wmv3", | 3337 | "wmv3", |
| 3338 | CODEC_TYPE_VIDEO, | 3338 | AVMEDIA_TYPE_VIDEO, |
| 3339 | CODEC_ID_WMV3, | 3339 | CODEC_ID_WMV3, |
| 3340 | sizeof(VC1Context), | 3340 | sizeof(VC1Context), |
| 3341 | vc1_decode_init, | 3341 | vc1_decode_init, |
| @@ -3352,7 +3352,7 @@ AVCodec wmv3_decoder = { · 10 unmodified lines | |||
| 3352 | #if CONFIG_WMV3_VDPAU_DECODER | 3352 | #if CONFIG_WMV3_VDPAU_DECODER |
| 3353 | AVCodec wmv3_vdpau_decoder = { | 3353 | AVCodec wmv3_vdpau_decoder = { |
| 3354 | "wmv3_vdpau", | 3354 | "wmv3_vdpau", |
| 3355 | CODEC_TYPE_VIDEO, | 3355 | AVMEDIA_TYPE_VIDEO, |
| 3356 | CODEC_ID_WMV3, | 3356 | CODEC_ID_WMV3, |
| 3357 | sizeof(VC1Context), | 3357 | sizeof(VC1Context), |
| 3358 | vc1_decode_init, | 3358 | vc1_decode_init, |
| @@ -3369,7 +3369,7 @@ AVCodec wmv3_vdpau_decoder = { · 10 unmodified lines | |||
| 3369 | #if CONFIG_VC1_VDPAU_DECODER | 3369 | #if CONFIG_VC1_VDPAU_DECODER |
| 3370 | AVCodec vc1_vdpau_decoder = { | 3370 | AVCodec vc1_vdpau_decoder = { |
| 3371 | "vc1_vdpau", | 3371 | "vc1_vdpau", |
| 3372 | CODEC_TYPE_VIDEO, | 3372 | AVMEDIA_TYPE_VIDEO, |
| 3373 | CODEC_ID_VC1, | 3373 | CODEC_ID_VC1, |
| 3374 | sizeof(VC1Context), | 3374 | sizeof(VC1Context), |
| 3375 | vc1_decode_init, | 3375 | vc1_decode_init, |
| @@ -178,7 +178,7 @@ static av_cold int encode_init(AVCodecContext *avctx){ · 177 unmodified lines | |||
| 178 | 178 | ||
| 179 | AVCodec vcr1_decoder = { | 179 | AVCodec vcr1_decoder = { |
| 180 | "vcr1", | 180 | "vcr1", |
| 181 | CODEC_TYPE_VIDEO, | 181 | AVMEDIA_TYPE_VIDEO, |
| 182 | CODEC_ID_VCR1, | 182 | CODEC_ID_VCR1, |
| 183 | sizeof(VCR1Context), | 183 | sizeof(VCR1Context), |
| 184 | decode_init, | 184 | decode_init, |
| @@ -192,7 +192,7 @@ AVCodec vcr1_decoder = { · 7 unmodified lines | |||
| 192 | #if CONFIG_VCR1_ENCODER | 192 | #if CONFIG_VCR1_ENCODER |
| 193 | AVCodec vcr1_encoder = { | 193 | AVCodec vcr1_encoder = { |
| 194 | "vcr1", | 194 | "vcr1", |
| 195 | CODEC_TYPE_VIDEO, | 195 | AVMEDIA_TYPE_VIDEO, |
| 196 | CODEC_ID_VCR1, | 196 | CODEC_ID_VCR1, |
| 197 | sizeof(VCR1Context), | 197 | sizeof(VCR1Context), |
| 198 | encode_init, | 198 | encode_init, |
| @@ -567,7 +567,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, · 566 unmodified lines | |||
| 567 | 567 | ||
| 568 | AVCodec vmdvideo_decoder = { | 568 | AVCodec vmdvideo_decoder = { |
| 569 | "vmdvideo", | 569 | "vmdvideo", |
| 570 | CODEC_TYPE_VIDEO, | 570 | AVMEDIA_TYPE_VIDEO, |
| 571 | CODEC_ID_VMDVIDEO, | 571 | CODEC_ID_VMDVIDEO, |
| 572 | sizeof(VmdVideoContext), | 572 | sizeof(VmdVideoContext), |
| 573 | vmdvideo_decode_init, | 573 | vmdvideo_decode_init, |
| @@ -580,7 +580,7 @@ AVCodec vmdvideo_decoder = { · 6 unmodified lines | |||
| 580 | 580 | ||
| 581 | AVCodec vmdaudio_decoder = { | 581 | AVCodec vmdaudio_decoder = { |
| 582 | "vmdaudio", | 582 | "vmdaudio", |
| 583 | CODEC_TYPE_AUDIO, | 583 | AVMEDIA_TYPE_AUDIO, |
| 584 | CODEC_ID_VMDAUDIO, | 584 | CODEC_ID_VMDAUDIO, |
| 585 | sizeof(VmdAudioContext), | 585 | sizeof(VmdAudioContext), |
| 586 | vmdaudio_decode_init, | 586 | vmdaudio_decode_init, |
| @@ -510,7 +510,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 509 unmodified lines | |||
| 510 | 510 | ||
| 511 | AVCodec vmnc_decoder = { | 511 | AVCodec vmnc_decoder = { |
| 512 | "vmnc", | 512 | "vmnc", |
| 513 | CODEC_TYPE_VIDEO, | 513 | AVMEDIA_TYPE_VIDEO, |
| 514 | CODEC_ID_VMNC, | 514 | CODEC_ID_VMNC, |
| 515 | sizeof(VmncContext), | 515 | sizeof(VmncContext), |
| 516 | decode_init, | 516 | decode_init, |
| @@ -1645,7 +1645,7 @@ static av_cold int vorbis_decode_close(AVCodecContext *avccontext) · 1644 unmodified lines | |||
| 1645 | 1645 | ||
| 1646 | AVCodec vorbis_decoder = { | 1646 | AVCodec vorbis_decoder = { |
| 1647 | "vorbis", | 1647 | "vorbis", |
| 1648 | CODEC_TYPE_AUDIO, | 1648 | AVMEDIA_TYPE_AUDIO, |
| 1649 | CODEC_ID_VORBIS, | 1649 | CODEC_ID_VORBIS, |
| 1650 | sizeof(vorbis_context), | 1650 | sizeof(vorbis_context), |
| 1651 | vorbis_decode_init, | 1651 | vorbis_decode_init, |
| @@ -1093,7 +1093,7 @@ static av_cold int vorbis_encode_close(AVCodecContext *avccontext) · 1092 unmodified lines | |||
| 1093 | 1093 | ||
| 1094 | AVCodec vorbis_encoder = { | 1094 | AVCodec vorbis_encoder = { |
| 1095 | "vorbis", | 1095 | "vorbis", |
| 1096 | CODEC_TYPE_AUDIO, | 1096 | AVMEDIA_TYPE_AUDIO, |
| 1097 | CODEC_ID_VORBIS, | 1097 | CODEC_ID_VORBIS, |
| 1098 | sizeof(vorbis_enc_context), | 1098 | sizeof(vorbis_enc_context), |
| 1099 | vorbis_encode_init, | 1099 | vorbis_encode_init, |
| @@ -2191,7 +2191,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) · 2190 unmodified lines | |||
| 2191 | 2191 | ||
| 2192 | AVCodec theora_decoder = { | 2192 | AVCodec theora_decoder = { |
| 2193 | "theora", | 2193 | "theora", |
| 2194 | CODEC_TYPE_VIDEO, | 2194 | AVMEDIA_TYPE_VIDEO, |
| 2195 | CODEC_ID_THEORA, | 2195 | CODEC_ID_THEORA, |
| 2196 | sizeof(Vp3DecodeContext), | 2196 | sizeof(Vp3DecodeContext), |
| 2197 | theora_decode_init, | 2197 | theora_decode_init, |
| @@ -2206,7 +2206,7 @@ AVCodec theora_decoder = { · 8 unmodified lines | |||
| 2206 | 2206 | ||
| 2207 | AVCodec vp3_decoder = { | 2207 | AVCodec vp3_decoder = { |
| 2208 | "vp3", | 2208 | "vp3", |
| 2209 | CODEC_TYPE_VIDEO, | 2209 | AVMEDIA_TYPE_VIDEO, |
| 2210 | CODEC_ID_VP3, | 2210 | CODEC_ID_VP3, |
| 2211 | sizeof(Vp3DecodeContext), | 2211 | sizeof(Vp3DecodeContext), |
| 2212 | vp3_decode_init, | 2212 | vp3_decode_init, |
| @@ -286,7 +286,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) · 285 unmodified lines | |||
| 286 | 286 | ||
| 287 | AVCodec vp5_decoder = { | 287 | AVCodec vp5_decoder = { |
| 288 | "vp5", | 288 | "vp5", |
| 289 | CODEC_TYPE_VIDEO, | 289 | AVMEDIA_TYPE_VIDEO, |
| 290 | CODEC_ID_VP5, | 290 | CODEC_ID_VP5, |
| 291 | sizeof(VP56Context), | 291 | sizeof(VP56Context), |
| 292 | vp5_decode_init, | 292 | vp5_decode_init, |
| @@ -621,7 +621,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx) · 620 unmodified lines | |||
| 621 | 621 | ||
| 622 | AVCodec vp6_decoder = { | 622 | AVCodec vp6_decoder = { |
| 623 | "vp6", | 623 | "vp6", |
| 624 | CODEC_TYPE_VIDEO, | 624 | AVMEDIA_TYPE_VIDEO, |
| 625 | CODEC_ID_VP6, | 625 | CODEC_ID_VP6, |
| 626 | sizeof(VP56Context), | 626 | sizeof(VP56Context), |
| 627 | vp6_decode_init, | 627 | vp6_decode_init, |
| @@ -635,7 +635,7 @@ AVCodec vp6_decoder = { · 7 unmodified lines | |||
| 635 | /* flash version, not flipped upside-down */ | 635 | /* flash version, not flipped upside-down */ |
| 636 | AVCodec vp6f_decoder = { | 636 | AVCodec vp6f_decoder = { |
| 637 | "vp6f", | 637 | "vp6f", |
| 638 | CODEC_TYPE_VIDEO, | 638 | AVMEDIA_TYPE_VIDEO, |
| 639 | CODEC_ID_VP6F, | 639 | CODEC_ID_VP6F, |
| 640 | sizeof(VP56Context), | 640 | sizeof(VP56Context), |
| 641 | vp6_decode_init, | 641 | vp6_decode_init, |
| @@ -649,7 +649,7 @@ AVCodec vp6f_decoder = { · 7 unmodified lines | |||
| 649 | /* flash version, not flipped upside-down, with alpha channel */ | 649 | /* flash version, not flipped upside-down, with alpha channel */ |
| 650 | AVCodec vp6a_decoder = { | 650 | AVCodec vp6a_decoder = { |
| 651 | "vp6a", | 651 | "vp6a", |
| 652 | CODEC_TYPE_VIDEO, | 652 | AVMEDIA_TYPE_VIDEO, |
| 653 | CODEC_ID_VP6A, | 653 | CODEC_ID_VP6A, |
| 654 | sizeof(VP56Context), | 654 | sizeof(VP56Context), |
| 655 | vp6_decode_init, | 655 | vp6_decode_init, |
| @@ -610,7 +610,7 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx) · 609 unmodified lines | |||
| 610 | 610 | ||
| 611 | AVCodec vqa_decoder = { | 611 | AVCodec vqa_decoder = { |
| 612 | "vqavideo", | 612 | "vqavideo", |
| 613 | CODEC_TYPE_VIDEO, | 613 | AVMEDIA_TYPE_VIDEO, |
| 614 | CODEC_ID_WS_VQA, | 614 | CODEC_ID_WS_VQA, |
| 615 | sizeof(VqaContext), | 615 | sizeof(VqaContext), |
| 616 | vqa_decode_init, | 616 | vqa_decode_init, |
| @@ -1020,7 +1020,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, · 1019 unmodified lines | |||
| 1020 | 1020 | ||
| 1021 | AVCodec wavpack_decoder = { | 1021 | AVCodec wavpack_decoder = { |
| 1022 | "wavpack", | 1022 | "wavpack", |
| 1023 | CODEC_TYPE_AUDIO, | 1023 | AVMEDIA_TYPE_AUDIO, |
| 1024 | CODEC_ID_WAVPACK, | 1024 | CODEC_ID_WAVPACK, |
| 1025 | sizeof(WavpackContext), | 1025 | sizeof(WavpackContext), |
| 1026 | wavpack_decode_init, | 1026 | wavpack_decode_init, |
| @@ -942,7 +942,7 @@ static av_cold void flush(AVCodecContext *avctx) · 941 unmodified lines | |||
| 942 | AVCodec wmav1_decoder = | 942 | AVCodec wmav1_decoder = |
| 943 | { | 943 | { |
| 944 | "wmav1", | 944 | "wmav1", |
| 945 | CODEC_TYPE_AUDIO, | 945 | AVMEDIA_TYPE_AUDIO, |
| 946 | CODEC_ID_WMAV1, | 946 | CODEC_ID_WMAV1, |
| 947 | sizeof(WMACodecContext), | 947 | sizeof(WMACodecContext), |
| 948 | wma_decode_init, | 948 | wma_decode_init, |
| @@ -956,7 +956,7 @@ AVCodec wmav1_decoder = · 7 unmodified lines | |||
| 956 | AVCodec wmav2_decoder = | 956 | AVCodec wmav2_decoder = |
| 957 | { | 957 | { |
| 958 | "wmav2", | 958 | "wmav2", |
| 959 | CODEC_TYPE_AUDIO, | 959 | AVMEDIA_TYPE_AUDIO, |
| 960 | CODEC_ID_WMAV2, | 960 | CODEC_ID_WMAV2, |
| 961 | sizeof(WMACodecContext), | 961 | sizeof(WMACodecContext), |
| 962 | wma_decode_init, | 962 | wma_decode_init, |
| @@ -386,7 +386,7 @@ static int encode_superframe(AVCodecContext *avctx, · 385 unmodified lines | |||
| 386 | AVCodec wmav1_encoder = | 386 | AVCodec wmav1_encoder = |
| 387 | { | 387 | { |
| 388 | "wmav1", | 388 | "wmav1", |
| 389 | CODEC_TYPE_AUDIO, | 389 | AVMEDIA_TYPE_AUDIO, |
| 390 | CODEC_ID_WMAV1, | 390 | CODEC_ID_WMAV1, |
| 391 | sizeof(WMACodecContext), | 391 | sizeof(WMACodecContext), |
| 392 | encode_init, | 392 | encode_init, |
| @@ -399,7 +399,7 @@ AVCodec wmav1_encoder = · 6 unmodified lines | |||
| 399 | AVCodec wmav2_encoder = | 399 | AVCodec wmav2_encoder = |
| 400 | { | 400 | { |
| 401 | "wmav2", | 401 | "wmav2", |
| 402 | CODEC_TYPE_AUDIO, | 402 | AVMEDIA_TYPE_AUDIO, |
| 403 | CODEC_ID_WMAV2, | 403 | CODEC_ID_WMAV2, |
| 404 | sizeof(WMACodecContext), | 404 | sizeof(WMACodecContext), |
| 405 | encode_init, | 405 | encode_init, |
| @@ -1565,7 +1565,7 @@ static void flush(AVCodecContext *avctx) · 1564 unmodified lines | |||
| 1565 | */ | 1565 | */ |
| 1566 | AVCodec wmapro_decoder = { | 1566 | AVCodec wmapro_decoder = { |
| 1567 | "wmapro", | 1567 | "wmapro", |
| 1568 | CODEC_TYPE_AUDIO, | 1568 | AVMEDIA_TYPE_AUDIO, |
| 1569 | CODEC_ID_WMAPRO, | 1569 | CODEC_ID_WMAPRO, |
| 1570 | sizeof(WMAProDecodeCtx), | 1570 | sizeof(WMAProDecodeCtx), |
| 1571 | decode_init, | 1571 | decode_init, |
| @@ -1555,7 +1555,7 @@ static av_cold void wmavoice_flush(AVCodecContext *ctx) · 1554 unmodified lines | |||
| 1555 | 1555 | ||
| 1556 | AVCodec wmavoice_decoder = { | 1556 | AVCodec wmavoice_decoder = { |
| 1557 | "wmavoice", | 1557 | "wmavoice", |
| 1558 | CODEC_TYPE_AUDIO, | 1558 | AVMEDIA_TYPE_AUDIO, |
| 1559 | CODEC_ID_WMAVOICE, | 1559 | CODEC_ID_WMAVOICE, |
| 1560 | sizeof(WMAVoiceContext), | 1560 | sizeof(WMAVoiceContext), |
| 1561 | wmavoice_decode_init, | 1561 | wmavoice_decode_init, |
| @@ -486,7 +486,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) · 485 unmodified lines | |||
| 486 | 486 | ||
| 487 | AVCodec wmv2_decoder = { | 487 | AVCodec wmv2_decoder = { |
| 488 | "wmv2", | 488 | "wmv2", |
| 489 | CODEC_TYPE_VIDEO, | 489 | AVMEDIA_TYPE_VIDEO, |
| 490 | CODEC_ID_WMV2, | 490 | CODEC_ID_WMV2, |
| 491 | sizeof(Wmv2Context), | 491 | sizeof(Wmv2Context), |
| 492 | wmv2_decode_init, | 492 | wmv2_decode_init, |
| @@ -213,7 +213,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, · 212 unmodified lines | |||
| 213 | 213 | ||
| 214 | AVCodec wmv2_encoder = { | 214 | AVCodec wmv2_encoder = { |
| 215 | "wmv2", | 215 | "wmv2", |
| 216 | CODEC_TYPE_VIDEO, | 216 | AVMEDIA_TYPE_VIDEO, |
| 217 | CODEC_ID_WMV2, | 217 | CODEC_ID_WMV2, |
| 218 | sizeof(Wmv2Context), | 218 | sizeof(Wmv2Context), |
| 219 | wmv2_encode_init, | 219 | wmv2_encode_init, |
| @@ -156,7 +156,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 155 unmodified lines | |||
| 156 | 156 | ||
| 157 | AVCodec wnv1_decoder = { | 157 | AVCodec wnv1_decoder = { |
| 158 | "wnv1", | 158 | "wnv1", |
| 159 | CODEC_TYPE_VIDEO, | 159 | AVMEDIA_TYPE_VIDEO, |
| 160 | CODEC_ID_WNV1, | 160 | CODEC_ID_WNV1, |
| 161 | sizeof(WNV1Context), | 161 | sizeof(WNV1Context), |
| 162 | decode_init, | 162 | decode_init, |
| @@ -147,7 +147,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | AVCodec ws_snd1_decoder = { | 148 | AVCodec ws_snd1_decoder = { |
| 149 | "ws_snd1", | 149 | "ws_snd1", |
| 150 | CODEC_TYPE_AUDIO, | 150 | AVMEDIA_TYPE_AUDIO, |
| 151 | CODEC_ID_WESTWOOD_SND1, | 151 | CODEC_ID_WESTWOOD_SND1, |
| 152 | 0, | 152 | 0, |
| 153 | ws_snd_decode_init, | 153 | ws_snd_decode_init, |
| @@ -417,7 +417,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) · 416 unmodified lines | |||
| 417 | 417 | ||
| 418 | AVCodec xan_wc3_decoder = { | 418 | AVCodec xan_wc3_decoder = { |
| 419 | "xan_wc3", | 419 | "xan_wc3", |
| 420 | CODEC_TYPE_VIDEO, | 420 | AVMEDIA_TYPE_VIDEO, |
| 421 | CODEC_ID_XAN_WC3, | 421 | CODEC_ID_XAN_WC3, |
| 422 | sizeof(XanContext), | 422 | sizeof(XanContext), |
| 423 | xan_decode_init, | 423 | xan_decode_init, |
| @@ -431,7 +431,7 @@ AVCodec xan_wc3_decoder = { · 7 unmodified lines | |||
| 431 | /* | 431 | /* |
| 432 | AVCodec xan_wc4_decoder = { | 432 | AVCodec xan_wc4_decoder = { |
| 433 | "xan_wc4", | 433 | "xan_wc4", |
| 434 | CODEC_TYPE_VIDEO, | 434 | AVMEDIA_TYPE_VIDEO, |
| 435 | CODEC_ID_XAN_WC4, | 435 | CODEC_ID_XAN_WC4, |
| 436 | sizeof(XanContext), | 436 | sizeof(XanContext), |
| 437 | xan_decode_init, | 437 | xan_decode_init, |
| @@ -140,7 +140,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | AVCodec xl_decoder = { | 141 | AVCodec xl_decoder = { |
| 142 | "xl", | 142 | "xl", |
| 143 | CODEC_TYPE_VIDEO, | 143 | AVMEDIA_TYPE_VIDEO, |
| 144 | CODEC_ID_VIXL, | 144 | CODEC_ID_VIXL, |
| 145 | sizeof(VideoXLContext), | 145 | sizeof(VideoXLContext), |
| 146 | decode_init, | 146 | decode_init, |
| @@ -132,7 +132,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 131 unmodified lines | |||
| 132 | 132 | ||
| 133 | AVCodec xsub_decoder = { | 133 | AVCodec xsub_decoder = { |
| 134 | "xsub", | 134 | "xsub", |
| 135 | CODEC_TYPE_SUBTITLE, | 135 | AVMEDIA_TYPE_SUBTITLE, |
| 136 | CODEC_ID_XSUB, | 136 | CODEC_ID_XSUB, |
| 137 | 0, | 137 | 0, |
| 138 | decode_init, | 138 | decode_init, |
| @@ -212,7 +212,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) · 211 unmodified lines | |||
| 212 | 212 | ||
| 213 | AVCodec xsub_encoder = { | 213 | AVCodec xsub_encoder = { |
| 214 | "xsub", | 214 | "xsub", |
| 215 | CODEC_TYPE_SUBTITLE, | 215 | AVMEDIA_TYPE_SUBTITLE, |
| 216 | CODEC_ID_XSUB, | 216 | CODEC_ID_XSUB, |
| 217 | 0, | 217 | 0, |
| 218 | xsub_encoder_init, | 218 | xsub_encoder_init, |
| @@ -249,7 +249,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 248 unmodified lines | |||
| 249 | 249 | ||
| 250 | AVCodec yop_decoder = { | 250 | AVCodec yop_decoder = { |
| 251 | "yop", | 251 | "yop", |
| 252 | CODEC_TYPE_VIDEO, | 252 | AVMEDIA_TYPE_VIDEO, |
| 253 | CODEC_ID_YOP, | 253 | CODEC_ID_YOP, |
| 254 | sizeof(YopDecContext), | 254 | sizeof(YopDecContext), |
| 255 | yop_decode_init, | 255 | yop_decode_init, |
| @@ -654,7 +654,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 653 unmodified lines | |||
| 654 | 654 | ||
| 655 | AVCodec zmbv_decoder = { | 655 | AVCodec zmbv_decoder = { |
| 656 | "zmbv", | 656 | "zmbv", |
| 657 | CODEC_TYPE_VIDEO, | 657 | AVMEDIA_TYPE_VIDEO, |
| 658 | CODEC_ID_ZMBV, | 658 | CODEC_ID_ZMBV, |
| 659 | sizeof(ZmbvContext), | 659 | sizeof(ZmbvContext), |
| 660 | decode_init, | 660 | decode_init, |
| @@ -325,7 +325,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 324 unmodified lines | |||
| 325 | 325 | ||
| 326 | AVCodec zmbv_encoder = { | 326 | AVCodec zmbv_encoder = { |
| 327 | "zmbv", | 327 | "zmbv", |
| 328 | CODEC_TYPE_VIDEO, | 328 | AVMEDIA_TYPE_VIDEO, |
| 329 | CODEC_ID_ZMBV, | 329 | CODEC_ID_ZMBV, |
| 330 | sizeof(ZmbvEncContext), | 330 | sizeof(ZmbvEncContext), |
| 331 | encode_init, | 331 | encode_init, |
| @@ -111,7 +111,7 @@ static av_cold int audio_read_header(AVFormatContext *s1, · 110 unmodified lines | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | /* take real parameters */ | 113 | /* take real parameters */ |
| 114 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 114 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 115 | st->codec->codec_id = codec_id; | 115 | st->codec->codec_id = codec_id; |
| 116 | st->codec->sample_rate = sample_rate; | 116 | st->codec->sample_rate = sample_rate; |
| 117 | st->codec->channels = ap->channels; | 117 | st->codec->channels = ap->channels; |
| @@ -269,7 +269,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 268 unmodified lines | |||
| 269 | s->frame_rate_base = frame_rate_base; | 269 | s->frame_rate_base = frame_rate_base; |
| 270 | s->per_frame = ((uint64_t)1000000 * s->frame_rate_base) / s->frame_rate; | 270 | s->per_frame = ((uint64_t)1000000 * s->frame_rate_base) / s->frame_rate; |
| 271 | 271 | ||
| 272 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 272 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 273 | st->codec->pix_fmt = PIX_FMT_YUV420P; | 273 | st->codec->pix_fmt = PIX_FMT_YUV420P; |
| 274 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 274 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 275 | st->codec->width = width; | 275 | st->codec->width = width; |
| @@ -237,7 +237,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param · 236 unmodified lines | |||
| 237 | return AVERROR(ENOMEM); | 237 | return AVERROR(ENOMEM); |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | stream->codec->codec_type = CODEC_TYPE_AUDIO; | 240 | stream->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 241 | #if HAVE_BIGENDIAN | 241 | #if HAVE_BIGENDIAN |
| 242 | stream->codec->codec_id = CODEC_ID_PCM_F32BE; | 242 | stream->codec->codec_id = CODEC_ID_PCM_F32BE; |
| 243 | #else | 243 | #else |
| @@ -117,7 +117,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap, · 116 unmodified lines | |||
| 117 | if (!vst) | 117 | if (!vst) |
| 118 | goto out; | 118 | goto out; |
| 119 | av_set_pts_info(vst, 64, 1, 1000); | 119 | av_set_pts_info(vst, 64, 1, 1000); |
| 120 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 120 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 121 | vst->codec->codec_id = CODEC_ID_RAWVIDEO; | 121 | vst->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 122 | vst->codec->time_base.den = fps->frame_rate; | 122 | vst->codec->time_base.den = fps->frame_rate; |
| 123 | vst->codec->time_base.num = 1000; | 123 | vst->codec->time_base.num = 1000; |
| @@ -232,7 +232,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 231 unmodified lines | |||
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | /* take real parameters */ | 234 | /* take real parameters */ |
| 235 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 235 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 236 | st->codec->codec_id = s->codec_id; | 236 | st->codec->codec_id = s->codec_id; |
| 237 | st->codec->sample_rate = s->sample_rate; | 237 | st->codec->sample_rate = s->sample_rate; |
| 238 | st->codec->channels = s->channels; | 238 | st->codec->channels = s->channels; |
| @@ -242,7 +242,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 241 unmodified lines | |||
| 242 | 242 | ||
| 243 | s->fd = video_fd; | 243 | s->fd = video_fd; |
| 244 | 244 | ||
| 245 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 245 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 246 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 246 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 247 | st->codec->width = s->video_win.width; | 247 | st->codec->width = s->video_win.width; |
| 248 | st->codec->height = s->video_win.height; | 248 | st->codec->height = s->video_win.height; |
| @@ -646,7 +646,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 645 unmodified lines | |||
| 646 | } | 646 | } |
| 647 | s->top_field_first = first_field(s->fd); | 647 | s->top_field_first = first_field(s->fd); |
| 648 | 648 | ||
| 649 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 649 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 650 | st->codec->codec_id = codec_id; | 650 | st->codec->codec_id = codec_id; |
| 651 | st->codec->width = width; | 651 | st->codec->width = width; |
| 652 | st->codec->height = height; | 652 | st->codec->height = height; |
| @@ -353,7 +353,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 352 unmodified lines | |||
| 353 | 353 | ||
| 354 | codec = st->codec; | 354 | codec = st->codec; |
| 355 | codec->time_base = ap->time_base; | 355 | codec->time_base = ap->time_base; |
| 356 | codec->codec_type = CODEC_TYPE_VIDEO; | 356 | codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 357 | codec->width = width; | 357 | codec->width = width; |
| 358 | codec->height = height; | 358 | codec->height = height; |
| 359 | codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount); | 359 | codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount); |
| @@ -226,7 +226,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 225 unmodified lines | |||
| 226 | x11grab->image = image; | 226 | x11grab->image = image; |
| 227 | x11grab->use_shm = use_shm; | 227 | x11grab->use_shm = use_shm; |
| 228 | 228 | ||
| 229 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 229 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 230 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 230 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 231 | st->codec->width = ap->width; | 231 | st->codec->width = ap->width; |
| 232 | st->codec->height = ap->height; | 232 | st->codec->height = ap->height; |
| @@ -280,7 +280,7 @@ struct AVFilterPad · 279 unmodified lines | |||
| 280 | * AVFilterPad type. Only video supported now, hopefully someone will | 280 | * AVFilterPad type. Only video supported now, hopefully someone will |
| 281 | * add audio in the future. | 281 | * add audio in the future. |
| 282 | */ | 282 | */ |
| 283 | enum CodecType type; | 283 | enum AVMediaType type; |
| 284 | 284 | ||
| 285 | /** | 285 | /** |
| 286 | * Minimum required permissions on incoming buffers. Any buffer with | 286 | * Minimum required permissions on incoming buffers. Any buffer with |
| @@ -86,7 +86,7 @@ AVFilter avfilter_vf_aspect = { · 85 unmodified lines | |||
| 86 | .priv_size = sizeof(AspectContext), | 86 | .priv_size = sizeof(AspectContext), |
| 87 | 87 | ||
| 88 | .inputs = (AVFilterPad[]) {{ .name = "default", | 88 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 89 | .type = CODEC_TYPE_VIDEO, | 89 | .type = AVMEDIA_TYPE_VIDEO, |
| 90 | .config_props = frameaspect_config_props, | 90 | .config_props = frameaspect_config_props, |
| 91 | .get_video_buffer = avfilter_null_get_video_buffer, | 91 | .get_video_buffer = avfilter_null_get_video_buffer, |
| 92 | .start_frame = start_frame, | 92 | .start_frame = start_frame, |
| @@ -94,7 +94,7 @@ AVFilter avfilter_vf_aspect = { · 1 unmodified line | |||
| 94 | { .name = NULL}}, | 94 | { .name = NULL}}, |
| 95 | 95 | ||
| 96 | .outputs = (AVFilterPad[]) {{ .name = "default", | 96 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 97 | .type = CODEC_TYPE_VIDEO, }, | 97 | .type = AVMEDIA_TYPE_VIDEO, }, |
| 98 | { .name = NULL}}, | 98 | { .name = NULL}}, |
| 99 | }; | 99 | }; |
| 100 | #endif /* CONFIG_ASPECT_FILTER */ | 100 | #endif /* CONFIG_ASPECT_FILTER */ |
| @@ -109,14 +109,14 @@ AVFilter avfilter_vf_pixelaspect = { · 8 unmodified lines | |||
| 109 | .priv_size = sizeof(AspectContext), | 109 | .priv_size = sizeof(AspectContext), |
| 110 | 110 | ||
| 111 | .inputs = (AVFilterPad[]) {{ .name = "default", | 111 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 112 | .type = CODEC_TYPE_VIDEO, | 112 | .type = AVMEDIA_TYPE_VIDEO, |
| 113 | .get_video_buffer = avfilter_null_get_video_buffer, | 113 | .get_video_buffer = avfilter_null_get_video_buffer, |
| 114 | .start_frame = start_frame, | 114 | .start_frame = start_frame, |
| 115 | .end_frame = avfilter_null_end_frame }, | 115 | .end_frame = avfilter_null_end_frame }, |
| 116 | { .name = NULL}}, | 116 | { .name = NULL}}, |
| 117 | 117 | ||
| 118 | .outputs = (AVFilterPad[]) {{ .name = "default", | 118 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 119 | .type = CODEC_TYPE_VIDEO, }, | 119 | .type = AVMEDIA_TYPE_VIDEO, }, |
| 120 | { .name = NULL}}, | 120 | { .name = NULL}}, |
| 121 | }; | 121 | }; |
| 122 | #endif /* CONFIG_PIXELASPECT_FILTER */ | 122 | #endif /* CONFIG_PIXELASPECT_FILTER */ |
| @@ -214,14 +214,14 @@ AVFilter avfilter_vf_crop = { · 213 unmodified lines | |||
| 214 | .init = init, | 214 | .init = init, |
| 215 | 215 | ||
| 216 | .inputs = (AVFilterPad[]) {{ .name = "default", | 216 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 217 | .type = CODEC_TYPE_VIDEO, | 217 | .type = AVMEDIA_TYPE_VIDEO, |
| 218 | .start_frame = start_frame, | 218 | .start_frame = start_frame, |
| 219 | .draw_slice = draw_slice, | 219 | .draw_slice = draw_slice, |
| 220 | .get_video_buffer = avfilter_null_get_video_buffer, | 220 | .get_video_buffer = avfilter_null_get_video_buffer, |
| 221 | .config_props = config_input, }, | 221 | .config_props = config_input, }, |
| 222 | { .name = NULL}}, | 222 | { .name = NULL}}, |
| 223 | .outputs = (AVFilterPad[]) {{ .name = "default", | 223 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 224 | .type = CODEC_TYPE_VIDEO, | 224 | .type = AVMEDIA_TYPE_VIDEO, |
| 225 | .config_props = config_output, }, | 225 | .config_props = config_output, }, |
| 226 | { .name = NULL}}, | 226 | { .name = NULL}}, |
| 227 | }; | 227 | }; |
| @@ -103,14 +103,14 @@ AVFilter avfilter_vf_format = { · 102 unmodified lines | |||
| 103 | .priv_size = sizeof(FormatContext), | 103 | .priv_size = sizeof(FormatContext), |
| 104 | 104 | ||
| 105 | .inputs = (AVFilterPad[]) {{ .name = "default", | 105 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 106 | .type = CODEC_TYPE_VIDEO, | 106 | .type = AVMEDIA_TYPE_VIDEO, |
| 107 | .get_video_buffer= avfilter_null_get_video_buffer, | 107 | .get_video_buffer= avfilter_null_get_video_buffer, |
| 108 | .start_frame = avfilter_null_start_frame, | 108 | .start_frame = avfilter_null_start_frame, |
| 109 | .draw_slice = avfilter_null_draw_slice, | 109 | .draw_slice = avfilter_null_draw_slice, |
| 110 | .end_frame = avfilter_null_end_frame, }, | 110 | .end_frame = avfilter_null_end_frame, }, |
| 111 | { .name = NULL}}, | 111 | { .name = NULL}}, |
| 112 | .outputs = (AVFilterPad[]) {{ .name = "default", | 112 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 113 | .type = CODEC_TYPE_VIDEO }, | 113 | .type = AVMEDIA_TYPE_VIDEO }, |
| 114 | { .name = NULL}}, | 114 | { .name = NULL}}, |
| 115 | }; | 115 | }; |
| 116 | #endif /* CONFIG_FORMAT_FILTER */ | 116 | #endif /* CONFIG_FORMAT_FILTER */ |
| @@ -133,14 +133,14 @@ AVFilter avfilter_vf_noformat = { · 16 unmodified lines | |||
| 133 | .priv_size = sizeof(FormatContext), | 133 | .priv_size = sizeof(FormatContext), |
| 134 | 134 | ||
| 135 | .inputs = (AVFilterPad[]) {{ .name = "default", | 135 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 136 | .type = CODEC_TYPE_VIDEO, | 136 | .type = AVMEDIA_TYPE_VIDEO, |
| 137 | .get_video_buffer= avfilter_null_get_video_buffer, | 137 | .get_video_buffer= avfilter_null_get_video_buffer, |
| 138 | .start_frame = avfilter_null_start_frame, | 138 | .start_frame = avfilter_null_start_frame, |
| 139 | .draw_slice = avfilter_null_draw_slice, | 139 | .draw_slice = avfilter_null_draw_slice, |
| 140 | .end_frame = avfilter_null_end_frame, }, | 140 | .end_frame = avfilter_null_end_frame, }, |
| 141 | { .name = NULL}}, | 141 | { .name = NULL}}, |
| 142 | .outputs = (AVFilterPad[]) {{ .name = "default", | 142 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 143 | .type = CODEC_TYPE_VIDEO }, | 143 | .type = AVMEDIA_TYPE_VIDEO }, |
| 144 | { .name = NULL}}, | 144 | { .name = NULL}}, |
| 145 | }; | 145 | }; |
| 146 | #endif /* CONFIG_NOFORMAT_FILTER */ | 146 | #endif /* CONFIG_NOFORMAT_FILTER */ |
| @@ -30,13 +30,13 @@ AVFilter avfilter_vf_null = { · 29 unmodified lines | |||
| 30 | .priv_size = 0, | 30 | .priv_size = 0, |
| 31 | 31 | ||
| 32 | .inputs = (AVFilterPad[]) {{ .name = "default", | 32 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 33 | .type = CODEC_TYPE_VIDEO, | 33 | .type = AVMEDIA_TYPE_VIDEO, |
| 34 | .get_video_buffer = avfilter_null_get_video_buffer, | 34 | .get_video_buffer = avfilter_null_get_video_buffer, |
| 35 | .start_frame = avfilter_null_start_frame, | 35 | .start_frame = avfilter_null_start_frame, |
| 36 | .end_frame = avfilter_null_end_frame }, | 36 | .end_frame = avfilter_null_end_frame }, |
| 37 | { .name = NULL}}, | 37 | { .name = NULL}}, |
| 38 | 38 | ||
| 39 | .outputs = (AVFilterPad[]) {{ .name = "default", | 39 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 40 | .type = CODEC_TYPE_VIDEO, }, | 40 | .type = AVMEDIA_TYPE_VIDEO, }, |
| 41 | { .name = NULL}}, | 41 | { .name = NULL}}, |
| 42 | }; | 42 | }; |
| @@ -197,13 +197,13 @@ AVFilter avfilter_vf_scale = { · 196 unmodified lines | |||
| 197 | .priv_size = sizeof(ScaleContext), | 197 | .priv_size = sizeof(ScaleContext), |
| 198 | 198 | ||
| 199 | .inputs = (AVFilterPad[]) {{ .name = "default", | 199 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 200 | .type = CODEC_TYPE_VIDEO, | 200 | .type = AVMEDIA_TYPE_VIDEO, |
| 201 | .start_frame = start_frame, | 201 | .start_frame = start_frame, |
| 202 | .draw_slice = draw_slice, | 202 | .draw_slice = draw_slice, |
| 203 | .min_perms = AV_PERM_READ, }, | 203 | .min_perms = AV_PERM_READ, }, |
| 204 | { .name = NULL}}, | 204 | { .name = NULL}}, |
| 205 | .outputs = (AVFilterPad[]) {{ .name = "default", | 205 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 206 | .type = CODEC_TYPE_VIDEO, | 206 | .type = AVMEDIA_TYPE_VIDEO, |
| 207 | .config_props = config_props, }, | 207 | .config_props = config_props, }, |
| 208 | { .name = NULL}}, | 208 | { .name = NULL}}, |
| 209 | }; | 209 | }; |
| @@ -104,7 +104,7 @@ AVFilter avfilter_vf_slicify = { · 103 unmodified lines | |||
| 104 | .priv_size = sizeof(SliceContext), | 104 | .priv_size = sizeof(SliceContext), |
| 105 | 105 | ||
| 106 | .inputs = (AVFilterPad[]) {{ .name = "default", | 106 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 107 | .type = CODEC_TYPE_VIDEO, | 107 | .type = AVMEDIA_TYPE_VIDEO, |
| 108 | .get_video_buffer = avfilter_null_get_video_buffer, | 108 | .get_video_buffer = avfilter_null_get_video_buffer, |
| 109 | .start_frame = start_frame, | 109 | .start_frame = start_frame, |
| 110 | .draw_slice = draw_slice, | 110 | .draw_slice = draw_slice, |
| @@ -112,6 +112,6 @@ AVFilter avfilter_vf_slicify = { · 1 unmodified line | |||
| 112 | .end_frame = avfilter_null_end_frame, }, | 112 | .end_frame = avfilter_null_end_frame, }, |
| 113 | { .name = NULL}}, | 113 | { .name = NULL}}, |
| 114 | .outputs = (AVFilterPad[]) {{ .name = "default", | 114 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 115 | .type = CODEC_TYPE_VIDEO, }, | 115 | .type = AVMEDIA_TYPE_VIDEO, }, |
| 116 | { .name = NULL}}, | 116 | { .name = NULL}}, |
| 117 | }; | 117 | }; |
| @@ -91,7 +91,7 @@ AVFilter avfilter_vf_vflip = { · 90 unmodified lines | |||
| 91 | .priv_size = sizeof(FlipContext), | 91 | .priv_size = sizeof(FlipContext), |
| 92 | 92 | ||
| 93 | .inputs = (AVFilterPad[]) {{ .name = "default", | 93 | .inputs = (AVFilterPad[]) {{ .name = "default", |
| 94 | .type = CODEC_TYPE_VIDEO, | 94 | .type = AVMEDIA_TYPE_VIDEO, |
| 95 | .get_video_buffer = get_video_buffer, | 95 | .get_video_buffer = get_video_buffer, |
| 96 | .start_frame = start_frame, | 96 | .start_frame = start_frame, |
| 97 | .draw_slice = draw_slice, | 97 | .draw_slice = draw_slice, |
| @@ -99,6 +99,6 @@ AVFilter avfilter_vf_vflip = { · 1 unmodified line | |||
| 99 | .config_props = config_input, }, | 99 | .config_props = config_input, }, |
| 100 | { .name = NULL}}, | 100 | { .name = NULL}}, |
| 101 | .outputs = (AVFilterPad[]) {{ .name = "default", | 101 | .outputs = (AVFilterPad[]) {{ .name = "default", |
| 102 | .type = CODEC_TYPE_VIDEO, }, | 102 | .type = AVMEDIA_TYPE_VIDEO, }, |
| 103 | { .name = NULL}}, | 103 | { .name = NULL}}, |
| 104 | }; | 104 | }; |
| @@ -35,7 +35,7 @@ AVFilter avfilter_vsink_nullsink = { · 34 unmodified lines | |||
| 35 | .inputs = (AVFilterPad[]) { | 35 | .inputs = (AVFilterPad[]) { |
| 36 | { | 36 | { |
| 37 | .name = "default", | 37 | .name = "default", |
| 38 | .type = CODEC_TYPE_VIDEO, | 38 | .type = AVMEDIA_TYPE_VIDEO, |
| 39 | .start_frame = start_frame, | 39 | .start_frame = start_frame, |
| 40 | .end_frame = end_frame, | 40 | .end_frame = end_frame, |
| 41 | }, | 41 | }, |
| @@ -74,7 +74,7 @@ AVFilter avfilter_vsrc_nullsrc = { · 73 unmodified lines | |||
| 74 | .outputs = (AVFilterPad[]) { | 74 | .outputs = (AVFilterPad[]) { |
| 75 | { | 75 | { |
| 76 | .name = "default", | 76 | .name = "default", |
| 77 | .type = CODEC_TYPE_VIDEO, | 77 | .type = AVMEDIA_TYPE_VIDEO, |
| 78 | .config_props = config_props, | 78 | .config_props = config_props, |
| 79 | .request_frame = request_frame, | 79 | .request_frame = request_frame, |
| 80 | }, | 80 | }, |
| @@ -149,7 +149,7 @@ static int fourxm_read_header(AVFormatContext *s, · 148 unmodified lines | |||
| 149 | 149 | ||
| 150 | fourxm->video_stream_index = st->index; | 150 | fourxm->video_stream_index = st->index; |
| 151 | 151 | ||
| 152 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 152 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 153 | st->codec->codec_id = CODEC_ID_4XM; | 153 | st->codec->codec_id = CODEC_ID_4XM; |
| 154 | st->codec->extradata_size = 4; | 154 | st->codec->extradata_size = 4; |
| 155 | st->codec->extradata = av_malloc(4); | 155 | st->codec->extradata = av_malloc(4); |
| @@ -198,7 +198,7 @@ static int fourxm_read_header(AVFormatContext *s, · 42 unmodified lines | |||
| 198 | 198 | ||
| 199 | fourxm->tracks[current_track].stream_index = st->index; | 199 | fourxm->tracks[current_track].stream_index = st->index; |
| 200 | 200 | ||
| 201 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 201 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 202 | st->codec->codec_tag = 0; | 202 | st->codec->codec_tag = 0; |
| 203 | st->codec->channels = fourxm->tracks[current_track].channels; | 203 | st->codec->channels = fourxm->tracks[current_track].channels; |
| 204 | st->codec->sample_rate = fourxm->tracks[current_track].sample_rate; | 204 | st->codec->sample_rate = fourxm->tracks[current_track].sample_rate; |
| @@ -71,7 +71,7 @@ static int aea_read_header(AVFormatContext *s, · 70 unmodified lines | |||
| 71 | url_fskip(s->pb, 1783); | 71 | url_fskip(s->pb, 1783); |
| 72 | 72 | ||
| 73 | 73 | ||
| 74 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 74 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 75 | st->codec->codec_id = CODEC_ID_ATRAC1; | 75 | st->codec->codec_id = CODEC_ID_ATRAC1; |
| 76 | st->codec->sample_rate = 44100; | 76 | st->codec->sample_rate = 44100; |
| 77 | st->codec->bit_rate = 292000; | 77 | st->codec->bit_rate = 292000; |
| @@ -92,7 +92,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec, · 91 unmodified lines | |||
| 92 | 92 | ||
| 93 | if (size & 1) | 93 | if (size & 1) |
| 94 | size++; | 94 | size++; |
| 95 | codec->codec_type = CODEC_TYPE_AUDIO; | 95 | codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 96 | codec->channels = get_be16(pb); | 96 | codec->channels = get_be16(pb); |
| 97 | num_frames = get_be32(pb); | 97 | num_frames = get_be32(pb); |
| 98 | codec->bits_per_coded_sample = get_be16(pb); | 98 | codec->bits_per_coded_sample = get_be16(pb); |
| @@ -108,7 +108,7 @@ static int amr_read_header(AVFormatContext *s, · 107 unmodified lines | |||
| 108 | st->codec->sample_rate = 8000; | 108 | st->codec->sample_rate = 8000; |
| 109 | } | 109 | } |
| 110 | st->codec->channels = 1; | 110 | st->codec->channels = 1; |
| 111 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 111 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 112 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); | 112 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
| 113 | 113 | ||
| 114 | return 0; | 114 | return 0; |
| @@ -100,7 +100,7 @@ static int read_header(AVFormatContext *s, · 99 unmodified lines | |||
| 100 | st = av_new_stream(s, 0); | 100 | st = av_new_stream(s, 0); |
| 101 | if (!st) | 101 | if (!st) |
| 102 | return AVERROR(ENOMEM); | 102 | return AVERROR(ENOMEM); |
| 103 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 103 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 104 | st->codec->codec_id = CODEC_ID_ANM; | 104 | st->codec->codec_id = CODEC_ID_ANM; |
| 105 | st->codec->codec_tag = 0; /* no fourcc */ | 105 | st->codec->codec_tag = 0; /* no fourcc */ |
| 106 | st->codec->width = get_le16(pb); | 106 | st->codec->width = get_le16(pb); |
| @@ -43,7 +43,7 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 42 unmodified lines | |||
| 43 | if (!st) | 43 | if (!st) |
| 44 | return AVERROR(ENOMEM); | 44 | return AVERROR(ENOMEM); |
| 45 | 45 | ||
| 46 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 46 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 47 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS; | 47 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS; |
| 48 | 48 | ||
| 49 | get_le32(pb); /* number of samples */ | 49 | get_le32(pb); /* number of samples */ |
| @@ -301,7 +301,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) · 300 unmodified lines | |||
| 301 | 301 | ||
| 302 | total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks; | 302 | total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks; |
| 303 | 303 | ||
| 304 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 304 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 305 | st->codec->codec_id = CODEC_ID_APE; | 305 | st->codec->codec_id = CODEC_ID_APE; |
| 306 | st->codec->codec_tag = MKTAG('A', 'P', 'E', ' '); | 306 | st->codec->codec_tag = MKTAG('A', 'P', 'E', ' '); |
| 307 | st->codec->channels = ape->channels; | 307 | st->codec->channels = ape->channels; |
| @@ -236,7 +236,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 235 unmodified lines | |||
| 236 | asf->hdr.max_bitrate = get_le32(pb); | 236 | asf->hdr.max_bitrate = get_le32(pb); |
| 237 | s->packet_size = asf->hdr.max_pktsize; | 237 | s->packet_size = asf->hdr.max_pktsize; |
| 238 | } else if (!guidcmp(&g, &ff_asf_stream_header)) { | 238 | } else if (!guidcmp(&g, &ff_asf_stream_header)) { |
| 239 | enum CodecType type; | 239 | enum AVMediaType type; |
| 240 | int type_specific_size, sizeX; | 240 | int type_specific_size, sizeX; |
| 241 | uint64_t total_size; | 241 | uint64_t total_size; |
| 242 | unsigned int tag1; | 242 | unsigned int tag1; |
| @@ -265,14 +265,14 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 22 unmodified lines | |||
| 265 | 265 | ||
| 266 | test_for_ext_stream_audio = 0; | 266 | test_for_ext_stream_audio = 0; |
| 267 | if (!guidcmp(&g, &ff_asf_audio_stream)) { | 267 | if (!guidcmp(&g, &ff_asf_audio_stream)) { |
| 268 | type = CODEC_TYPE_AUDIO; | 268 | type = AVMEDIA_TYPE_AUDIO; |
| 269 | } else if (!guidcmp(&g, &ff_asf_video_stream)) { | 269 | } else if (!guidcmp(&g, &ff_asf_video_stream)) { |
| 270 | type = CODEC_TYPE_VIDEO; | 270 | type = AVMEDIA_TYPE_VIDEO; |
| 271 | } else if (!guidcmp(&g, &ff_asf_command_stream)) { | 271 | } else if (!guidcmp(&g, &ff_asf_command_stream)) { |
| 272 | type = CODEC_TYPE_DATA; | 272 | type = AVMEDIA_TYPE_DATA; |
| 273 | } else if (!guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) { | 273 | } else if (!guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) { |
| 274 | test_for_ext_stream_audio = 1; | 274 | test_for_ext_stream_audio = 1; |
| 275 | type = CODEC_TYPE_UNKNOWN; | 275 | type = AVMEDIA_TYPE_UNKNOWN; |
| 276 | } else { | 276 | } else { |
| 277 | return -1; | 277 | return -1; |
| 278 | } | 278 | } |
| @@ -289,7 +289,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 10 unmodified lines | |||
| 289 | if (test_for_ext_stream_audio) { | 289 | if (test_for_ext_stream_audio) { |
| 290 | get_guid(pb, &g); | 290 | get_guid(pb, &g); |
| 291 | if (!guidcmp(&g, &ff_asf_ext_stream_audio_stream)) { | 291 | if (!guidcmp(&g, &ff_asf_ext_stream_audio_stream)) { |
| 292 | type = CODEC_TYPE_AUDIO; | 292 | type = AVMEDIA_TYPE_AUDIO; |
| 293 | is_dvr_ms_audio=1; | 293 | is_dvr_ms_audio=1; |
| 294 | get_guid(pb, &g); | 294 | get_guid(pb, &g); |
| 295 | get_le32(pb); | 295 | get_le32(pb); |
| @@ -301,7 +301,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines | |||
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | st->codec->codec_type = type; | 303 | st->codec->codec_type = type; |
| 304 | if (type == CODEC_TYPE_AUDIO) { | 304 | if (type == AVMEDIA_TYPE_AUDIO) { |
| 305 | ff_get_wav_header(pb, st->codec, type_specific_size); | 305 | ff_get_wav_header(pb, st->codec, type_specific_size); |
| 306 | if (is_dvr_ms_audio) { | 306 | if (is_dvr_ms_audio) { |
| 307 | // codec_id and codec_tag are unreliable in dvr_ms | 307 | // codec_id and codec_tag are unreliable in dvr_ms |
| @@ -351,7 +351,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 43 unmodified lines | |||
| 351 | st->codec->frame_size = 1; | 351 | st->codec->frame_size = 1; |
| 352 | break; | 352 | break; |
| 353 | } | 353 | } |
| 354 | } else if (type == CODEC_TYPE_VIDEO) { | 354 | } else if (type == AVMEDIA_TYPE_VIDEO) { |
| 355 | get_le32(pb); | 355 | get_le32(pb); |
| 356 | get_le32(pb); | 356 | get_le32(pb); |
| 357 | get_byte(pb); | 357 | get_byte(pb); |
| @@ -889,8 +889,8 @@ static int ff_asf_parse_packet(AVFormatContext *s, ByteIOContext *pb, AVPacket * · 531 unmodified lines | |||
| 889 | asf_st->packet_pos= asf->packet_pos; | 889 | asf_st->packet_pos= asf->packet_pos; |
| 890 | //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n", | 890 | //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n", |
| 891 | //asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY, | 891 | //asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY, |
| 892 | //s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO, asf->packet_obj_size); | 892 | //s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size); |
| 893 | if (s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO) | 893 | if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 894 | asf->packet_key_frame = 1; | 894 | asf->packet_key_frame = 1; |
| 895 | if (asf->packet_key_frame) | 895 | if (asf->packet_key_frame) |
| 896 | asf_st->pkt.flags |= PKT_FLAG_KEY; | 896 | asf_st->pkt.flags |= PKT_FLAG_KEY; |
| @@ -375,13 +375,13 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 374 unmodified lines | |||
| 375 | 375 | ||
| 376 | 376 | ||
| 377 | switch(enc->codec_type) { | 377 | switch(enc->codec_type) { |
| 378 | case CODEC_TYPE_AUDIO: | 378 | case AVMEDIA_TYPE_AUDIO: |
| 379 | wav_extra_size = 0; | 379 | wav_extra_size = 0; |
| 380 | extra_size = 18 + wav_extra_size; | 380 | extra_size = 18 + wav_extra_size; |
| 381 | extra_size2 = 8; | 381 | extra_size2 = 8; |
| 382 | break; | 382 | break; |
| 383 | default: | 383 | default: |
| 384 | case CODEC_TYPE_VIDEO: | 384 | case AVMEDIA_TYPE_VIDEO: |
| 385 | wav_extra_size = enc->extradata_size; | 385 | wav_extra_size = enc->extradata_size; |
| 386 | extra_size = 0x33 + wav_extra_size; | 386 | extra_size = 0x33 + wav_extra_size; |
| 387 | extra_size2 = 0; | 387 | extra_size2 = 0; |
| @@ -389,7 +389,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 1 unmodified line | |||
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | hpos = put_header(pb, &ff_asf_stream_header); | 391 | hpos = put_header(pb, &ff_asf_stream_header); |
| 392 | if (enc->codec_type == CODEC_TYPE_AUDIO) { | 392 | if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 393 | put_guid(pb, &ff_asf_audio_stream); | 393 | put_guid(pb, &ff_asf_audio_stream); |
| 394 | put_guid(pb, &ff_asf_audio_conceal_spread); | 394 | put_guid(pb, &ff_asf_audio_conceal_spread); |
| 395 | } else { | 395 | } else { |
| @@ -403,7 +403,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 7 unmodified lines | |||
| 403 | put_le16(pb, n + 1); /* stream number */ | 403 | put_le16(pb, n + 1); /* stream number */ |
| 404 | put_le32(pb, 0); /* ??? */ | 404 | put_le32(pb, 0); /* ??? */ |
| 405 | 405 | ||
| 406 | if (enc->codec_type == CODEC_TYPE_AUDIO) { | 406 | if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 407 | /* WAVEFORMATEX header */ | 407 | /* WAVEFORMATEX header */ |
| 408 | int wavsize = ff_put_wav_header(pb, enc); | 408 | int wavsize = ff_put_wav_header(pb, enc); |
| 409 | if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) { | 409 | if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) { |
| @@ -457,9 +457,9 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 47 unmodified lines | |||
| 457 | enc = s->streams[n]->codec; | 457 | enc = s->streams[n]->codec; |
| 458 | p = avcodec_find_encoder(enc->codec_id); | 458 | p = avcodec_find_encoder(enc->codec_id); |
| 459 | 459 | ||
| 460 | if(enc->codec_type == CODEC_TYPE_AUDIO) | 460 | if(enc->codec_type == AVMEDIA_TYPE_AUDIO) |
| 461 | put_le16(pb, 2); | 461 | put_le16(pb, 2); |
| 462 | else if(enc->codec_type == CODEC_TYPE_VIDEO) | 462 | else if(enc->codec_type == AVMEDIA_TYPE_VIDEO) |
| 463 | put_le16(pb, 1); | 463 | put_le16(pb, 1); |
| 464 | else | 464 | else |
| 465 | put_le16(pb, -1); | 465 | put_le16(pb, -1); |
| @@ -483,7 +483,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 17 unmodified lines | |||
| 483 | 483 | ||
| 484 | 484 | ||
| 485 | /* id */ | 485 | /* id */ |
| 486 | if (enc->codec_type == CODEC_TYPE_AUDIO) { | 486 | if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 487 | put_le16(pb, 2); | 487 | put_le16(pb, 2); |
| 488 | put_le16(pb, enc->codec_tag); | 488 | put_le16(pb, enc->codec_tag); |
| 489 | } else { | 489 | } else { |
| @@ -722,7 +722,7 @@ static void put_frame( · 232 unmodified lines | |||
| 722 | // multi payloads | 722 | // multi payloads |
| 723 | frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS - PACKET_HEADER_MIN_SIZE - 1; | 723 | frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS - PACKET_HEADER_MIN_SIZE - 1; |
| 724 | 724 | ||
| 725 | if(frag_len1 < payload_len && avst->codec->codec_type == CODEC_TYPE_AUDIO){ | 725 | if(frag_len1 < payload_len && avst->codec->codec_type == AVMEDIA_TYPE_AUDIO){ |
| 726 | flush_packet(s); | 726 | flush_packet(s); |
| 727 | continue; | 727 | continue; |
| 728 | } | 728 | } |
| @@ -770,7 +770,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) · 41 unmodified lines | |||
| 770 | codec = s->streams[pkt->stream_index]->codec; | 770 | codec = s->streams[pkt->stream_index]->codec; |
| 771 | stream = &asf->streams[pkt->stream_index]; | 771 | stream = &asf->streams[pkt->stream_index]; |
| 772 | 772 | ||
| 773 | if(codec->codec_type == CODEC_TYPE_AUDIO) | 773 | if(codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 774 | flags &= ~PKT_FLAG_KEY; | 774 | flags &= ~PKT_FLAG_KEY; |
| 775 | 775 | ||
| 776 | pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; | 776 | pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; |
| @@ -99,7 +99,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 98 unmodified lines | |||
| 99 | if (!st) | 99 | if (!st) |
| 100 | return -1; | 100 | return -1; |
| 101 | av_set_pts_info(st, 64, 1, 100); | 101 | av_set_pts_info(st, 64, 1, 100); |
| 102 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 102 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 103 | st->codec->codec_id= CODEC_ID_SSA; | 103 | st->codec->codec_id= CODEC_ID_SSA; |
| 104 | 104 | ||
| 105 | header_remaining= INT_MAX; | 105 | header_remaining= INT_MAX; |
| @@ -148,7 +148,7 @@ static int au_read_header(AVFormatContext *s, · 147 unmodified lines | |||
| 148 | st = av_new_stream(s, 0); | 148 | st = av_new_stream(s, 0); |
| 149 | if (!st) | 149 | if (!st) |
| 150 | return -1; | 150 | return -1; |
| 151 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 151 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 152 | st->codec->codec_tag = id; | 152 | st->codec->codec_tag = id; |
| 153 | st->codec->codec_id = codec; | 153 | st->codec->codec_id = codec; |
| 154 | st->codec->channels = channels; | 154 | st->codec->channels = channels; |
| @@ -32,7 +32,7 @@ void ff_audio_interleave_close(AVFormatContext *s) · 31 unmodified lines | |||
| 32 | AVStream *st = s->streams[i]; | 32 | AVStream *st = s->streams[i]; |
| 33 | AudioInterleaveContext *aic = st->priv_data; | 33 | AudioInterleaveContext *aic = st->priv_data; |
| 34 | 34 | ||
| 35 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) | 35 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 36 | av_fifo_free(aic->fifo); | 36 | av_fifo_free(aic->fifo); |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| @@ -50,7 +50,7 @@ int ff_audio_interleave_init(AVFormatContext *s, · 11 unmodified lines | |||
| 50 | AVStream *st = s->streams[i]; | 50 | AVStream *st = s->streams[i]; |
| 51 | AudioInterleaveContext *aic = st->priv_data; | 51 | AudioInterleaveContext *aic = st->priv_data; |
| 52 | 52 | ||
| 53 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 53 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 54 | aic->sample_size = (st->codec->channels * | 54 | aic->sample_size = (st->codec->channels * |
| 55 | av_get_bits_per_sample(st->codec->codec_id)) / 8; | 55 | av_get_bits_per_sample(st->codec->codec_id)) / 8; |
| 56 | if (!aic->sample_size) { | 56 | if (!aic->sample_size) { |
| @@ -103,7 +103,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt · 46 unmodified lines | |||
| 103 | if (pkt) { | 103 | if (pkt) { |
| 104 | AVStream *st = s->streams[pkt->stream_index]; | 104 | AVStream *st = s->streams[pkt->stream_index]; |
| 105 | AudioInterleaveContext *aic = st->priv_data; | 105 | AudioInterleaveContext *aic = st->priv_data; |
| 106 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 106 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 107 | unsigned new_size = av_fifo_size(aic->fifo) + pkt->size; | 107 | unsigned new_size = av_fifo_size(aic->fifo) + pkt->size; |
| 108 | if (new_size > aic->fifo_size) { | 108 | if (new_size > aic->fifo_size) { |
| 109 | if (av_fifo_realloc2(aic->fifo, new_size) < 0) | 109 | if (av_fifo_realloc2(aic->fifo, new_size) < 0) |
| @@ -122,7 +122,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt · 12 unmodified lines | |||
| 122 | 122 | ||
| 123 | for (i = 0; i < s->nb_streams; i++) { | 123 | for (i = 0; i < s->nb_streams; i++) { |
| 124 | AVStream *st = s->streams[i]; | 124 | AVStream *st = s->streams[i]; |
| 125 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 125 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 126 | AVPacket new_pkt; | 126 | AVPacket new_pkt; |
| 127 | while (ff_interleave_new_audio_packet(s, &new_pkt, i, flush)) | 127 | while (ff_interleave_new_audio_packet(s, &new_pkt, i, flush)) |
| 128 | ff_interleave_add_packet(s, &new_pkt, compare_ts); | 128 | ff_interleave_add_packet(s, &new_pkt, compare_ts); |
| @@ -804,7 +804,7 @@ AVOutputFormat *av_guess_format(const char *short_name, · 803 unmodified lines | |||
| 804 | */ | 804 | */ |
| 805 | enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, | 805 | enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, |
| 806 | const char *filename, const char *mime_type, | 806 | const char *filename, const char *mime_type, |
| 807 | enum CodecType type); | 807 | enum AVMediaType type); |
| 808 | 808 | ||
| 809 | /** | 809 | /** |
| 810 | * Sends a nice hexadecimal dump of a buffer to the specified file stream. | 810 | * Sends a nice hexadecimal dump of a buffer to the specified file stream. |
| @@ -442,19 +442,19 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 441 unmodified lines | |||
| 442 | 442 | ||
| 443 | switch(tag1) { | 443 | switch(tag1) { |
| 444 | case MKTAG('v', 'i', 'd', 's'): | 444 | case MKTAG('v', 'i', 'd', 's'): |
| 445 | codec_type = CODEC_TYPE_VIDEO; | 445 | codec_type = AVMEDIA_TYPE_VIDEO; |
| 446 | 446 | ||
| 447 | ast->sample_size = 0; | 447 | ast->sample_size = 0; |
| 448 | break; | 448 | break; |
| 449 | case MKTAG('a', 'u', 'd', 's'): | 449 | case MKTAG('a', 'u', 'd', 's'): |
| 450 | codec_type = CODEC_TYPE_AUDIO; | 450 | codec_type = AVMEDIA_TYPE_AUDIO; |
| 451 | break; | 451 | break; |
| 452 | case MKTAG('t', 'x', 't', 's'): | 452 | case MKTAG('t', 'x', 't', 's'): |
| 453 | //FIXME | 453 | //FIXME |
| 454 | codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ? FIXME | 454 | codec_type = AVMEDIA_TYPE_DATA; //AVMEDIA_TYPE_SUB ? FIXME |
| 455 | break; | 455 | break; |
| 456 | case MKTAG('d', 'a', 't', 's'): | 456 | case MKTAG('d', 'a', 't', 's'): |
| 457 | codec_type = CODEC_TYPE_DATA; | 457 | codec_type = AVMEDIA_TYPE_DATA; |
| 458 | break; | 458 | break; |
| 459 | default: | 459 | default: |
| 460 | av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1); | 460 | av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1); |
| @@ -475,11 +475,11 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 14 unmodified lines | |||
| 475 | size = FFMIN(size, list_end - cur_pos); | 475 | size = FFMIN(size, list_end - cur_pos); |
| 476 | st = s->streams[stream_index]; | 476 | st = s->streams[stream_index]; |
| 477 | switch(codec_type) { | 477 | switch(codec_type) { |
| 478 | case CODEC_TYPE_VIDEO: | 478 | case AVMEDIA_TYPE_VIDEO: |
| 479 | if(amv_file_format){ | 479 | if(amv_file_format){ |
| 480 | st->codec->width=avih_width; | 480 | st->codec->width=avih_width; |
| 481 | st->codec->height=avih_height; | 481 | st->codec->height=avih_height; |
| 482 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 482 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 483 | st->codec->codec_id = CODEC_ID_AMV; | 483 | st->codec->codec_id = CODEC_ID_AMV; |
| 484 | url_fskip(pb, size); | 484 | url_fskip(pb, size); |
| 485 | break; | 485 | break; |
| @@ -497,7 +497,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 11 unmodified lines | |||
| 497 | get_le32(pb); /* ClrImportant */ | 497 | get_le32(pb); /* ClrImportant */ |
| 498 | 498 | ||
| 499 | if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) { | 499 | if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) { |
| 500 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 500 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 501 | st->codec->codec_tag = tag1; | 501 | st->codec->codec_tag = tag1; |
| 502 | st->codec->codec_id = CODEC_ID_XSUB; | 502 | st->codec->codec_id = CODEC_ID_XSUB; |
| 503 | break; | 503 | break; |
| @@ -534,7 +534,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 30 unmodified lines | |||
| 534 | #ifdef DEBUG | 534 | #ifdef DEBUG |
| 535 | print_tag("video", tag1, 0); | 535 | print_tag("video", tag1, 0); |
| 536 | #endif | 536 | #endif |
| 537 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 537 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 538 | st->codec->codec_tag = tag1; | 538 | st->codec->codec_tag = tag1; |
| 539 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1); | 539 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1); |
| 540 | st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts. | 540 | st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts. |
| @@ -554,7 +554,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 13 unmodified lines | |||
| 554 | 554 | ||
| 555 | // url_fskip(pb, size - 5 * 4); | 555 | // url_fskip(pb, size - 5 * 4); |
| 556 | break; | 556 | break; |
| 557 | case CODEC_TYPE_AUDIO: | 557 | case AVMEDIA_TYPE_AUDIO: |
| 558 | ff_get_wav_header(pb, st->codec, size); | 558 | ff_get_wav_header(pb, st->codec, size); |
| 559 | if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){ | 559 | if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){ |
| 560 | av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align); | 560 | av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align); |
| @@ -580,7 +580,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines | |||
| 580 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_AMV; | 580 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_AMV; |
| 581 | break; | 581 | break; |
| 582 | default: | 582 | default: |
| 583 | st->codec->codec_type = CODEC_TYPE_DATA; | 583 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 584 | st->codec->codec_id= CODEC_ID_NONE; | 584 | st->codec->codec_id= CODEC_ID_NONE; |
| 585 | st->codec->codec_tag= 0; | 585 | st->codec->codec_tag= 0; |
| 586 | url_fskip(pb, size); | 586 | url_fskip(pb, size); |
| @@ -787,7 +787,7 @@ resync: · 200 unmodified lines | |||
| 787 | //av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size); | 787 | //av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size); |
| 788 | pkt->stream_index = avi->stream_index; | 788 | pkt->stream_index = avi->stream_index; |
| 789 | 789 | ||
| 790 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 790 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 791 | AVIndexEntry *e; | 791 | AVIndexEntry *e; |
| 792 | int index; | 792 | int index; |
| 793 | assert(st->index_entries); | 793 | assert(st->index_entries); |
| @@ -871,8 +871,8 @@ resync: · 77 unmodified lines | |||
| 871 | //workaround for broken small-file-bug402.avi | 871 | //workaround for broken small-file-bug402.avi |
| 872 | if( d[2] == 'w' && d[3] == 'b' | 872 | if( d[2] == 'w' && d[3] == 'b' |
| 873 | && n==0 | 873 | && n==0 |
| 874 | && st ->codec->codec_type == CODEC_TYPE_VIDEO | 874 | && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO |
| 875 | && st1->codec->codec_type == CODEC_TYPE_AUDIO | 875 | && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO |
| 876 | && ast->prefix == 'd'*256+'c' | 876 | && ast->prefix == 'd'*256+'c' |
| 877 | && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count) | 877 | && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count) |
| 878 | ){ | 878 | ){ |
| @@ -83,14 +83,14 @@ static int64_t avi_start_new_riff(AVFormatContext *s, ByteIOContext *pb, · 82 unmodified lines | |||
| 83 | return loff; | 83 | return loff; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static char* avi_stream2fourcc(char* tag, int index, enum CodecType type) | 86 | static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type) |
| 87 | { | 87 | { |
| 88 | tag[0] = '0'; | 88 | tag[0] = '0'; |
| 89 | tag[1] = '0' + index; | 89 | tag[1] = '0' + index; |
| 90 | if (type == CODEC_TYPE_VIDEO) { | 90 | if (type == AVMEDIA_TYPE_VIDEO) { |
| 91 | tag[2] = 'd'; | 91 | tag[2] = 'd'; |
| 92 | tag[3] = 'c'; | 92 | tag[3] = 'c'; |
| 93 | } else if (type == CODEC_TYPE_SUBTITLE) { | 93 | } else if (type == AVMEDIA_TYPE_SUBTITLE) { |
| 94 | // note: this is not an official code | 94 | // note: this is not an official code |
| 95 | tag[2] = 's'; | 95 | tag[2] = 's'; |
| 96 | tag[3] = 'b'; | 96 | tag[3] = 'b'; |
| @@ -136,7 +136,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id) · 39 unmodified lines | |||
| 136 | } else { | 136 | } else { |
| 137 | put_le32(pb, avist->audio_strm_length / au_ssize); | 137 | put_le32(pb, avist->audio_strm_length / au_ssize); |
| 138 | } | 138 | } |
| 139 | if(stream->codec_type == CODEC_TYPE_VIDEO) | 139 | if(stream->codec_type == AVMEDIA_TYPE_VIDEO) |
| 140 | nb_frames = FFMAX(nb_frames, avist->packet_count); | 140 | nb_frames = FFMAX(nb_frames, avist->packet_count); |
| 141 | } | 141 | } |
| 142 | if(riff_id == 1) { | 142 | if(riff_id == 1) { |
| @@ -177,7 +177,7 @@ static int avi_write_header(AVFormatContext *s) · 34 unmodified lines | |||
| 177 | for(n=0;n<s->nb_streams;n++) { | 177 | for(n=0;n<s->nb_streams;n++) { |
| 178 | stream = s->streams[n]->codec; | 178 | stream = s->streams[n]->codec; |
| 179 | bitrate += stream->bit_rate; | 179 | bitrate += stream->bit_rate; |
| 180 | if (stream->codec_type == CODEC_TYPE_VIDEO) | 180 | if (stream->codec_type == AVMEDIA_TYPE_VIDEO) |
| 181 | video_enc = stream; | 181 | video_enc = stream; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| @@ -222,16 +222,16 @@ static int avi_write_header(AVFormatContext *s) · 38 unmodified lines | |||
| 222 | /* stream generic header */ | 222 | /* stream generic header */ |
| 223 | strh = ff_start_tag(pb, "strh"); | 223 | strh = ff_start_tag(pb, "strh"); |
| 224 | switch(stream->codec_type) { | 224 | switch(stream->codec_type) { |
| 225 | case CODEC_TYPE_SUBTITLE: | 225 | case AVMEDIA_TYPE_SUBTITLE: |
| 226 | // XSUB subtitles behave like video tracks, other subtitles | 226 | // XSUB subtitles behave like video tracks, other subtitles |
| 227 | // are not (yet) supported. | 227 | // are not (yet) supported. |
| 228 | if (stream->codec_id != CODEC_ID_XSUB) break; | 228 | if (stream->codec_id != CODEC_ID_XSUB) break; |
| 229 | case CODEC_TYPE_VIDEO: put_tag(pb, "vids"); break; | 229 | case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break; |
| 230 | case CODEC_TYPE_AUDIO: put_tag(pb, "auds"); break; | 230 | case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break; |
| 231 | // case CODEC_TYPE_TEXT : put_tag(pb, "txts"); break; | 231 | // case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break; |
| 232 | case CODEC_TYPE_DATA : put_tag(pb, "dats"); break; | 232 | case AVMEDIA_TYPE_DATA : put_tag(pb, "dats"); break; |
| 233 | } | 233 | } |
| 234 | if(stream->codec_type == CODEC_TYPE_VIDEO || | 234 | if(stream->codec_type == AVMEDIA_TYPE_VIDEO || |
| 235 | stream->codec_id == CODEC_ID_XSUB) | 235 | stream->codec_id == CODEC_ID_XSUB) |
| 236 | put_le32(pb, stream->codec_tag); | 236 | put_le32(pb, stream->codec_tag); |
| 237 | else | 237 | else |
| @@ -255,9 +255,9 @@ static int avi_write_header(AVFormatContext *s) · 17 unmodified lines | |||
| 255 | put_le32(pb, 0); /* length, XXX: filled later */ | 255 | put_le32(pb, 0); /* length, XXX: filled later */ |
| 256 | 256 | ||
| 257 | /* suggested buffer size */ //FIXME set at the end to largest chunk | 257 | /* suggested buffer size */ //FIXME set at the end to largest chunk |
| 258 | if(stream->codec_type == CODEC_TYPE_VIDEO) | 258 | if(stream->codec_type == AVMEDIA_TYPE_VIDEO) |
| 259 | put_le32(pb, 1024 * 1024); | 259 | put_le32(pb, 1024 * 1024); |
| 260 | else if(stream->codec_type == CODEC_TYPE_AUDIO) | 260 | else if(stream->codec_type == AVMEDIA_TYPE_AUDIO) |
| 261 | put_le32(pb, 12 * 1024); | 261 | put_le32(pb, 12 * 1024); |
| 262 | else | 262 | else |
| 263 | put_le32(pb, 0); | 263 | put_le32(pb, 0); |
| @@ -268,17 +268,17 @@ static int avi_write_header(AVFormatContext *s) · 4 unmodified lines | |||
| 268 | put_le16(pb, stream->height); | 268 | put_le16(pb, stream->height); |
| 269 | ff_end_tag(pb, strh); | 269 | ff_end_tag(pb, strh); |
| 270 | 270 | ||
| 271 | if(stream->codec_type != CODEC_TYPE_DATA){ | 271 | if(stream->codec_type != AVMEDIA_TYPE_DATA){ |
| 272 | strf = ff_start_tag(pb, "strf"); | 272 | strf = ff_start_tag(pb, "strf"); |
| 273 | switch(stream->codec_type) { | 273 | switch(stream->codec_type) { |
| 274 | case CODEC_TYPE_SUBTITLE: | 274 | case AVMEDIA_TYPE_SUBTITLE: |
| 275 | // XSUB subtitles behave like video tracks, other subtitles | 275 | // XSUB subtitles behave like video tracks, other subtitles |
| 276 | // are not (yet) supported. | 276 | // are not (yet) supported. |
| 277 | if (stream->codec_id != CODEC_ID_XSUB) break; | 277 | if (stream->codec_id != CODEC_ID_XSUB) break; |
| 278 | case CODEC_TYPE_VIDEO: | 278 | case AVMEDIA_TYPE_VIDEO: |
| 279 | ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0); | 279 | ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0); |
| 280 | break; | 280 | break; |
| 281 | case CODEC_TYPE_AUDIO: | 281 | case AVMEDIA_TYPE_AUDIO: |
| 282 | if (ff_put_wav_header(pb, stream) < 0) { | 282 | if (ff_put_wav_header(pb, stream) < 0) { |
| 283 | return -1; | 283 | return -1; |
| 284 | } | 284 | } |
| @@ -322,7 +322,7 @@ static int avi_write_header(AVFormatContext *s) · 37 unmodified lines | |||
| 322 | ff_end_tag(pb, avist->indexes.indx_start); | 322 | ff_end_tag(pb, avist->indexes.indx_start); |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | if( stream->codec_type == CODEC_TYPE_VIDEO | 325 | if( stream->codec_type == AVMEDIA_TYPE_VIDEO |
| 326 | && s->streams[i]->sample_aspect_ratio.num>0 | 326 | && s->streams[i]->sample_aspect_ratio.num>0 |
| 327 | && s->streams[i]->sample_aspect_ratio.den>0){ | 327 | && s->streams[i]->sample_aspect_ratio.den>0){ |
| 328 | int vprp= ff_start_tag(pb, "vprp"); | 328 | int vprp= ff_start_tag(pb, "vprp"); |
| @@ -542,7 +542,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) · 213 unmodified lines | |||
| 542 | avi_stream2fourcc(&tag[0], stream_index, enc->codec_type); | 542 | avi_stream2fourcc(&tag[0], stream_index, enc->codec_type); |
| 543 | if(pkt->flags&PKT_FLAG_KEY) | 543 | if(pkt->flags&PKT_FLAG_KEY) |
| 544 | flags = 0x10; | 544 | flags = 0x10; |
| 545 | if (enc->codec_type == CODEC_TYPE_AUDIO) { | 545 | if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 546 | avist->audio_strm_length += size; | 546 | avist->audio_strm_length += size; |
| 547 | } | 547 | } |
| 548 | 548 | ||
| @@ -603,7 +603,7 @@ static int avi_write_trailer(AVFormatContext *s) · 54 unmodified lines | |||
| 603 | AVCodecContext *stream = s->streams[n]->codec; | 603 | AVCodecContext *stream = s->streams[n]->codec; |
| 604 | AVIStream *avist= s->streams[n]->priv_data; | 604 | AVIStream *avist= s->streams[n]->priv_data; |
| 605 | 605 | ||
| 606 | if (stream->codec_type == CODEC_TYPE_VIDEO) { | 606 | if (stream->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 607 | if (nb_frames < avist->packet_count) | 607 | if (nb_frames < avist->packet_count) |
| 608 | nb_frames = avist->packet_count; | 608 | nb_frames = avist->packet_count; |
| 609 | } else { | 609 | } else { |
| @@ -85,7 +85,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) · 84 unmodified lines | |||
| 85 | continue; | 85 | continue; |
| 86 | 86 | ||
| 87 | st = av_new_stream(s, id); | 87 | st = av_new_stream(s, id); |
| 88 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 88 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 89 | 89 | ||
| 90 | st->codec->block_align = wvfmt.nBlockAlign; | 90 | st->codec->block_align = wvfmt.nBlockAlign; |
| 91 | st->codec->channels = wvfmt.nChannels; | 91 | st->codec->channels = wvfmt.nChannels; |
| @@ -111,7 +111,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines | |||
| 111 | continue; | 111 | continue; |
| 112 | 112 | ||
| 113 | st = av_new_stream(s, id); | 113 | st = av_new_stream(s, id); |
| 114 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 114 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 115 | st->r_frame_rate.num = stream->info.dwRate; | 115 | st->r_frame_rate.num = stream->info.dwRate; |
| 116 | st->r_frame_rate.den = stream->info.dwScale; | 116 | st->r_frame_rate.den = stream->info.dwScale; |
| 117 | 117 | ||
| @@ -178,7 +178,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 177 unmodified lines | |||
| 178 | avs->st_video = av_new_stream(s, AVS_VIDEO); | 178 | avs->st_video = av_new_stream(s, AVS_VIDEO); |
| 179 | if (avs->st_video == NULL) | 179 | if (avs->st_video == NULL) |
| 180 | return AVERROR(ENOMEM); | 180 | return AVERROR(ENOMEM); |
| 181 | avs->st_video->codec->codec_type = CODEC_TYPE_VIDEO; | 181 | avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 182 | avs->st_video->codec->codec_id = CODEC_ID_AVS; | 182 | avs->st_video->codec->codec_id = CODEC_ID_AVS; |
| 183 | avs->st_video->codec->width = avs->width; | 183 | avs->st_video->codec->width = avs->width; |
| 184 | avs->st_video->codec->height = avs->height; | 184 | avs->st_video->codec->height = avs->height; |
| @@ -195,7 +195,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 10 unmodified lines | |||
| 195 | avs->st_audio = av_new_stream(s, AVS_AUDIO); | 195 | avs->st_audio = av_new_stream(s, AVS_AUDIO); |
| 196 | if (avs->st_audio == NULL) | 196 | if (avs->st_audio == NULL) |
| 197 | return AVERROR(ENOMEM); | 197 | return AVERROR(ENOMEM); |
| 198 | avs->st_audio->codec->codec_type = CODEC_TYPE_AUDIO; | 198 | avs->st_audio->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 199 | } | 199 | } |
| 200 | avs->remaining_audio_size = size - 4; | 200 | avs->remaining_audio_size = size - 4; |
| 201 | size = avs_read_audio_packet(s, pkt); | 201 | size = avs_read_audio_packet(s, pkt); |
| @@ -74,7 +74,7 @@ static int vid_read_header(AVFormatContext *s, · 73 unmodified lines | |||
| 74 | if (!stream) | 74 | if (!stream) |
| 75 | return AVERROR(ENOMEM); | 75 | return AVERROR(ENOMEM); |
| 76 | av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps | 76 | av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps |
| 77 | stream->codec->codec_type = CODEC_TYPE_VIDEO; | 77 | stream->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 78 | stream->codec->codec_id = CODEC_ID_BETHSOFTVID; | 78 | stream->codec->codec_id = CODEC_ID_BETHSOFTVID; |
| 79 | stream->codec->width = get_le16(pb); | 79 | stream->codec->width = get_le16(pb); |
| 80 | stream->codec->height = get_le16(pb); | 80 | stream->codec->height = get_le16(pb); |
| @@ -86,7 +86,7 @@ static int vid_read_header(AVFormatContext *s, · 5 unmodified lines | |||
| 86 | stream = av_new_stream(s, 0); | 86 | stream = av_new_stream(s, 0); |
| 87 | if (!stream) | 87 | if (!stream) |
| 88 | return AVERROR(ENOMEM); | 88 | return AVERROR(ENOMEM); |
| 89 | stream->codec->codec_type = CODEC_TYPE_AUDIO; | 89 | stream->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 90 | stream->codec->codec_id = CODEC_ID_PCM_U8; | 90 | stream->codec->codec_id = CODEC_ID_PCM_U8; |
| 91 | stream->codec->channels = 1; | 91 | stream->codec->channels = 1; |
| 92 | stream->codec->sample_rate = 11025; | 92 | stream->codec->sample_rate = 11025; |
| @@ -87,12 +87,12 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) · 86 unmodified lines | |||
| 87 | 87 | ||
| 88 | /* Set up the video codec... */ | 88 | /* Set up the video codec... */ |
| 89 | av_set_pts_info(vstream, 32, 1, fps); | 89 | av_set_pts_info(vstream, 32, 1, fps); |
| 90 | vstream->codec->codec_type = CODEC_TYPE_VIDEO; | 90 | vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 91 | vstream->codec->codec_id = CODEC_ID_BFI; | 91 | vstream->codec->codec_id = CODEC_ID_BFI; |
| 92 | vstream->codec->pix_fmt = PIX_FMT_PAL8; | 92 | vstream->codec->pix_fmt = PIX_FMT_PAL8; |
| 93 | 93 | ||
| 94 | /* Set up the audio codec now... */ | 94 | /* Set up the audio codec now... */ |
| 95 | astream->codec->codec_type = CODEC_TYPE_AUDIO; | 95 | astream->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 96 | astream->codec->codec_id = CODEC_ID_PCM_U8; | 96 | astream->codec->codec_id = CODEC_ID_PCM_U8; |
| 97 | astream->codec->channels = 1; | 97 | astream->codec->channels = 1; |
| 98 | astream->codec->bits_per_coded_sample = 8; | 98 | astream->codec->bits_per_coded_sample = 8; |
| @@ -111,7 +111,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 110 unmodified lines | |||
| 111 | } | 111 | } |
| 112 | av_set_pts_info(vst, 64, fps_den, fps_num); | 112 | av_set_pts_info(vst, 64, fps_den, fps_num); |
| 113 | 113 | ||
| 114 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 114 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 115 | vst->codec->codec_id = CODEC_ID_BINKVIDEO; | 115 | vst->codec->codec_id = CODEC_ID_BINKVIDEO; |
| 116 | vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE); | 116 | vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE); |
| 117 | vst->codec->extradata_size = 4; | 117 | vst->codec->extradata_size = 4; |
| @@ -133,7 +133,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 15 unmodified lines | |||
| 133 | ast = av_new_stream(s, 1); | 133 | ast = av_new_stream(s, 1); |
| 134 | if (!ast) | 134 | if (!ast) |
| 135 | return AVERROR(ENOMEM); | 135 | return AVERROR(ENOMEM); |
| 136 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 136 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 137 | ast->codec->codec_tag = 0; | 137 | ast->codec->codec_tag = 0; |
| 138 | ast->codec->sample_rate = get_le16(pb); | 138 | ast->codec->sample_rate = get_le16(pb); |
| 139 | av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); | 139 | av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
| @@ -83,7 +83,7 @@ static int read_header(AVFormatContext *s, · 82 unmodified lines | |||
| 83 | if (!video) | 83 | if (!video) |
| 84 | return AVERROR(ENOMEM); | 84 | return AVERROR(ENOMEM); |
| 85 | 85 | ||
| 86 | video->codec->codec_type = CODEC_TYPE_VIDEO; | 86 | video->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 87 | video->codec->codec_id = CODEC_ID_C93; | 87 | video->codec->codec_id = CODEC_ID_C93; |
| 88 | video->codec->width = 320; | 88 | video->codec->width = 320; |
| 89 | video->codec->height = 192; | 89 | video->codec->height = 192; |
| @@ -120,7 +120,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) · 30 unmodified lines | |||
| 120 | c93->audio = av_new_stream(s, 1); | 120 | c93->audio = av_new_stream(s, 1); |
| 121 | if (!c93->audio) | 121 | if (!c93->audio) |
| 122 | return AVERROR(ENOMEM); | 122 | return AVERROR(ENOMEM); |
| 123 | c93->audio->codec->codec_type = CODEC_TYPE_AUDIO; | 123 | c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 124 | } | 124 | } |
| 125 | url_fskip(pb, 26); /* VOC header */ | 125 | url_fskip(pb, 26); /* VOC header */ |
| 126 | ret = voc_get_packet(s, pkt, c93->audio, datasize - 26); | 126 | ret = voc_get_packet(s, pkt, c93->audio, datasize - 26); |
| @@ -64,7 +64,7 @@ static int read_desc_chunk(AVFormatContext *s) · 63 unmodified lines | |||
| 64 | return AVERROR_NOMEM; | 64 | return AVERROR_NOMEM; |
| 65 | 65 | ||
| 66 | /* parse format description */ | 66 | /* parse format description */ |
| 67 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 67 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 68 | st->codec->sample_rate = av_int2dbl(get_be64(pb)); | 68 | st->codec->sample_rate = av_int2dbl(get_be64(pb)); |
| 69 | st->codec->codec_tag = get_be32(pb); | 69 | st->codec->codec_tag = get_be32(pb); |
| 70 | flags = get_be32(pb); | 70 | flags = get_be32(pb); |
| @@ -32,7 +32,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 31 unmodified lines | |||
| 32 | if (!vst) | 32 | if (!vst) |
| 33 | return AVERROR(ENOMEM); | 33 | return AVERROR(ENOMEM); |
| 34 | 34 | ||
| 35 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 35 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 36 | vst->codec->codec_id = CODEC_ID_CDGRAPHICS; | 36 | vst->codec->codec_id = CODEC_ID_CDGRAPHICS; |
| 37 | 37 | ||
| 38 | /// 75 sectors/sec * 4 packets/sector = 300 packets/sec | 38 | /// 75 sectors/sec * 4 packets/sector = 300 packets/sec |
| @@ -24,7 +24,7 @@ static int daud_header(AVFormatContext *s, AVFormatParameters *ap) { · 23 unmodified lines | |||
| 24 | AVStream *st = av_new_stream(s, 0); | 24 | AVStream *st = av_new_stream(s, 0); |
| 25 | if (!st) | 25 | if (!st) |
| 26 | return AVERROR(ENOMEM); | 26 | return AVERROR(ENOMEM); |
| 27 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 27 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 28 | st->codec->codec_id = CODEC_ID_PCM_S24DAUD; | 28 | st->codec->codec_id = CODEC_ID_PCM_S24DAUD; |
| 29 | st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd'); | 29 | st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd'); |
| 30 | st->codec->channels = 6; | 30 | st->codec->channels = 6; |
| @@ -113,7 +113,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) · 112 unmodified lines | |||
| 113 | 113 | ||
| 114 | av_set_pts_info(st, 32, 1, 12); | 114 | av_set_pts_info(st, 32, 1, 12); |
| 115 | cin->video_stream_index = st->index; | 115 | cin->video_stream_index = st->index; |
| 116 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 116 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 117 | st->codec->codec_id = CODEC_ID_DSICINVIDEO; | 117 | st->codec->codec_id = CODEC_ID_DSICINVIDEO; |
| 118 | st->codec->codec_tag = 0; /* no fourcc */ | 118 | st->codec->codec_tag = 0; /* no fourcc */ |
| 119 | st->codec->width = hdr->video_frame_width; | 119 | st->codec->width = hdr->video_frame_width; |
| @@ -126,7 +126,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines | |||
| 126 | 126 | ||
| 127 | av_set_pts_info(st, 32, 1, 22050); | 127 | av_set_pts_info(st, 32, 1, 22050); |
| 128 | cin->audio_stream_index = st->index; | 128 | cin->audio_stream_index = st->index; |
| 129 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 129 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 130 | st->codec->codec_id = CODEC_ID_DSICINAUDIO; | 130 | st->codec->codec_id = CODEC_ID_DSICINAUDIO; |
| 131 | st->codec->codec_tag = 0; /* no tag */ | 131 | st->codec->codec_tag = 0; /* no tag */ |
| 132 | st->codec->channels = 1; | 132 | st->codec->channels = 1; |
| @@ -214,7 +214,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) · 213 unmodified lines | |||
| 214 | if (!c->ast[i]) | 214 | if (!c->ast[i]) |
| 215 | break; | 215 | break; |
| 216 | av_set_pts_info(c->ast[i], 64, 1, 30000); | 216 | av_set_pts_info(c->ast[i], 64, 1, 30000); |
| 217 | c->ast[i]->codec->codec_type = CODEC_TYPE_AUDIO; | 217 | c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 218 | c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; | 218 | c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 219 | 219 | ||
| 220 | av_init_packet(&c->audio_pkt[i]); | 220 | av_init_packet(&c->audio_pkt[i]); |
| @@ -290,7 +290,7 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s) · 69 unmodified lines | |||
| 290 | c->frames = 0; | 290 | c->frames = 0; |
| 291 | c->abytes = 0; | 291 | c->abytes = 0; |
| 292 | 292 | ||
| 293 | c->vst->codec->codec_type = CODEC_TYPE_VIDEO; | 293 | c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 294 | c->vst->codec->codec_id = CODEC_ID_DVVIDEO; | 294 | c->vst->codec->codec_id = CODEC_ID_DVVIDEO; |
| 295 | c->vst->codec->bit_rate = 25000000; | 295 | c->vst->codec->bit_rate = 25000000; |
| 296 | c->vst->start_time = 0; | 296 | c->vst->start_time = 0; |
| @@ -239,7 +239,7 @@ int dv_assemble_frame(DVMuxContext *c, AVStream* st, · 238 unmodified lines | |||
| 239 | reqasize = 4 * dv_audio_frame_size(c->sys, c->frames); | 239 | reqasize = 4 * dv_audio_frame_size(c->sys, c->frames); |
| 240 | 240 | ||
| 241 | switch (st->codec->codec_type) { | 241 | switch (st->codec->codec_type) { |
| 242 | case CODEC_TYPE_VIDEO: | 242 | case AVMEDIA_TYPE_VIDEO: |
| 243 | /* FIXME: we have to have more sensible approach than this one */ | 243 | /* FIXME: we have to have more sensible approach than this one */ |
| 244 | if (c->has_video) | 244 | if (c->has_video) |
| 245 | av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames); | 245 | av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames); |
| @@ -247,7 +247,7 @@ int dv_assemble_frame(DVMuxContext *c, AVStream* st, · 1 unmodified line | |||
| 247 | memcpy(*frame, data, c->sys->frame_size); | 247 | memcpy(*frame, data, c->sys->frame_size); |
| 248 | c->has_video = 1; | 248 | c->has_video = 1; |
| 249 | break; | 249 | break; |
| 250 | case CODEC_TYPE_AUDIO: | 250 | case AVMEDIA_TYPE_AUDIO: |
| 251 | for (i = 0; i < c->n_ast && st != c->ast[i]; i++); | 251 | for (i = 0; i < c->n_ast && st != c->ast[i]; i++); |
| 252 | 252 | ||
| 253 | /* FIXME: we have to have more sensible approach than this one */ | 253 | /* FIXME: we have to have more sensible approach than this one */ |
| @@ -299,11 +299,11 @@ DVMuxContext* dv_init_mux(AVFormatContext* s) · 45 unmodified lines | |||
| 299 | /* We have to sort out where audio and where video stream is */ | 299 | /* We have to sort out where audio and where video stream is */ |
| 300 | for (i=0; i<s->nb_streams; i++) { | 300 | for (i=0; i<s->nb_streams; i++) { |
| 301 | switch (s->streams[i]->codec->codec_type) { | 301 | switch (s->streams[i]->codec->codec_type) { |
| 302 | case CODEC_TYPE_VIDEO: | 302 | case AVMEDIA_TYPE_VIDEO: |
| 303 | if (vst) return NULL; | 303 | if (vst) return NULL; |
| 304 | vst = s->streams[i]; | 304 | vst = s->streams[i]; |
| 305 | break; | 305 | break; |
| 306 | case CODEC_TYPE_AUDIO: | 306 | case AVMEDIA_TYPE_AUDIO: |
| 307 | if (c->n_ast > 1) return NULL; | 307 | if (c->n_ast > 1) return NULL; |
| 308 | c->ast[c->n_ast++] = s->streams[i]; | 308 | c->ast[c->n_ast++] = s->streams[i]; |
| 309 | break; | 309 | break; |
| @@ -119,7 +119,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) · 118 unmodified lines | |||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | /* now we are ready: build format streams */ | 121 | /* now we are ready: build format streams */ |
| 122 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 122 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 123 | st->codec->codec_id = CODEC_ID_DXA; | 123 | st->codec->codec_id = CODEC_ID_DXA; |
| 124 | st->codec->width = w; | 124 | st->codec->width = w; |
| 125 | st->codec->height = h; | 125 | st->codec->height = h; |
| @@ -67,7 +67,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap) · 66 unmodified lines | |||
| 67 | st = av_new_stream(s, 0); | 67 | st = av_new_stream(s, 0); |
| 68 | if (!st) | 68 | if (!st) |
| 69 | return AVERROR(ENOMEM); | 69 | return AVERROR(ENOMEM); |
| 70 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 70 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 71 | st->codec->codec_tag = 0; /* no fourcc */ | 71 | st->codec->codec_tag = 0; /* no fourcc */ |
| 72 | st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS; | 72 | st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS; |
| 73 | st->codec->channels = cdata->channels; | 73 | st->codec->channels = cdata->channels; |
| @@ -414,7 +414,7 @@ static int ea_read_header(AVFormatContext *s, · 413 unmodified lines | |||
| 414 | if (!st) | 414 | if (!st) |
| 415 | return AVERROR(ENOMEM); | 415 | return AVERROR(ENOMEM); |
| 416 | ea->video_stream_index = st->index; | 416 | ea->video_stream_index = st->index; |
| 417 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 417 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 418 | st->codec->codec_id = ea->video_codec; | 418 | st->codec->codec_id = ea->video_codec; |
| 419 | st->codec->codec_tag = 0; /* no fourcc */ | 419 | st->codec->codec_tag = 0; /* no fourcc */ |
| 420 | st->codec->time_base = ea->time_base; | 420 | st->codec->time_base = ea->time_base; |
| @@ -428,7 +428,7 @@ static int ea_read_header(AVFormatContext *s, · 7 unmodified lines | |||
| 428 | if (!st) | 428 | if (!st) |
| 429 | return AVERROR(ENOMEM); | 429 | return AVERROR(ENOMEM); |
| 430 | av_set_pts_info(st, 33, 1, ea->sample_rate); | 430 | av_set_pts_info(st, 33, 1, ea->sample_rate); |
| 431 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 431 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 432 | st->codec->codec_id = ea->audio_codec; | 432 | st->codec->codec_id = ea->audio_codec; |
| 433 | st->codec->codec_tag = 0; /* no tag */ | 433 | st->codec->codec_tag = 0; /* no tag */ |
| 434 | st->codec->channels = ea->num_channels; | 434 | st->codec->channels = ea->num_channels; |
| @@ -301,7 +301,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 300 unmodified lines | |||
| 301 | codec->debug = get_be32(pb); | 301 | codec->debug = get_be32(pb); |
| 302 | /* specific info */ | 302 | /* specific info */ |
| 303 | switch(codec->codec_type) { | 303 | switch(codec->codec_type) { |
| 304 | case CODEC_TYPE_VIDEO: | 304 | case AVMEDIA_TYPE_VIDEO: |
| 305 | codec->time_base.num = get_be32(pb); | 305 | codec->time_base.num = get_be32(pb); |
| 306 | codec->time_base.den = get_be32(pb); | 306 | codec->time_base.den = get_be32(pb); |
| 307 | codec->width = get_be16(pb); | 307 | codec->width = get_be16(pb); |
| @@ -350,7 +350,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 42 unmodified lines | |||
| 350 | codec->refs = get_be32(pb); | 350 | codec->refs = get_be32(pb); |
| 351 | codec->directpred = get_be32(pb); | 351 | codec->directpred = get_be32(pb); |
| 352 | break; | 352 | break; |
| 353 | case CODEC_TYPE_AUDIO: | 353 | case AVMEDIA_TYPE_AUDIO: |
| 354 | codec->sample_rate = get_be32(pb); | 354 | codec->sample_rate = get_be32(pb); |
| 355 | codec->channels = get_le16(pb); | 355 | codec->channels = get_le16(pb); |
| 356 | codec->frame_size = get_le16(pb); | 356 | codec->frame_size = get_le16(pb); |
| @@ -119,7 +119,7 @@ static int ffm_write_header(AVFormatContext *s) · 118 unmodified lines | |||
| 119 | put_be32(pb, codec->debug); | 119 | put_be32(pb, codec->debug); |
| 120 | /* specific info */ | 120 | /* specific info */ |
| 121 | switch(codec->codec_type) { | 121 | switch(codec->codec_type) { |
| 122 | case CODEC_TYPE_VIDEO: | 122 | case AVMEDIA_TYPE_VIDEO: |
| 123 | put_be32(pb, codec->time_base.num); | 123 | put_be32(pb, codec->time_base.num); |
| 124 | put_be32(pb, codec->time_base.den); | 124 | put_be32(pb, codec->time_base.den); |
| 125 | put_be16(pb, codec->width); | 125 | put_be16(pb, codec->width); |
| @@ -168,7 +168,7 @@ static int ffm_write_header(AVFormatContext *s) · 42 unmodified lines | |||
| 168 | put_be32(pb, codec->refs); | 168 | put_be32(pb, codec->refs); |
| 169 | put_be32(pb, codec->directpred); | 169 | put_be32(pb, codec->directpred); |
| 170 | break; | 170 | break; |
| 171 | case CODEC_TYPE_AUDIO: | 171 | case AVMEDIA_TYPE_AUDIO: |
| 172 | put_be32(pb, codec->sample_rate); | 172 | put_be32(pb, codec->sample_rate); |
| 173 | put_le16(pb, codec->channels); | 173 | put_le16(pb, codec->channels); |
| 174 | put_le16(pb, codec->frame_size); | 174 | put_le16(pb, codec->frame_size); |
| @@ -60,7 +60,7 @@ static int read_header(AVFormatContext *s, · 59 unmodified lines | |||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | url_fskip(pb, 2); | 62 | url_fskip(pb, 2); |
| 63 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 63 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 64 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 64 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 65 | st->codec->pix_fmt = PIX_FMT_RGBA; | 65 | st->codec->pix_fmt = PIX_FMT_RGBA; |
| 66 | st->codec->codec_tag = 0; /* no fourcc */ | 66 | st->codec->codec_tag = 0; /* no fourcc */ |
| @@ -36,7 +36,7 @@ static int flac_read_header(AVFormatContext *s, · 35 unmodified lines | |||
| 36 | AVStream *st = av_new_stream(s, 0); | 36 | AVStream *st = av_new_stream(s, 0); |
| 37 | if (!st) | 37 | if (!st) |
| 38 | return AVERROR(ENOMEM); | 38 | return AVERROR(ENOMEM); |
| 39 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 39 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 40 | st->codec->codec_id = CODEC_ID_FLAC; | 40 | st->codec->codec_id = CODEC_ID_FLAC; |
| 41 | st->need_parsing = AVSTREAM_PARSE_FULL; | 41 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 42 | /* the parameters will be extracted from the compressed bitstream */ | 42 | /* the parameters will be extracted from the compressed bitstream */ |
| @@ -103,7 +103,7 @@ static int flic_read_header(AVFormatContext *s, · 102 unmodified lines | |||
| 103 | if (!st) | 103 | if (!st) |
| 104 | return AVERROR(ENOMEM); | 104 | return AVERROR(ENOMEM); |
| 105 | flic->video_stream_index = st->index; | 105 | flic->video_stream_index = st->index; |
| 106 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 106 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 107 | st->codec->codec_id = CODEC_ID_FLIC; | 107 | st->codec->codec_id = CODEC_ID_FLIC; |
| 108 | st->codec->codec_tag = 0; /* no fourcc */ | 108 | st->codec->codec_tag = 0; /* no fourcc */ |
| 109 | st->codec->width = AV_RL16(&header[0x08]); | 109 | st->codec->width = AV_RL16(&header[0x08]); |
| @@ -221,8 +221,8 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) { · 220 unmodified lines | |||
| 221 | //find the streams now so that amf_parse_object doesn't need to do the lookup every time it is called. | 221 | //find the streams now so that amf_parse_object doesn't need to do the lookup every time it is called. |
| 222 | for(i = 0; i < s->nb_streams; i++) { | 222 | for(i = 0; i < s->nb_streams; i++) { |
| 223 | stream = s->streams[i]; | 223 | stream = s->streams[i]; |
| 224 | if (stream->codec->codec_type == CODEC_TYPE_AUDIO) astream = stream; | 224 | if (stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) astream = stream; |
| 225 | else if(stream->codec->codec_type == CODEC_TYPE_VIDEO) vstream = stream; | 225 | else if(stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) vstream = stream; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | //parse the second object (we want a mixed array) | 228 | //parse the second object (we want a mixed array) |
| @@ -236,7 +236,7 @@ static AVStream *create_stream(AVFormatContext *s, int is_audio){ · 7 unmodified lines | |||
| 236 | AVStream *st = av_new_stream(s, is_audio); | 236 | AVStream *st = av_new_stream(s, is_audio); |
| 237 | if (!st) | 237 | if (!st) |
| 238 | return NULL; | 238 | return NULL; |
| 239 | st->codec->codec_type = is_audio ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO; | 239 | st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; |
| 240 | av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ | 240 | av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
| 241 | return st; | 241 | return st; |
| 242 | } | 242 | } |
| @@ -166,7 +166,7 @@ static int flv_write_header(AVFormatContext *s) · 165 unmodified lines | |||
| 166 | 166 | ||
| 167 | for(i=0; i<s->nb_streams; i++){ | 167 | for(i=0; i<s->nb_streams; i++){ |
| 168 | AVCodecContext *enc = s->streams[i]->codec; | 168 | AVCodecContext *enc = s->streams[i]->codec; |
| 169 | if (enc->codec_type == CODEC_TYPE_VIDEO) { | 169 | if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 170 | if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) { | 170 | if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) { |
| 171 | framerate = av_q2d(s->streams[i]->r_frame_rate); | 171 | framerate = av_q2d(s->streams[i]->r_frame_rate); |
| 172 | } else { | 172 | } else { |
| @@ -275,7 +275,7 @@ static int flv_write_header(AVFormatContext *s) · 102 unmodified lines | |||
| 275 | AVCodecContext *enc = s->streams[i]->codec; | 275 | AVCodecContext *enc = s->streams[i]->codec; |
| 276 | if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) { | 276 | if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) { |
| 277 | int64_t pos; | 277 | int64_t pos; |
| 278 | put_byte(pb, enc->codec_type == CODEC_TYPE_VIDEO ? | 278 | put_byte(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ? |
| 279 | FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO); | 279 | FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO); |
| 280 | put_be24(pb, 0); // size patched later | 280 | put_be24(pb, 0); // size patched later |
| 281 | put_be24(pb, 0); // ts | 281 | put_be24(pb, 0); // ts |
| @@ -342,7 +342,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 60 unmodified lines | |||
| 342 | else | 342 | else |
| 343 | flags_size= 1; | 343 | flags_size= 1; |
| 344 | 344 | ||
| 345 | if (enc->codec_type == CODEC_TYPE_VIDEO) { | 345 | if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 346 | put_byte(pb, FLV_TAG_TYPE_VIDEO); | 346 | put_byte(pb, FLV_TAG_TYPE_VIDEO); |
| 347 | 347 | ||
| 348 | flags = enc->codec_tag; | 348 | flags = enc->codec_tag; |
| @@ -353,7 +353,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines | |||
| 353 | 353 | ||
| 354 | flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER; | 354 | flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER; |
| 355 | } else { | 355 | } else { |
| 356 | assert(enc->codec_type == CODEC_TYPE_AUDIO); | 356 | assert(enc->codec_type == AVMEDIA_TYPE_AUDIO); |
| 357 | flags = get_audio_flags(enc); | 357 | flags = get_audio_flags(enc); |
| 358 | 358 | ||
| 359 | assert(size); | 359 | assert(size); |
| @@ -266,7 +266,7 @@ static int gif_write_header(AVFormatContext *s) · 265 unmodified lines | |||
| 266 | video_enc = NULL; | 266 | video_enc = NULL; |
| 267 | for(i=0;i<s->nb_streams;i++) { | 267 | for(i=0;i<s->nb_streams;i++) { |
| 268 | enc = s->streams[i]->codec; | 268 | enc = s->streams[i]->codec; |
| 269 | if (enc->codec_type != CODEC_TYPE_AUDIO) | 269 | if (enc->codec_type != AVMEDIA_TYPE_AUDIO) |
| 270 | video_enc = enc; | 270 | video_enc = enc; |
| 271 | } | 271 | } |
| 272 | 272 | ||
| @@ -329,7 +329,7 @@ static int gif_write_video(AVFormatContext *s, · 56 unmodified lines | |||
| 329 | static int gif_write_packet(AVFormatContext *s, AVPacket *pkt) | 329 | static int gif_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 330 | { | 330 | { |
| 331 | AVCodecContext *codec = s->streams[pkt->stream_index]->codec; | 331 | AVCodecContext *codec = s->streams[pkt->stream_index]->codec; |
| 332 | if (codec->codec_type == CODEC_TYPE_AUDIO) | 332 | if (codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 333 | return 0; /* just ignore audio */ | 333 | return 0; /* just ignore audio */ |
| 334 | else | 334 | else |
| 335 | return gif_write_video(s, codec, pkt->data, pkt->size); | 335 | return gif_write_video(s, codec, pkt->data, pkt->size); |
| @@ -87,34 +87,34 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 86 unmodified lines | |||
| 87 | switch (format) { | 87 | switch (format) { |
| 88 | case 3: | 88 | case 3: |
| 89 | case 4: | 89 | case 4: |
| 90 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 90 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 91 | st->codec->codec_id = CODEC_ID_MJPEG; | 91 | st->codec->codec_id = CODEC_ID_MJPEG; |
| 92 | break; | 92 | break; |
| 93 | case 13: | 93 | case 13: |
| 94 | case 15: | 94 | case 15: |
| 95 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 95 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 96 | st->codec->codec_id = CODEC_ID_DVVIDEO; | 96 | st->codec->codec_id = CODEC_ID_DVVIDEO; |
| 97 | break; | 97 | break; |
| 98 | case 14: | 98 | case 14: |
| 99 | case 16: | 99 | case 16: |
| 100 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 100 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 101 | st->codec->codec_id = CODEC_ID_DVVIDEO; | 101 | st->codec->codec_id = CODEC_ID_DVVIDEO; |
| 102 | break; | 102 | break; |
| 103 | case 11: | 103 | case 11: |
| 104 | case 12: | 104 | case 12: |
| 105 | case 20: | 105 | case 20: |
| 106 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 106 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 107 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; | 107 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; |
| 108 | st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc. | 108 | st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc. |
| 109 | break; | 109 | break; |
| 110 | case 22: | 110 | case 22: |
| 111 | case 23: | 111 | case 23: |
| 112 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 112 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 113 | st->codec->codec_id = CODEC_ID_MPEG1VIDEO; | 113 | st->codec->codec_id = CODEC_ID_MPEG1VIDEO; |
| 114 | st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc. | 114 | st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc. |
| 115 | break; | 115 | break; |
| 116 | case 9: | 116 | case 9: |
| 117 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 117 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 118 | st->codec->codec_id = CODEC_ID_PCM_S24LE; | 118 | st->codec->codec_id = CODEC_ID_PCM_S24LE; |
| 119 | st->codec->channels = 1; | 119 | st->codec->channels = 1; |
| 120 | st->codec->sample_rate = 48000; | 120 | st->codec->sample_rate = 48000; |
| @@ -123,7 +123,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines | |||
| 123 | st->codec->bits_per_coded_sample = 24; | 123 | st->codec->bits_per_coded_sample = 24; |
| 124 | break; | 124 | break; |
| 125 | case 10: | 125 | case 10: |
| 126 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 126 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 127 | st->codec->codec_id = CODEC_ID_PCM_S16LE; | 127 | st->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 128 | st->codec->channels = 1; | 128 | st->codec->channels = 1; |
| 129 | st->codec->sample_rate = 48000; | 129 | st->codec->sample_rate = 48000; |
| @@ -132,7 +132,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines | |||
| 132 | st->codec->bits_per_coded_sample = 16; | 132 | st->codec->bits_per_coded_sample = 16; |
| 133 | break; | 133 | break; |
| 134 | case 17: | 134 | case 17: |
| 135 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 135 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 136 | st->codec->codec_id = CODEC_ID_AC3; | 136 | st->codec->codec_id = CODEC_ID_AC3; |
| 137 | st->codec->channels = 2; | 137 | st->codec->channels = 2; |
| 138 | st->codec->sample_rate = 48000; | 138 | st->codec->sample_rate = 48000; |
| @@ -141,11 +141,11 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines | |||
| 141 | case 7: | 141 | case 7: |
| 142 | case 8: | 142 | case 8: |
| 143 | case 24: | 143 | case 24: |
| 144 | st->codec->codec_type = CODEC_TYPE_DATA; | 144 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 145 | st->codec->codec_id = CODEC_ID_NONE; | 145 | st->codec->codec_id = CODEC_ID_NONE; |
| 146 | break; | 146 | break; |
| 147 | default: | 147 | default: |
| 148 | st->codec->codec_type = CODEC_TYPE_UNKNOWN; | 148 | st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN; |
| 149 | st->codec->codec_id = CODEC_ID_NONE; | 149 | st->codec->codec_id = CODEC_ID_NONE; |
| 150 | break; | 150 | break; |
| 151 | } | 151 | } |
| @@ -644,7 +644,7 @@ static int gxf_write_header(AVFormatContext *s) · 643 unmodified lines | |||
| 644 | st->priv_data = sc; | 644 | st->priv_data = sc; |
| 645 | 645 | ||
| 646 | sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id); | 646 | sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id); |
| 647 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 647 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 648 | if (st->codec->codec_id != CODEC_ID_PCM_S16LE) { | 648 | if (st->codec->codec_id != CODEC_ID_PCM_S16LE) { |
| 649 | av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n"); | 649 | av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n"); |
| 650 | return -1; | 650 | return -1; |
| @@ -667,7 +667,7 @@ static int gxf_write_header(AVFormatContext *s) · 16 unmodified lines | |||
| 667 | gxf->audio_tracks++; | 667 | gxf->audio_tracks++; |
| 668 | gxf->flags |= 0x04000000; /* audio is 16 bit pcm */ | 668 | gxf->flags |= 0x04000000; /* audio is 16 bit pcm */ |
| 669 | media_info = 'A'; | 669 | media_info = 'A'; |
| 670 | } else if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 670 | } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 671 | if (i != 0) { | 671 | if (i != 0) { |
| 672 | av_log(s, AV_LOG_ERROR, "video stream must be the first track\n"); | 672 | av_log(s, AV_LOG_ERROR, "video stream must be the first track\n"); |
| 673 | return -1; | 673 | return -1; |
| @@ -811,7 +811,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 137 unmodified lines | |||
| 811 | /* If the video is frame-encoded, the frame numbers shall be represented by | 811 | /* If the video is frame-encoded, the frame numbers shall be represented by |
| 812 | * even field numbers. | 812 | * even field numbers. |
| 813 | * see SMPTE360M-2004 6.4.2.1.3 Media field number */ | 813 | * see SMPTE360M-2004 6.4.2.1.3 Media field number */ |
| 814 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 814 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 815 | field_nb = gxf->nb_fields; | 815 | field_nb = gxf->nb_fields; |
| 816 | } else { | 816 | } else { |
| 817 | field_nb = av_rescale_rnd(pkt->dts, gxf->time_base.den, | 817 | field_nb = av_rescale_rnd(pkt->dts, gxf->time_base.den, |
| @@ -821,7 +821,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 3 unmodified lines | |||
| 821 | put_byte(pb, sc->media_type); | 821 | put_byte(pb, sc->media_type); |
| 822 | put_byte(pb, st->index); | 822 | put_byte(pb, st->index); |
| 823 | put_be32(pb, field_nb); | 823 | put_be32(pb, field_nb); |
| 824 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 824 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 825 | put_be16(pb, 0); | 825 | put_be16(pb, 0); |
| 826 | put_be16(pb, size / 2); | 826 | put_be16(pb, size / 2); |
| 827 | } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) { | 827 | } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) { |
| @@ -859,13 +859,13 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 31 unmodified lines | |||
| 859 | gxf_write_packet_header(pb, PKT_MEDIA); | 859 | gxf_write_packet_header(pb, PKT_MEDIA); |
| 860 | if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */ | 860 | if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */ |
| 861 | padding = 4 - pkt->size % 4; | 861 | padding = 4 - pkt->size % 4; |
| 862 | else if (st->codec->codec_type == CODEC_TYPE_AUDIO) | 862 | else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 863 | padding = GXF_AUDIO_PACKET_SIZE - pkt->size; | 863 | padding = GXF_AUDIO_PACKET_SIZE - pkt->size; |
| 864 | gxf_write_media_preamble(s, pkt, pkt->size + padding); | 864 | gxf_write_media_preamble(s, pkt, pkt->size + padding); |
| 865 | put_buffer(pb, pkt->data, pkt->size); | 865 | put_buffer(pb, pkt->data, pkt->size); |
| 866 | gxf_write_padding(pb, padding); | 866 | gxf_write_padding(pb, padding); |
| 867 | 867 | ||
| 868 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 868 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 869 | if (!(gxf->flt_entries_nb % 500)) { | 869 | if (!(gxf->flt_entries_nb % 500)) { |
| 870 | gxf->flt_entries = av_realloc(gxf->flt_entries, | 870 | gxf->flt_entries = av_realloc(gxf->flt_entries, |
| 871 | (gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries)); | 871 | (gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries)); |
| @@ -901,7 +901,7 @@ static int gxf_compare_field_nb(AVFormatContext *s, AVPacket *next, AVPacket *cu · 29 unmodified lines | |||
| 901 | for (i = 0; i < 2; i++) { | 901 | for (i = 0; i < 2; i++) { |
| 902 | AVStream *st = s->streams[pkt[i]->stream_index]; | 902 | AVStream *st = s->streams[pkt[i]->stream_index]; |
| 903 | sc[i] = st->priv_data; | 903 | sc[i] = st->priv_data; |
| 904 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 904 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 905 | field_nb[i] = av_rescale_rnd(pkt[i]->dts, gxf->time_base.den, | 905 | field_nb[i] = av_rescale_rnd(pkt[i]->dts, gxf->time_base.den, |
| 906 | (int64_t)48000*gxf->time_base.num, AV_ROUND_UP); | 906 | (int64_t)48000*gxf->time_base.num, AV_ROUND_UP); |
| 907 | field_nb[i] &= ~1; // compare against even field number because audio must be before video | 907 | field_nb[i] &= ~1; // compare against even field number because audio must be before video |
| @@ -915,7 +915,7 @@ static int gxf_compare_field_nb(AVFormatContext *s, AVPacket *next, AVPacket *cu · 7 unmodified lines | |||
| 915 | 915 | ||
| 916 | static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) | 916 | static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) |
| 917 | { | 917 | { |
| 918 | if (pkt && s->streams[pkt->stream_index]->codec->codec_type == CODEC_TYPE_VIDEO) | 918 | if (pkt && s->streams[pkt->stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 919 | pkt->duration = 2; // enforce 2 fields | 919 | pkt->duration = 2; // enforce 2 fields |
| 920 | return ff_audio_rechunk_interleave(s, out, pkt, flush, | 920 | return ff_audio_rechunk_interleave(s, out, pkt, flush, |
| 921 | av_interleave_packet_per_dts, gxf_compare_field_nb); | 921 | av_interleave_packet_per_dts, gxf_compare_field_nb); |
| @@ -160,7 +160,7 @@ static int idcin_read_header(AVFormatContext *s, · 159 unmodified lines | |||
| 160 | return AVERROR(ENOMEM); | 160 | return AVERROR(ENOMEM); |
| 161 | av_set_pts_info(st, 33, 1, IDCIN_FPS); | 161 | av_set_pts_info(st, 33, 1, IDCIN_FPS); |
| 162 | idcin->video_stream_index = st->index; | 162 | idcin->video_stream_index = st->index; |
| 163 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 163 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 164 | st->codec->codec_id = CODEC_ID_IDCIN; | 164 | st->codec->codec_id = CODEC_ID_IDCIN; |
| 165 | st->codec->codec_tag = 0; /* no fourcc */ | 165 | st->codec->codec_tag = 0; /* no fourcc */ |
| 166 | st->codec->width = width; | 166 | st->codec->width = width; |
| @@ -183,7 +183,7 @@ static int idcin_read_header(AVFormatContext *s, · 16 unmodified lines | |||
| 183 | return AVERROR(ENOMEM); | 183 | return AVERROR(ENOMEM); |
| 184 | av_set_pts_info(st, 33, 1, IDCIN_FPS); | 184 | av_set_pts_info(st, 33, 1, IDCIN_FPS); |
| 185 | idcin->audio_stream_index = st->index; | 185 | idcin->audio_stream_index = st->index; |
| 186 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 186 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 187 | st->codec->codec_tag = 1; | 187 | st->codec->codec_tag = 1; |
| 188 | st->codec->channels = channels; | 188 | st->codec->channels = channels; |
| 189 | st->codec->sample_rate = sample_rate; | 189 | st->codec->sample_rate = sample_rate; |
| @@ -89,7 +89,7 @@ static int roq_read_header(AVFormatContext *s, · 88 unmodified lines | |||
| 89 | return AVERROR(ENOMEM); | 89 | return AVERROR(ENOMEM); |
| 90 | av_set_pts_info(st, 63, 1, framerate); | 90 | av_set_pts_info(st, 63, 1, framerate); |
| 91 | roq->video_stream_index = st->index; | 91 | roq->video_stream_index = st->index; |
| 92 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 92 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 93 | st->codec->codec_id = CODEC_ID_ROQ; | 93 | st->codec->codec_id = CODEC_ID_ROQ; |
| 94 | st->codec->codec_tag = 0; /* no fourcc */ | 94 | st->codec->codec_tag = 0; /* no fourcc */ |
| 95 | 95 | ||
| @@ -171,7 +171,7 @@ static int roq_read_packet(AVFormatContext *s, · 75 unmodified lines | |||
| 171 | return AVERROR(ENOMEM); | 171 | return AVERROR(ENOMEM); |
| 172 | av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); | 172 | av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); |
| 173 | roq->audio_stream_index = st->index; | 173 | roq->audio_stream_index = st->index; |
| 174 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 174 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 175 | st->codec->codec_id = CODEC_ID_ROQ_DPCM; | 175 | st->codec->codec_id = CODEC_ID_ROQ_DPCM; |
| 176 | st->codec->codec_tag = 0; /* no tag */ | 176 | st->codec->codec_tag = 0; /* no tag */ |
| 177 | st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1; | 177 | st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1; |
| @@ -119,7 +119,7 @@ static int iff_read_header(AVFormatContext *s, · 118 unmodified lines | |||
| 119 | 119 | ||
| 120 | switch(chunk_id) { | 120 | switch(chunk_id) { |
| 121 | case ID_VHDR: | 121 | case ID_VHDR: |
| 122 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 122 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 123 | url_fskip(pb, 12); | 123 | url_fskip(pb, 12); |
| 124 | st->codec->sample_rate = get_be16(pb); | 124 | st->codec->sample_rate = get_be16(pb); |
| 125 | url_fskip(pb, 1); | 125 | url_fskip(pb, 1); |
| @@ -146,7 +146,7 @@ static int iff_read_header(AVFormatContext *s, · 20 unmodified lines | |||
| 146 | break; | 146 | break; |
| 147 | 147 | ||
| 148 | case ID_BMHD: | 148 | case ID_BMHD: |
| 149 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 149 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 150 | st->codec->width = get_be16(pb); | 150 | st->codec->width = get_be16(pb); |
| 151 | st->codec->height = get_be16(pb); | 151 | st->codec->height = get_be16(pb); |
| 152 | url_fskip(pb, 4); // x, y offset | 152 | url_fskip(pb, 4); // x, y offset |
| @@ -175,7 +175,7 @@ static int iff_read_header(AVFormatContext *s, · 22 unmodified lines | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | switch(st->codec->codec_type) { | 177 | switch(st->codec->codec_type) { |
| 178 | case CODEC_TYPE_AUDIO: | 178 | case AVMEDIA_TYPE_AUDIO: |
| 179 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); | 179 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
| 180 | 180 | ||
| 181 | switch(compression) { | 181 | switch(compression) { |
| @@ -198,7 +198,7 @@ static int iff_read_header(AVFormatContext *s, · 16 unmodified lines | |||
| 198 | st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; | 198 | st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; |
| 199 | break; | 199 | break; |
| 200 | 200 | ||
| 201 | case CODEC_TYPE_VIDEO: | 201 | case AVMEDIA_TYPE_VIDEO: |
| 202 | switch (compression) { | 202 | switch (compression) { |
| 203 | case BITMAP_RAW: | 203 | case BITMAP_RAW: |
| 204 | if (st->codec->codec_tag == ID_ILBM) { | 204 | if (st->codec->codec_tag == ID_ILBM) { |
| @@ -256,7 +256,7 @@ static int iff_read_packet(AVFormatContext *s, · 51 unmodified lines | |||
| 256 | st->codec->extradata_size = 0; | 256 | st->codec->extradata_size = 0; |
| 257 | 257 | ||
| 258 | ret = get_buffer(pb, pkt->data, iff->body_size); | 258 | ret = get_buffer(pb, pkt->data, iff->body_size); |
| 259 | } else if (s->streams[0]->codec->codec_type == CODEC_TYPE_VIDEO) { | 259 | } else if (s->streams[0]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 260 | ret = av_get_packet(pb, pkt, iff->body_size); | 260 | ret = av_get_packet(pb, pkt, iff->body_size); |
| 261 | } else { | 261 | } else { |
| 262 | ret = av_get_packet(pb, pkt, PACKET_SIZE); | 262 | ret = av_get_packet(pb, pkt, PACKET_SIZE); |
| @@ -265,13 +265,13 @@ static int iff_read_packet(AVFormatContext *s, · 2 unmodified lines | |||
| 265 | if(iff->sent_bytes == 0) | 265 | if(iff->sent_bytes == 0) |
| 266 | pkt->flags |= PKT_FLAG_KEY; | 266 | pkt->flags |= PKT_FLAG_KEY; |
| 267 | 267 | ||
| 268 | if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) { | 268 | if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 269 | iff->sent_bytes += PACKET_SIZE; | 269 | iff->sent_bytes += PACKET_SIZE; |
| 270 | } else { | 270 | } else { |
| 271 | iff->sent_bytes = iff->body_size; | 271 | iff->sent_bytes = iff->body_size; |
| 272 | } | 272 | } |
| 273 | pkt->stream_index = 0; | 273 | pkt->stream_index = 0; |
| 274 | if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) { | 274 | if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 275 | pkt->pts = iff->audio_frame_count; | 275 | pkt->pts = iff->audio_frame_count; |
| 276 | iff->audio_frame_count += ret / s->streams[0]->codec->channels; | 276 | iff->audio_frame_count += ret / s->streams[0]->codec->channels; |
| 277 | } | 277 | } |
| @@ -233,16 +233,16 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 232 unmodified lines | |||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | if(s1->video_codec_id){ | 235 | if(s1->video_codec_id){ |
| 236 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 236 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 237 | st->codec->codec_id = s1->video_codec_id; | 237 | st->codec->codec_id = s1->video_codec_id; |
| 238 | }else if(s1->audio_codec_id){ | 238 | }else if(s1->audio_codec_id){ |
| 239 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 239 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 240 | st->codec->codec_id = s1->audio_codec_id; | 240 | st->codec->codec_id = s1->audio_codec_id; |
| 241 | }else{ | 241 | }else{ |
| 242 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 242 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 243 | st->codec->codec_id = av_str2id(img_tags, s->path); | 243 | st->codec->codec_id = av_str2id(img_tags, s->path); |
| 244 | } | 244 | } |
| 245 | if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE) | 245 | if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE) |
| 246 | st->codec->pix_fmt = ap->pix_fmt; | 246 | st->codec->pix_fmt = ap->pix_fmt; |
| 247 | 247 | ||
| 248 | return 0; | 248 | return 0; |
| @@ -566,7 +566,7 @@ static int ipmovie_read_header(AVFormatContext *s, · 565 unmodified lines | |||
| 566 | return AVERROR(ENOMEM); | 566 | return AVERROR(ENOMEM); |
| 567 | av_set_pts_info(st, 63, 1, 1000000); | 567 | av_set_pts_info(st, 63, 1, 1000000); |
| 568 | ipmovie->video_stream_index = st->index; | 568 | ipmovie->video_stream_index = st->index; |
| 569 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 569 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 570 | st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO; | 570 | st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO; |
| 571 | st->codec->codec_tag = 0; /* no fourcc */ | 571 | st->codec->codec_tag = 0; /* no fourcc */ |
| 572 | st->codec->width = ipmovie->video_width; | 572 | st->codec->width = ipmovie->video_width; |
| @@ -582,7 +582,7 @@ static int ipmovie_read_header(AVFormatContext *s, · 9 unmodified lines | |||
| 582 | return AVERROR(ENOMEM); | 582 | return AVERROR(ENOMEM); |
| 583 | av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); | 583 | av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); |
| 584 | ipmovie->audio_stream_index = st->index; | 584 | ipmovie->audio_stream_index = st->index; |
| 585 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 585 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 586 | st->codec->codec_id = ipmovie->audio_type; | 586 | st->codec->codec_id = ipmovie->audio_type; |
| 587 | st->codec->codec_tag = 0; /* no tag */ | 587 | st->codec->codec_tag = 0; /* no tag */ |
| 588 | st->codec->channels = ipmovie->audio_channels; | 588 | st->codec->channels = ipmovie->audio_channels; |
| @@ -92,7 +92,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap) · 91 unmodified lines | |||
| 92 | st = av_new_stream(s, 0); | 92 | st = av_new_stream(s, 0); |
| 93 | if (!st) | 93 | if (!st) |
| 94 | return AVERROR(ENOMEM); | 94 | return AVERROR(ENOMEM); |
| 95 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 95 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 96 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS; | 96 | st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS; |
| 97 | st->codec->channels = stereo ? 2 : 1; | 97 | st->codec->channels = stereo ? 2 : 1; |
| 98 | st->codec->sample_rate = 44100; | 98 | st->codec->sample_rate = 44100; |
| @@ -44,7 +44,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 43 unmodified lines | |||
| 44 | if (!st) | 44 | if (!st) |
| 45 | return AVERROR(ENOMEM); | 45 | return AVERROR(ENOMEM); |
| 46 | 46 | ||
| 47 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 47 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 48 | st->codec->codec_id = CODEC_ID_MPEG4; | 48 | st->codec->codec_id = CODEC_ID_MPEG4; |
| 49 | st->need_parsing = AVSTREAM_PARSE_FULL; | 49 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 50 | av_set_pts_info(st, 64, 1, 90000); | 50 | av_set_pts_info(st, 64, 1, 90000); |
| @@ -77,14 +77,14 @@ static int nut_write_header(AVFormatContext * avf) { · 76 unmodified lines | |||
| 77 | int fourcc = 0; | 77 | int fourcc = 0; |
| 78 | int num, denom, ssize; | 78 | int num, denom, ssize; |
| 79 | 79 | ||
| 80 | s[i].type = codec->codec_type == CODEC_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS; | 80 | s[i].type = codec->codec_type == AVMEDIA_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS; |
| 81 | 81 | ||
| 82 | if (codec->codec_tag) fourcc = codec->codec_tag; | 82 | if (codec->codec_tag) fourcc = codec->codec_tag; |
| 83 | else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id); | 83 | else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id); |
| 84 | 84 | ||
| 85 | if (!fourcc) { | 85 | if (!fourcc) { |
| 86 | if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id); | 86 | if (codec->codec_type == AVMEDIA_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id); |
| 87 | if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); | 87 | if (codec->codec_type == AVMEDIA_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | s[i].fourcc_len = 4; | 90 | s[i].fourcc_len = 4; |
| @@ -102,7 +102,7 @@ static int nut_write_header(AVFormatContext * avf) { · 11 unmodified lines | |||
| 102 | s[i].codec_specific_len = codec->extradata_size; | 102 | s[i].codec_specific_len = codec->extradata_size; |
| 103 | s[i].codec_specific = codec->extradata; | 103 | s[i].codec_specific = codec->extradata; |
| 104 | 104 | ||
| 105 | if (codec->codec_type == CODEC_TYPE_VIDEO) { | 105 | if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 106 | s[i].width = codec->width; | 106 | s[i].width = codec->width; |
| 107 | s[i].height = codec->height; | 107 | s[i].height = codec->height; |
| 108 | s[i].sample_width = 0; | 108 | s[i].sample_width = 0; |
| @@ -234,14 +234,14 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) { · 125 unmodified lines | |||
| 234 | 234 | ||
| 235 | switch(s[i].type) { | 235 | switch(s[i].type) { |
| 236 | case NUT_AUDIO_CLASS: | 236 | case NUT_AUDIO_CLASS: |
| 237 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 237 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 238 | if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag); | 238 | if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag); |
| 239 | 239 | ||
| 240 | st->codec->channels = s[i].channel_count; | 240 | st->codec->channels = s[i].channel_count; |
| 241 | st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom; | 241 | st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom; |
| 242 | break; | 242 | break; |
| 243 | case NUT_VIDEO_CLASS: | 243 | case NUT_VIDEO_CLASS: |
| 244 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 244 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 245 | if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag); | 245 | if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag); |
| 246 | 246 | ||
| 247 | st->codec->width = s[i].width; | 247 | st->codec->width = s[i].width; |
| @@ -62,14 +62,14 @@ static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 61 unmodified lines | |||
| 62 | 62 | ||
| 63 | if (!(st = av_new_stream(s, 0))) | 63 | if (!(st = av_new_stream(s, 0))) |
| 64 | return AVERROR(ENOMEM); | 64 | return AVERROR(ENOMEM); |
| 65 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 65 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 66 | st->codec->codec_id = CODEC_ID_MPEG4; | 66 | st->codec->codec_id = CODEC_ID_MPEG4; |
| 67 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 67 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 68 | av_set_pts_info(st, 64, 1001, 30000); | 68 | av_set_pts_info(st, 64, 1001, 30000); |
| 69 | 69 | ||
| 70 | if (!(st = av_new_stream(s, 1))) | 70 | if (!(st = av_new_stream(s, 1))) |
| 71 | return AVERROR(ENOMEM); | 71 | return AVERROR(ENOMEM); |
| 72 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 72 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 73 | st->codec->codec_id = CODEC_ID_MP2; | 73 | st->codec->codec_id = CODEC_ID_MP2; |
| 74 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 74 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 75 | 75 | ||
| @@ -1378,7 +1378,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 1377 unmodified lines | |||
| 1378 | } | 1378 | } |
| 1379 | 1379 | ||
| 1380 | if (track->type == MATROSKA_TRACK_TYPE_VIDEO) { | 1380 | if (track->type == MATROSKA_TRACK_TYPE_VIDEO) { |
| 1381 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 1381 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 1382 | st->codec->codec_tag = track->video.fourcc; | 1382 | st->codec->codec_tag = track->video.fourcc; |
| 1383 | st->codec->width = track->video.pixel_width; | 1383 | st->codec->width = track->video.pixel_width; |
| 1384 | st->codec->height = track->video.pixel_height; | 1384 | st->codec->height = track->video.pixel_height; |
| @@ -1390,11 +1390,11 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines | |||
| 1390 | if (st->codec->codec_id != CODEC_ID_H264) | 1390 | if (st->codec->codec_id != CODEC_ID_H264) |
| 1391 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 1391 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 1392 | } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) { | 1392 | } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) { |
| 1393 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 1393 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 1394 | st->codec->sample_rate = track->audio.out_samplerate; | 1394 | st->codec->sample_rate = track->audio.out_samplerate; |
| 1395 | st->codec->channels = track->audio.channels; | 1395 | st->codec->channels = track->audio.channels; |
| 1396 | } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) { | 1396 | } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) { |
| 1397 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 1397 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 1398 | } | 1398 | } |
| 1399 | } | 1399 | } |
| 1400 | 1400 | ||
| @@ -1409,7 +1409,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 8 unmodified lines | |||
| 1409 | break; | 1409 | break; |
| 1410 | av_metadata_set(&st->metadata, "filename",attachements[j].filename); | 1410 | av_metadata_set(&st->metadata, "filename",attachements[j].filename); |
| 1411 | st->codec->codec_id = CODEC_ID_NONE; | 1411 | st->codec->codec_id = CODEC_ID_NONE; |
| 1412 | st->codec->codec_type = CODEC_TYPE_ATTACHMENT; | 1412 | st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; |
| 1413 | st->codec->extradata = av_malloc(attachements[j].bin.size); | 1413 | st->codec->extradata = av_malloc(attachements[j].bin.size); |
| 1414 | if(st->codec->extradata == NULL) | 1414 | if(st->codec->extradata == NULL) |
| 1415 | break; | 1415 | break; |
| @@ -475,7 +475,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec · 474 unmodified lines | |||
| 475 | ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size); | 475 | ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size); |
| 476 | else if (codec->extradata_size) | 476 | else if (codec->extradata_size) |
| 477 | put_buffer(dyn_cp, codec->extradata, codec->extradata_size); | 477 | put_buffer(dyn_cp, codec->extradata, codec->extradata_size); |
| 478 | } else if (codec->codec_type == CODEC_TYPE_VIDEO) { | 478 | } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 479 | if (qt_id) { | 479 | if (qt_id) { |
| 480 | if (!codec->codec_tag) | 480 | if (!codec->codec_tag) |
| 481 | codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id); | 481 | codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id); |
| @@ -492,7 +492,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec · 10 unmodified lines | |||
| 492 | ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0); | 492 | ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0); |
| 493 | } | 493 | } |
| 494 | 494 | ||
| 495 | } else if (codec->codec_type == CODEC_TYPE_AUDIO) { | 495 | } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 496 | unsigned int tag; | 496 | unsigned int tag; |
| 497 | tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); | 497 | tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); |
| 498 | if (!tag) { | 498 | if (!tag) { |
| @@ -565,7 +565,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 66 unmodified lines | |||
| 565 | } | 565 | } |
| 566 | 566 | ||
| 567 | switch (codec->codec_type) { | 567 | switch (codec->codec_type) { |
| 568 | case CODEC_TYPE_VIDEO: | 568 | case AVMEDIA_TYPE_VIDEO: |
| 569 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO); | 569 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO); |
| 570 | 570 | ||
| 571 | if (!native_id && | 571 | if (!native_id && |
| @@ -596,7 +596,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 24 unmodified lines | |||
| 596 | end_ebml_master(pb, subinfo); | 596 | end_ebml_master(pb, subinfo); |
| 597 | break; | 597 | break; |
| 598 | 598 | ||
| 599 | case CODEC_TYPE_AUDIO: | 599 | case AVMEDIA_TYPE_AUDIO: |
| 600 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_AUDIO); | 600 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_AUDIO); |
| 601 | 601 | ||
| 602 | if (!native_id) | 602 | if (!native_id) |
| @@ -613,7 +613,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 10 unmodified lines | |||
| 613 | end_ebml_master(pb, subinfo); | 613 | end_ebml_master(pb, subinfo); |
| 614 | break; | 614 | break; |
| 615 | 615 | ||
| 616 | case CODEC_TYPE_SUBTITLE: | 616 | case AVMEDIA_TYPE_SUBTITLE: |
| 617 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE); | 617 | put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE); |
| 618 | break; | 618 | break; |
| 619 | default: | 619 | default: |
| @@ -893,7 +893,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt) · 273 unmodified lines | |||
| 893 | av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size)); | 893 | av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size)); |
| 894 | } | 894 | } |
| 895 | 895 | ||
| 896 | if (codec->codec_type != CODEC_TYPE_SUBTITLE) { | 896 | if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) { |
| 897 | mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7); | 897 | mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7); |
| 898 | } else if (codec->codec_id == CODEC_ID_SSA) { | 898 | } else if (codec->codec_id == CODEC_ID_SSA) { |
| 899 | duration = mkv_write_ass_blocks(s, pb, pkt); | 899 | duration = mkv_write_ass_blocks(s, pb, pkt); |
| @@ -905,7 +905,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines | |||
| 905 | end_ebml_master(pb, blockgroup); | 905 | end_ebml_master(pb, blockgroup); |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | if (codec->codec_type == CODEC_TYPE_VIDEO && keyframe) { | 908 | if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe) { |
| 909 | ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, ts, mkv->cluster_pos); | 909 | ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, ts, mkv->cluster_pos); |
| 910 | if (ret < 0) return ret; | 910 | if (ret < 0) return ret; |
| 911 | } | 911 | } |
| @@ -108,7 +108,7 @@ static int read_header(AVFormatContext *s, · 107 unmodified lines | |||
| 108 | st = av_new_stream(s, 0); | 108 | st = av_new_stream(s, 0); |
| 109 | if (!st) | 109 | if (!st) |
| 110 | return AVERROR(ENOMEM); | 110 | return AVERROR(ENOMEM); |
| 111 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 111 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 112 | st->codec->codec_id = CODEC_ID_MMVIDEO; | 112 | st->codec->codec_id = CODEC_ID_MMVIDEO; |
| 113 | st->codec->codec_tag = 0; /* no fourcc */ | 113 | st->codec->codec_tag = 0; /* no fourcc */ |
| 114 | st->codec->width = width; | 114 | st->codec->width = width; |
| @@ -120,7 +120,7 @@ static int read_header(AVFormatContext *s, · 5 unmodified lines | |||
| 120 | st = av_new_stream(s, 0); | 120 | st = av_new_stream(s, 0); |
| 121 | if (!st) | 121 | if (!st) |
| 122 | return AVERROR(ENOMEM); | 122 | return AVERROR(ENOMEM); |
| 123 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 123 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 124 | st->codec->codec_tag = 0; /* no fourcc */ | 124 | st->codec->codec_tag = 0; /* no fourcc */ |
| 125 | st->codec->codec_id = CODEC_ID_PCM_U8; | 125 | st->codec->codec_id = CODEC_ID_PCM_U8; |
| 126 | st->codec->channels = 1; | 126 | st->codec->channels = 1; |
| @@ -244,7 +244,7 @@ static int mmf_read_header(AVFormatContext *s, · 243 unmodified lines | |||
| 244 | if (!st) | 244 | if (!st) |
| 245 | return AVERROR(ENOMEM); | 245 | return AVERROR(ENOMEM); |
| 246 | 246 | ||
| 247 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 247 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 248 | st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA; | 248 | st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA; |
| 249 | st->codec->sample_rate = rate; | 249 | st->codec->sample_rate = rate; |
| 250 | st->codec->channels = 1; | 250 | st->codec->channels = 1; |
| @@ -411,13 +411,13 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 410 unmodified lines | |||
| 411 | dprintf(c->fc, "stype= %.4s\n", (char*)&type); | 411 | dprintf(c->fc, "stype= %.4s\n", (char*)&type); |
| 412 | 412 | ||
| 413 | if (type == MKTAG('v','i','d','e')) | 413 | if (type == MKTAG('v','i','d','e')) |
| 414 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 414 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 415 | else if(type == MKTAG('s','o','u','n')) | 415 | else if(type == MKTAG('s','o','u','n')) |
| 416 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 416 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 417 | else if(type == MKTAG('m','1','a',' ')) | 417 | else if(type == MKTAG('m','1','a',' ')) |
| 418 | st->codec->codec_id = CODEC_ID_MP2; | 418 | st->codec->codec_id = CODEC_ID_MP2; |
| 419 | else if(type == MKTAG('s','u','b','p')) | 419 | else if(type == MKTAG('s','u','b','p')) |
| 420 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 420 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 421 | 421 | ||
| 422 | get_be32(pb); /* component manufacture */ | 422 | get_be32(pb); /* component manufacture */ |
| 423 | get_be32(pb); /* component flags */ | 423 | get_be32(pb); /* component flags */ |
| @@ -933,19 +933,19 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 509 unmodified lines | |||
| 933 | if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8))) | 933 | if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8))) |
| 934 | id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF); | 934 | id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF); |
| 935 | 935 | ||
| 936 | if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) { | 936 | if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) { |
| 937 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 937 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 938 | } else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */ | 938 | } else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */ |
| 939 | format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */ | 939 | format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */ |
| 940 | id = ff_codec_get_id(codec_movvideo_tags, format); | 940 | id = ff_codec_get_id(codec_movvideo_tags, format); |
| 941 | if (id <= 0) | 941 | if (id <= 0) |
| 942 | id = ff_codec_get_id(ff_codec_bmp_tags, format); | 942 | id = ff_codec_get_id(ff_codec_bmp_tags, format); |
| 943 | if (id > 0) | 943 | if (id > 0) |
| 944 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 944 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 945 | else if(st->codec->codec_type == CODEC_TYPE_DATA){ | 945 | else if(st->codec->codec_type == AVMEDIA_TYPE_DATA){ |
| 946 | id = ff_codec_get_id(ff_codec_movsubtitle_tags, format); | 946 | id = ff_codec_get_id(ff_codec_movsubtitle_tags, format); |
| 947 | if(id > 0) | 947 | if(id > 0) |
| 948 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 948 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 949 | } | 949 | } |
| 950 | } | 950 | } |
| 951 | 951 | ||
| @@ -953,7 +953,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 1 unmodified line | |||
| 953 | (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, | 953 | (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, |
| 954 | (format >> 24) & 0xff, st->codec->codec_type); | 954 | (format >> 24) & 0xff, st->codec->codec_type); |
| 955 | 955 | ||
| 956 | if(st->codec->codec_type==CODEC_TYPE_VIDEO) { | 956 | if(st->codec->codec_type==AVMEDIA_TYPE_VIDEO) { |
| 957 | unsigned int color_depth, len; | 957 | unsigned int color_depth, len; |
| 958 | int color_greyscale; | 958 | int color_greyscale; |
| 959 | 959 | ||
| @@ -1057,7 +1057,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 97 unmodified lines | |||
| 1057 | } | 1057 | } |
| 1058 | st->codec->palctrl->palette_changed = 1; | 1058 | st->codec->palctrl->palette_changed = 1; |
| 1059 | } | 1059 | } |
| 1060 | } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) { | 1060 | } else if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO) { |
| 1061 | int bits_per_sample, flags; | 1061 | int bits_per_sample, flags; |
| 1062 | uint16_t version = get_be16(pb); | 1062 | uint16_t version = get_be16(pb); |
| 1063 | 1063 | ||
| @@ -1137,7 +1137,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 73 unmodified lines | |||
| 1137 | st->codec->bits_per_coded_sample = bits_per_sample; | 1137 | st->codec->bits_per_coded_sample = bits_per_sample; |
| 1138 | sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; | 1138 | sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; |
| 1139 | } | 1139 | } |
| 1140 | } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){ | 1140 | } else if(st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){ |
| 1141 | // ttxt stsd contains display flags, justification, background | 1141 | // ttxt stsd contains display flags, justification, background |
| 1142 | // color, fonts, and default styles, so fake an atom to read it | 1142 | // color, fonts, and default styles, so fake an atom to read it |
| 1143 | MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) }; | 1143 | MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) }; |
| @@ -1159,7 +1159,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 15 unmodified lines | |||
| 1159 | url_fskip(pb, a.size); | 1159 | url_fskip(pb, a.size); |
| 1160 | } | 1160 | } |
| 1161 | 1161 | ||
| 1162 | if(st->codec->codec_type==CODEC_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1) | 1162 | if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1) |
| 1163 | st->codec->sample_rate= sc->time_scale; | 1163 | st->codec->sample_rate= sc->time_scale; |
| 1164 | 1164 | ||
| 1165 | /* special codec parameters handling */ | 1165 | /* special codec parameters handling */ |
| @@ -1196,7 +1196,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 30 unmodified lines | |||
| 1196 | break; | 1196 | break; |
| 1197 | case CODEC_ID_MP2: | 1197 | case CODEC_ID_MP2: |
| 1198 | case CODEC_ID_MP3: | 1198 | case CODEC_ID_MP3: |
| 1199 | st->codec->codec_type = CODEC_TYPE_AUDIO; /* force type after stsd for m1a hdlr */ | 1199 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */ |
| 1200 | st->need_parsing = AVSTREAM_PARSE_FULL; | 1200 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 1201 | break; | 1201 | break; |
| 1202 | case CODEC_ID_GSM: | 1202 | case CODEC_ID_GSM: |
| @@ -1490,7 +1490,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 287 unmodified lines | |||
| 1490 | } | 1490 | } |
| 1491 | 1491 | ||
| 1492 | /* only use old uncompressed audio chunk demuxing when stts specifies it */ | 1492 | /* only use old uncompressed audio chunk demuxing when stts specifies it */ |
| 1493 | if (!(st->codec->codec_type == CODEC_TYPE_AUDIO && | 1493 | if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 1494 | sc->stts_count == 1 && sc->stts_data[0].duration == 1)) { | 1494 | sc->stts_count == 1 && sc->stts_data[0].duration == 1)) { |
| 1495 | unsigned int current_sample = 0; | 1495 | unsigned int current_sample = 0; |
| 1496 | unsigned int stts_sample = 0; | 1496 | unsigned int stts_sample = 0; |
| @@ -1698,7 +1698,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 201 unmodified lines | |||
| 1698 | if (!sc) return AVERROR(ENOMEM); | 1698 | if (!sc) return AVERROR(ENOMEM); |
| 1699 | 1699 | ||
| 1700 | st->priv_data = sc; | 1700 | st->priv_data = sc; |
| 1701 | st->codec->codec_type = CODEC_TYPE_DATA; | 1701 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 1702 | sc->ffindex = st->index; | 1702 | sc->ffindex = st->index; |
| 1703 | 1703 | ||
| 1704 | if ((ret = mov_read_default(c, pb, atom)) < 0) | 1704 | if ((ret = mov_read_default(c, pb, atom)) < 0) |
| @@ -1721,7 +1721,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 16 unmodified lines | |||
| 1721 | 1721 | ||
| 1722 | av_set_pts_info(st, 64, 1, sc->time_scale); | 1722 | av_set_pts_info(st, 64, 1, sc->time_scale); |
| 1723 | 1723 | ||
| 1724 | if (st->codec->codec_type == CODEC_TYPE_AUDIO && | 1724 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 1725 | !st->codec->frame_size && sc->stts_count == 1) { | 1725 | !st->codec->frame_size && sc->stts_count == 1) { |
| 1726 | st->codec->frame_size = av_rescale(sc->stts_data[0].duration, | 1726 | st->codec->frame_size = av_rescale(sc->stts_data[0].duration, |
| 1727 | st->codec->sample_rate, sc->time_scale); | 1727 | st->codec->sample_rate, sc->time_scale); |
| @@ -1741,7 +1741,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 13 unmodified lines | |||
| 1741 | } else | 1741 | } else |
| 1742 | sc->pb = c->fc->pb; | 1742 | sc->pb = c->fc->pb; |
| 1743 | 1743 | ||
| 1744 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 1744 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1745 | if (st->codec->width != sc->width || st->codec->height != sc->height) { | 1745 | if (st->codec->width != sc->width || st->codec->height != sc->height) { |
| 1746 | AVRational r = av_d2q(((double)st->codec->height * sc->width) / | 1746 | AVRational r = av_d2q(((double)st->codec->height * sc->width) / |
| 1747 | ((double)st->codec->width * sc->height), INT_MAX); | 1747 | ((double)st->codec->width * sc->height), INT_MAX); |
| @@ -2004,7 +2004,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 256 unmodified lines | |||
| 2004 | sc->ctts_data[sc->ctts_count].duration = get_be32(pb); | 2004 | sc->ctts_data[sc->ctts_count].duration = get_be32(pb); |
| 2005 | sc->ctts_count++; | 2005 | sc->ctts_count++; |
| 2006 | } | 2006 | } |
| 2007 | if ((keyframe = st->codec->codec_type == CODEC_TYPE_AUDIO || | 2007 | if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO || |
| 2008 | (flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000)) | 2008 | (flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000)) |
| 2009 | distance = 0; | 2009 | distance = 0; |
| 2010 | av_add_index_entry(st, offset, dts, sample_size, distance, | 2010 | av_add_index_entry(st, offset, dts, sample_size, distance, |
| @@ -333,7 +333,7 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack *track) // Basic · 332 unmodified lines | |||
| 333 | 333 | ||
| 334 | // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio) | 334 | // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio) |
| 335 | // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved) | 335 | // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved) |
| 336 | if(track->enc->codec_type == CODEC_TYPE_AUDIO) | 336 | if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO) |
| 337 | put_byte(pb, 0x15); // flags (= Audiostream) | 337 | put_byte(pb, 0x15); // flags (= Audiostream) |
| 338 | else | 338 | else |
| 339 | put_byte(pb, 0x11); // flags (= Visualstream) | 339 | put_byte(pb, 0x11); // flags (= Visualstream) |
| @@ -620,8 +620,8 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 280 unmodified lines | |||
| 620 | else if (track->enc->codec_id == CODEC_ID_AC3) tag = MKTAG('a','c','-','3'); | 620 | else if (track->enc->codec_id == CODEC_ID_AC3) tag = MKTAG('a','c','-','3'); |
| 621 | else if (track->enc->codec_id == CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c'); | 621 | else if (track->enc->codec_id == CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c'); |
| 622 | else if (track->enc->codec_id == CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g'); | 622 | else if (track->enc->codec_id == CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g'); |
| 623 | else if (track->enc->codec_type == CODEC_TYPE_VIDEO) tag = MKTAG('m','p','4','v'); | 623 | else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v'); |
| 624 | else if (track->enc->codec_type == CODEC_TYPE_AUDIO) tag = MKTAG('m','p','4','a'); | 624 | else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a'); |
| 625 | 625 | ||
| 626 | return tag; | 626 | return tag; |
| 627 | } | 627 | } |
| @@ -642,7 +642,7 @@ static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 14 unmodified lines | |||
| 642 | int tag = track->enc->codec_tag; | 642 | int tag = track->enc->codec_tag; |
| 643 | 643 | ||
| 644 | // keep original tag for subs, ipod supports both formats | 644 | // keep original tag for subs, ipod supports both formats |
| 645 | if (!(track->enc->codec_type == CODEC_TYPE_SUBTITLE && | 645 | if (!(track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE && |
| 646 | (tag == MKTAG('t','x','3','g') || | 646 | (tag == MKTAG('t','x','3','g') || |
| 647 | tag == MKTAG('t','e','x','t')))) | 647 | tag == MKTAG('t','e','x','t')))) |
| 648 | tag = ff_codec_get_tag(codec_ipod_tags, track->enc->codec_id); | 648 | tag = ff_codec_get_tag(codec_ipod_tags, track->enc->codec_id); |
| @@ -714,7 +714,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 65 unmodified lines | |||
| 714 | tag = mov_get_dv_codec_tag(s, track); | 714 | tag = mov_get_dv_codec_tag(s, track); |
| 715 | else if (track->enc->codec_id == CODEC_ID_RAWVIDEO) | 715 | else if (track->enc->codec_id == CODEC_ID_RAWVIDEO) |
| 716 | tag = mov_get_rawvideo_codec_tag(s, track); | 716 | tag = mov_get_rawvideo_codec_tag(s, track); |
| 717 | else if (track->enc->codec_type == CODEC_TYPE_VIDEO) { | 717 | else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 718 | tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id); | 718 | tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id); |
| 719 | if (!tag) { // if no mac fcc found, try with Microsoft tags | 719 | if (!tag) { // if no mac fcc found, try with Microsoft tags |
| 720 | tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id); | 720 | tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id); |
| @@ -722,7 +722,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 1 unmodified line | |||
| 722 | av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, " | 722 | av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, " |
| 723 | "the file may be unplayable!\n"); | 723 | "the file may be unplayable!\n"); |
| 724 | } | 724 | } |
| 725 | } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) { | 725 | } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 726 | tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id); | 726 | tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id); |
| 727 | if (!tag) { // if no mac fcc found, try with Microsoft tags | 727 | if (!tag) { // if no mac fcc found, try with Microsoft tags |
| 728 | int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id); | 728 | int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id); |
| @@ -732,7 +732,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 3 unmodified lines | |||
| 732 | "the file may be unplayable!\n"); | 732 | "the file may be unplayable!\n"); |
| 733 | } | 733 | } |
| 734 | } | 734 | } |
| 735 | } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) | 735 | } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 736 | tag = ff_codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id); | 736 | tag = ff_codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id); |
| 737 | } | 737 | } |
| 738 | 738 | ||
| @@ -868,11 +868,11 @@ static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack *track) · 129 unmodified lines | |||
| 868 | put_tag(pb, "stsd"); | 868 | put_tag(pb, "stsd"); |
| 869 | put_be32(pb, 0); /* version & flags */ | 869 | put_be32(pb, 0); /* version & flags */ |
| 870 | put_be32(pb, 1); /* entry count */ | 870 | put_be32(pb, 1); /* entry count */ |
| 871 | if (track->enc->codec_type == CODEC_TYPE_VIDEO) | 871 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) |
| 872 | mov_write_video_tag(pb, track); | 872 | mov_write_video_tag(pb, track); |
| 873 | else if (track->enc->codec_type == CODEC_TYPE_AUDIO) | 873 | else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) |
| 874 | mov_write_audio_tag(pb, track); | 874 | mov_write_audio_tag(pb, track); |
| 875 | else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) | 875 | else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 876 | mov_write_subtitle_tag(pb, track); | 876 | mov_write_subtitle_tag(pb, track); |
| 877 | return updateSize(pb, pos); | 877 | return updateSize(pb, pos); |
| 878 | } | 878 | } |
| @@ -918,7 +918,7 @@ static int mov_write_stts_tag(ByteIOContext *pb, MOVTrack *track) · 39 unmodified lines | |||
| 918 | uint32_t atom_size; | 918 | uint32_t atom_size; |
| 919 | int i; | 919 | int i; |
| 920 | 920 | ||
| 921 | if (track->enc->codec_type == CODEC_TYPE_AUDIO && !track->audio_vbr) { | 921 | if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) { |
| 922 | stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */ | 922 | stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */ |
| 923 | stts_entries[0].count = track->sampleCount; | 923 | stts_entries[0].count = track->sampleCount; |
| 924 | stts_entries[0].duration = 1; | 924 | stts_entries[0].duration = 1; |
| @@ -973,12 +973,12 @@ static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack *track) · 48 unmodified lines | |||
| 973 | put_tag(pb, "stbl"); | 973 | put_tag(pb, "stbl"); |
| 974 | mov_write_stsd_tag(pb, track); | 974 | mov_write_stsd_tag(pb, track); |
| 975 | mov_write_stts_tag(pb, track); | 975 | mov_write_stts_tag(pb, track); |
| 976 | if (track->enc->codec_type == CODEC_TYPE_VIDEO && | 976 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && |
| 977 | track->hasKeyframes && track->hasKeyframes < track->entry) | 977 | track->hasKeyframes && track->hasKeyframes < track->entry) |
| 978 | mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE); | 978 | mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE); |
| 979 | if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS) | 979 | if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS) |
| 980 | mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE); | 980 | mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE); |
| 981 | if (track->enc->codec_type == CODEC_TYPE_VIDEO && | 981 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && |
| 982 | track->flags & MOV_TRACK_CTTS) | 982 | track->flags & MOV_TRACK_CTTS) |
| 983 | mov_write_ctts_tag(pb, track); | 983 | mov_write_ctts_tag(pb, track); |
| 984 | mov_write_stsc_tag(pb, track); | 984 | mov_write_stsc_tag(pb, track); |
| @@ -1050,13 +1050,13 @@ static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track) · 65 unmodified lines | |||
| 1050 | descr = "DataHandler"; | 1050 | descr = "DataHandler"; |
| 1051 | } else { | 1051 | } else { |
| 1052 | hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0"; | 1052 | hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0"; |
| 1053 | if (track->enc->codec_type == CODEC_TYPE_VIDEO) { | 1053 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1054 | hdlr_type = "vide"; | 1054 | hdlr_type = "vide"; |
| 1055 | descr = "VideoHandler"; | 1055 | descr = "VideoHandler"; |
| 1056 | } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) { | 1056 | } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 1057 | hdlr_type = "soun"; | 1057 | hdlr_type = "soun"; |
| 1058 | descr = "SoundHandler"; | 1058 | descr = "SoundHandler"; |
| 1059 | } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) { | 1059 | } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) { |
| 1060 | if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl"; | 1060 | if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl"; |
| 1061 | else hdlr_type = "text"; | 1061 | else hdlr_type = "text"; |
| 1062 | descr = "SubtitleHandler"; | 1062 | descr = "SubtitleHandler"; |
| @@ -1084,11 +1084,11 @@ static int mov_write_minf_tag(ByteIOContext *pb, MOVTrack *track) · 21 unmodified lines | |||
| 1084 | int64_t pos = url_ftell(pb); | 1084 | int64_t pos = url_ftell(pb); |
| 1085 | put_be32(pb, 0); /* size */ | 1085 | put_be32(pb, 0); /* size */ |
| 1086 | put_tag(pb, "minf"); | 1086 | put_tag(pb, "minf"); |
| 1087 | if(track->enc->codec_type == CODEC_TYPE_VIDEO) | 1087 | if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO) |
| 1088 | mov_write_vmhd_tag(pb); | 1088 | mov_write_vmhd_tag(pb); |
| 1089 | else if (track->enc->codec_type == CODEC_TYPE_AUDIO) | 1089 | else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) |
| 1090 | mov_write_smhd_tag(pb); | 1090 | mov_write_smhd_tag(pb); |
| 1091 | else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) { | 1091 | else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) { |
| 1092 | if (track->tag == MKTAG('t','e','x','t')) mov_write_gmhd_tag(pb); | 1092 | if (track->tag == MKTAG('t','e','x','t')) mov_write_gmhd_tag(pb); |
| 1093 | else mov_write_nmhd_tag(pb); | 1093 | else mov_write_nmhd_tag(pb); |
| 1094 | } | 1094 | } |
| @@ -1165,7 +1165,7 @@ static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack *track, AVStream *st) · 70 unmodified lines | |||
| 1165 | put_be32(pb, 0); /* reserved */ | 1165 | put_be32(pb, 0); /* reserved */ |
| 1166 | put_be32(pb, 0x0); /* reserved (Layer & Alternate group) */ | 1166 | put_be32(pb, 0x0); /* reserved (Layer & Alternate group) */ |
| 1167 | /* Volume, only for audio */ | 1167 | /* Volume, only for audio */ |
| 1168 | if(track->enc->codec_type == CODEC_TYPE_AUDIO) | 1168 | if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO) |
| 1169 | put_be16(pb, 0x0100); | 1169 | put_be16(pb, 0x0100); |
| 1170 | else | 1170 | else |
| 1171 | put_be16(pb, 0); | 1171 | put_be16(pb, 0); |
| @@ -1183,8 +1183,8 @@ static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack *track, AVStream *st) · 11 unmodified lines | |||
| 1183 | put_be32(pb, 0x40000000); /* reserved */ | 1183 | put_be32(pb, 0x40000000); /* reserved */ |
| 1184 | 1184 | ||
| 1185 | /* Track width and height, for visual only */ | 1185 | /* Track width and height, for visual only */ |
| 1186 | if(track->enc->codec_type == CODEC_TYPE_VIDEO || | 1186 | if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO || |
| 1187 | track->enc->codec_type == CODEC_TYPE_SUBTITLE) { | 1187 | track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) { |
| 1188 | double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio); | 1188 | double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio); |
| 1189 | if(!sample_aspect_ratio || track->height != track->enc->height) | 1189 | if(!sample_aspect_ratio || track->height != track->enc->height) |
| 1190 | sample_aspect_ratio = 1; | 1190 | sample_aspect_ratio = 1; |
| @@ -1671,7 +1671,7 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) · 480 unmodified lines | |||
| 1671 | 1671 | ||
| 1672 | for (i = 0; i < s->nb_streams; i++) { | 1672 | for (i = 0; i < s->nb_streams; i++) { |
| 1673 | AVStream *st = s->streams[i]; | 1673 | AVStream *st = s->streams[i]; |
| 1674 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) | 1674 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 1675 | has_video = 1; | 1675 | has_video = 1; |
| 1676 | if (st->codec->codec_id == CODEC_ID_H264) | 1676 | if (st->codec->codec_id == CODEC_ID_H264) |
| 1677 | has_h264 = 1; | 1677 | has_h264 = 1; |
| @@ -1829,7 +1829,7 @@ static int mov_write_header(AVFormatContext *s) · 151 unmodified lines | |||
| 1829 | "codec not currently supported in container\n", i); | 1829 | "codec not currently supported in container\n", i); |
| 1830 | goto error; | 1830 | goto error; |
| 1831 | } | 1831 | } |
| 1832 | if(st->codec->codec_type == CODEC_TYPE_VIDEO){ | 1832 | if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 1833 | if (track->tag == MKTAG('m','x','3','p') || track->tag == MKTAG('m','x','3','n') || | 1833 | if (track->tag == MKTAG('m','x','3','p') || track->tag == MKTAG('m','x','3','n') || |
| 1834 | track->tag == MKTAG('m','x','4','p') || track->tag == MKTAG('m','x','4','n') || | 1834 | track->tag == MKTAG('m','x','4','p') || track->tag == MKTAG('m','x','4','n') || |
| 1835 | track->tag == MKTAG('m','x','5','p') || track->tag == MKTAG('m','x','5','n')) { | 1835 | track->tag == MKTAG('m','x','5','p') || track->tag == MKTAG('m','x','5','n')) { |
| @@ -1845,7 +1845,7 @@ static int mov_write_header(AVFormatContext *s) · 9 unmodified lines | |||
| 1845 | "WARNING codec timebase is very high. If duration is too long,\n" | 1845 | "WARNING codec timebase is very high. If duration is too long,\n" |
| 1846 | "file may not be playable by quicktime. Specify a shorter timebase\n" | 1846 | "file may not be playable by quicktime. Specify a shorter timebase\n" |
| 1847 | "or choose different container.\n"); | 1847 | "or choose different container.\n"); |
| 1848 | }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){ | 1848 | }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO){ |
| 1849 | track->timescale = st->codec->sample_rate; | 1849 | track->timescale = st->codec->sample_rate; |
| 1850 | if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) { | 1850 | if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) { |
| 1851 | av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i); | 1851 | av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i); |
| @@ -1868,7 +1868,7 @@ static int mov_write_header(AVFormatContext *s) · 16 unmodified lines | |||
| 1868 | goto error; | 1868 | goto error; |
| 1869 | } | 1869 | } |
| 1870 | } | 1870 | } |
| 1871 | }else if(st->codec->codec_type == CODEC_TYPE_SUBTITLE){ | 1871 | }else if(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE){ |
| 1872 | track->timescale = st->codec->time_base.den; | 1872 | track->timescale = st->codec->time_base.den; |
| 1873 | } | 1873 | } |
| 1874 | if (!track->height) | 1874 | if (!track->height) |
| @@ -140,7 +140,7 @@ static int mp3_read_header(AVFormatContext *s, · 139 unmodified lines | |||
| 140 | if (!st) | 140 | if (!st) |
| 141 | return AVERROR(ENOMEM); | 141 | return AVERROR(ENOMEM); |
| 142 | 142 | ||
| 143 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 143 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 144 | st->codec->codec_id = CODEC_ID_MP3; | 144 | st->codec->codec_id = CODEC_ID_MP3; |
| 145 | st->need_parsing = AVSTREAM_PARSE_FULL; | 145 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 146 | st->start_time = 0; | 146 | st->start_time = 0; |
| @@ -104,7 +104,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 103 unmodified lines | |||
| 104 | st = av_new_stream(s, 0); | 104 | st = av_new_stream(s, 0); |
| 105 | if (!st) | 105 | if (!st) |
| 106 | return AVERROR(ENOMEM); | 106 | return AVERROR(ENOMEM); |
| 107 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 107 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 108 | st->codec->codec_id = CODEC_ID_MUSEPACK7; | 108 | st->codec->codec_id = CODEC_ID_MUSEPACK7; |
| 109 | st->codec->channels = 2; | 109 | st->codec->channels = 2; |
| 110 | st->codec->bits_per_coded_sample = 16; | 110 | st->codec->bits_per_coded_sample = 16; |
| @@ -224,7 +224,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) · 223 unmodified lines | |||
| 224 | st = av_new_stream(s, 0); | 224 | st = av_new_stream(s, 0); |
| 225 | if (!st) | 225 | if (!st) |
| 226 | return AVERROR(ENOMEM); | 226 | return AVERROR(ENOMEM); |
| 227 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 227 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 228 | st->codec->codec_id = CODEC_ID_MUSEPACK8; | 228 | st->codec->codec_id = CODEC_ID_MUSEPACK8; |
| 229 | st->codec->bits_per_coded_sample = 16; | 229 | st->codec->bits_per_coded_sample = 16; |
| 230 | 230 | ||
| @@ -417,7 +417,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 416 unmodified lines | |||
| 417 | AVStream *st; | 417 | AVStream *st; |
| 418 | int len, startcode, i, es_type; | 418 | int len, startcode, i, es_type; |
| 419 | enum CodecID codec_id = CODEC_ID_NONE; | 419 | enum CodecID codec_id = CODEC_ID_NONE; |
| 420 | enum CodecType type; | 420 | enum AVMediaType type; |
| 421 | int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work | 421 | int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work |
| 422 | uint8_t av_uninit(dvdaudio_substream_type); | 422 | uint8_t av_uninit(dvdaudio_substream_type); |
| 423 | 423 | ||
| @@ -443,26 +443,26 @@ static int mpegps_read_packet(AVFormatContext *s, · 19 unmodified lines | |||
| 443 | if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){ | 443 | if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){ |
| 444 | if(es_type == STREAM_TYPE_VIDEO_MPEG1){ | 444 | if(es_type == STREAM_TYPE_VIDEO_MPEG1){ |
| 445 | codec_id = CODEC_ID_MPEG2VIDEO; | 445 | codec_id = CODEC_ID_MPEG2VIDEO; |
| 446 | type = CODEC_TYPE_VIDEO; | 446 | type = AVMEDIA_TYPE_VIDEO; |
| 447 | } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){ | 447 | } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){ |
| 448 | codec_id = CODEC_ID_MPEG2VIDEO; | 448 | codec_id = CODEC_ID_MPEG2VIDEO; |
| 449 | type = CODEC_TYPE_VIDEO; | 449 | type = AVMEDIA_TYPE_VIDEO; |
| 450 | } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 || | 450 | } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 || |
| 451 | es_type == STREAM_TYPE_AUDIO_MPEG2){ | 451 | es_type == STREAM_TYPE_AUDIO_MPEG2){ |
| 452 | codec_id = CODEC_ID_MP3; | 452 | codec_id = CODEC_ID_MP3; |
| 453 | type = CODEC_TYPE_AUDIO; | 453 | type = AVMEDIA_TYPE_AUDIO; |
| 454 | } else if(es_type == STREAM_TYPE_AUDIO_AAC){ | 454 | } else if(es_type == STREAM_TYPE_AUDIO_AAC){ |
| 455 | codec_id = CODEC_ID_AAC; | 455 | codec_id = CODEC_ID_AAC; |
| 456 | type = CODEC_TYPE_AUDIO; | 456 | type = AVMEDIA_TYPE_AUDIO; |
| 457 | } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){ | 457 | } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){ |
| 458 | codec_id = CODEC_ID_MPEG4; | 458 | codec_id = CODEC_ID_MPEG4; |
| 459 | type = CODEC_TYPE_VIDEO; | 459 | type = AVMEDIA_TYPE_VIDEO; |
| 460 | } else if(es_type == STREAM_TYPE_VIDEO_H264){ | 460 | } else if(es_type == STREAM_TYPE_VIDEO_H264){ |
| 461 | codec_id = CODEC_ID_H264; | 461 | codec_id = CODEC_ID_H264; |
| 462 | type = CODEC_TYPE_VIDEO; | 462 | type = AVMEDIA_TYPE_VIDEO; |
| 463 | } else if(es_type == STREAM_TYPE_AUDIO_AC3){ | 463 | } else if(es_type == STREAM_TYPE_AUDIO_AC3){ |
| 464 | codec_id = CODEC_ID_AC3; | 464 | codec_id = CODEC_ID_AC3; |
| 465 | type = CODEC_TYPE_AUDIO; | 465 | type = AVMEDIA_TYPE_AUDIO; |
| 466 | } else { | 466 | } else { |
| 467 | goto skip; | 467 | goto skip; |
| 468 | } | 468 | } |
| @@ -475,38 +475,38 @@ static int mpegps_read_packet(AVFormatContext *s, · 6 unmodified lines | |||
| 475 | codec_id = CODEC_ID_CAVS; | 475 | codec_id = CODEC_ID_CAVS; |
| 476 | else | 476 | else |
| 477 | codec_id = CODEC_ID_PROBE; | 477 | codec_id = CODEC_ID_PROBE; |
| 478 | type = CODEC_TYPE_VIDEO; | 478 | type = AVMEDIA_TYPE_VIDEO; |
| 479 | } else if (startcode >= 0x1c0 && startcode <= 0x1df) { | 479 | } else if (startcode >= 0x1c0 && startcode <= 0x1df) { |
| 480 | type = CODEC_TYPE_AUDIO; | 480 | type = AVMEDIA_TYPE_AUDIO; |
| 481 | codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2; | 481 | codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2; |
| 482 | } else if (startcode >= 0x80 && startcode <= 0x87) { | 482 | } else if (startcode >= 0x80 && startcode <= 0x87) { |
| 483 | type = CODEC_TYPE_AUDIO; | 483 | type = AVMEDIA_TYPE_AUDIO; |
| 484 | codec_id = CODEC_ID_AC3; | 484 | codec_id = CODEC_ID_AC3; |
| 485 | } else if ( ( startcode >= 0x88 && startcode <= 0x8f) | 485 | } else if ( ( startcode >= 0x88 && startcode <= 0x8f) |
| 486 | ||( startcode >= 0x98 && startcode <= 0x9f)) { | 486 | ||( startcode >= 0x98 && startcode <= 0x9f)) { |
| 487 | /* 0x90 - 0x97 is reserved for SDDS in DVD specs */ | 487 | /* 0x90 - 0x97 is reserved for SDDS in DVD specs */ |
| 488 | type = CODEC_TYPE_AUDIO; | 488 | type = AVMEDIA_TYPE_AUDIO; |
| 489 | codec_id = CODEC_ID_DTS; | 489 | codec_id = CODEC_ID_DTS; |
| 490 | } else if (startcode >= 0xa0 && startcode <= 0xaf) { | 490 | } else if (startcode >= 0xa0 && startcode <= 0xaf) { |
| 491 | type = CODEC_TYPE_AUDIO; | 491 | type = AVMEDIA_TYPE_AUDIO; |
| 492 | /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */ | 492 | /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */ |
| 493 | codec_id = CODEC_ID_PCM_DVD; | 493 | codec_id = CODEC_ID_PCM_DVD; |
| 494 | } else if (startcode >= 0xb0 && startcode <= 0xbf) { | 494 | } else if (startcode >= 0xb0 && startcode <= 0xbf) { |
| 495 | type = CODEC_TYPE_AUDIO; | 495 | type = AVMEDIA_TYPE_AUDIO; |
| 496 | codec_id = CODEC_ID_TRUEHD; | 496 | codec_id = CODEC_ID_TRUEHD; |
| 497 | } else if (startcode >= 0xc0 && startcode <= 0xcf) { | 497 | } else if (startcode >= 0xc0 && startcode <= 0xcf) { |
| 498 | /* Used for both AC-3 and E-AC-3 in EVOB files */ | 498 | /* Used for both AC-3 and E-AC-3 in EVOB files */ |
| 499 | type = CODEC_TYPE_AUDIO; | 499 | type = AVMEDIA_TYPE_AUDIO; |
| 500 | codec_id = CODEC_ID_AC3; | 500 | codec_id = CODEC_ID_AC3; |
| 501 | } else if (startcode >= 0x20 && startcode <= 0x3f) { | 501 | } else if (startcode >= 0x20 && startcode <= 0x3f) { |
| 502 | type = CODEC_TYPE_SUBTITLE; | 502 | type = AVMEDIA_TYPE_SUBTITLE; |
| 503 | codec_id = CODEC_ID_DVD_SUBTITLE; | 503 | codec_id = CODEC_ID_DVD_SUBTITLE; |
| 504 | } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) { | 504 | } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) { |
| 505 | type = CODEC_TYPE_VIDEO; | 505 | type = AVMEDIA_TYPE_VIDEO; |
| 506 | codec_id = CODEC_ID_VC1; | 506 | codec_id = CODEC_ID_VC1; |
| 507 | } else if (startcode == 0x1bd) { | 507 | } else if (startcode == 0x1bd) { |
| 508 | // check dvd audio substream type | 508 | // check dvd audio substream type |
| 509 | type = CODEC_TYPE_AUDIO; | 509 | type = AVMEDIA_TYPE_AUDIO; |
| 510 | switch(dvdaudio_substream_type & 0xe0) { | 510 | switch(dvdaudio_substream_type & 0xe0) { |
| 511 | case 0xa0: codec_id = CODEC_ID_PCM_DVD; | 511 | case 0xa0: codec_id = CODEC_ID_PCM_DVD; |
| 512 | break; | 512 | break; |
| @@ -335,7 +335,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 334 unmodified lines | |||
| 335 | av_set_pts_info(st, 64, 1, 90000); | 335 | av_set_pts_info(st, 64, 1, 90000); |
| 336 | 336 | ||
| 337 | switch(st->codec->codec_type) { | 337 | switch(st->codec->codec_type) { |
| 338 | case CODEC_TYPE_AUDIO: | 338 | case AVMEDIA_TYPE_AUDIO: |
| 339 | if (st->codec->codec_id == CODEC_ID_AC3) { | 339 | if (st->codec->codec_id == CODEC_ID_AC3) { |
| 340 | stream->id = ac3_id++; | 340 | stream->id = ac3_id++; |
| 341 | } else if (st->codec->codec_id == CODEC_ID_DTS) { | 341 | } else if (st->codec->codec_id == CODEC_ID_DTS) { |
| @@ -363,7 +363,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 21 unmodified lines | |||
| 363 | stream->max_buffer_size = 4 * 1024; | 363 | stream->max_buffer_size = 4 * 1024; |
| 364 | s->audio_bound++; | 364 | s->audio_bound++; |
| 365 | break; | 365 | break; |
| 366 | case CODEC_TYPE_VIDEO: | 366 | case AVMEDIA_TYPE_VIDEO: |
| 367 | stream->id = mpv_id++; | 367 | stream->id = mpv_id++; |
| 368 | if (st->codec->rc_buffer_size) | 368 | if (st->codec->rc_buffer_size) |
| 369 | stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8; | 369 | stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8; |
| @@ -379,7 +379,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 9 unmodified lines | |||
| 379 | #endif | 379 | #endif |
| 380 | s->video_bound++; | 380 | s->video_bound++; |
| 381 | break; | 381 | break; |
| 382 | case CODEC_TYPE_SUBTITLE: | 382 | case AVMEDIA_TYPE_SUBTITLE: |
| 383 | stream->id = mps_id++; | 383 | stream->id = mps_id++; |
| 384 | stream->max_buffer_size = 16 * 1024; | 384 | stream->max_buffer_size = 16 * 1024; |
| 385 | break; | 385 | break; |
| @@ -1046,7 +1046,7 @@ retry: · 660 unmodified lines | |||
| 1046 | /* for subtitle, a single PES packet must be generated, | 1046 | /* for subtitle, a single PES packet must be generated, |
| 1047 | so we flush after every single subtitle packet */ | 1047 | so we flush after every single subtitle packet */ |
| 1048 | if(s->packet_size > avail_data && !flush | 1048 | if(s->packet_size > avail_data && !flush |
| 1049 | && st->codec->codec_type != CODEC_TYPE_SUBTITLE) | 1049 | && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) |
| 1050 | return 0; | 1050 | return 0; |
| 1051 | if(avail_data==0) | 1051 | if(avail_data==0) |
| 1052 | continue; | 1052 | continue; |
| @@ -1156,7 +1156,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) · 103 unmodified lines | |||
| 1156 | int64_t pts, dts; | 1156 | int64_t pts, dts; |
| 1157 | PacketDesc *pkt_desc; | 1157 | PacketDesc *pkt_desc; |
| 1158 | const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE); | 1158 | const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE); |
| 1159 | const int is_iframe = st->codec->codec_type == CODEC_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY); | 1159 | const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY); |
| 1160 | 1160 | ||
| 1161 | pts= pkt->pts; | 1161 | pts= pkt->pts; |
| 1162 | dts= pkt->dts; | 1162 | dts= pkt->dts; |
| @@ -486,54 +486,54 @@ static int parse_section_header(SectionHeader *h, · 485 unmodified lines | |||
| 486 | 486 | ||
| 487 | typedef struct { | 487 | typedef struct { |
| 488 | uint32_t stream_type; | 488 | uint32_t stream_type; |
| 489 | enum CodecType codec_type; | 489 | enum AVMediaType codec_type; |
| 490 | enum CodecID codec_id; | 490 | enum CodecID codec_id; |
| 491 | } StreamType; | 491 | } StreamType; |
| 492 | 492 | ||
| 493 | static const StreamType ISO_types[] = { | 493 | static const StreamType ISO_types[] = { |
| 494 | { 0x01, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO }, | 494 | { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO }, |
| 495 | { 0x02, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO }, | 495 | { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO }, |
| 496 | { 0x03, CODEC_TYPE_AUDIO, CODEC_ID_MP3 }, | 496 | { 0x03, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 }, |
| 497 | { 0x04, CODEC_TYPE_AUDIO, CODEC_ID_MP3 }, | 497 | { 0x04, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 }, |
| 498 | { 0x0f, CODEC_TYPE_AUDIO, CODEC_ID_AAC }, | 498 | { 0x0f, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC }, |
| 499 | { 0x10, CODEC_TYPE_VIDEO, CODEC_ID_MPEG4 }, | 499 | { 0x10, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4 }, |
| 500 | { 0x11, CODEC_TYPE_AUDIO, CODEC_ID_AAC }, /* LATM syntax */ | 500 | { 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC }, /* LATM syntax */ |
| 501 | { 0x1b, CODEC_TYPE_VIDEO, CODEC_ID_H264 }, | 501 | { 0x1b, AVMEDIA_TYPE_VIDEO, CODEC_ID_H264 }, |
| 502 | { 0xd1, CODEC_TYPE_VIDEO, CODEC_ID_DIRAC }, | 502 | { 0xd1, AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC }, |
| 503 | { 0xea, CODEC_TYPE_VIDEO, CODEC_ID_VC1 }, | 503 | { 0xea, AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 }, |
| 504 | { 0 }, | 504 | { 0 }, |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | static const StreamType HDMV_types[] = { | 507 | static const StreamType HDMV_types[] = { |
| 508 | { 0x80, CODEC_TYPE_AUDIO, CODEC_ID_PCM_BLURAY }, | 508 | { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY }, |
| 509 | { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, | 509 | { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, |
| 510 | { 0x82, CODEC_TYPE_AUDIO, CODEC_ID_DTS }, | 510 | { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, |
| 511 | { 0x83, CODEC_TYPE_AUDIO, CODEC_ID_TRUEHD }, | 511 | { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD }, |
| 512 | { 0x84, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, | 512 | { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, |
| 513 | { 0x90, CODEC_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE }, | 513 | { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE }, |
| 514 | { 0 }, | 514 | { 0 }, |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | /* ATSC ? */ | 517 | /* ATSC ? */ |
| 518 | static const StreamType MISC_types[] = { | 518 | static const StreamType MISC_types[] = { |
| 519 | { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, | 519 | { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, |
| 520 | { 0x8a, CODEC_TYPE_AUDIO, CODEC_ID_DTS }, | 520 | { 0x8a, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, |
| 521 | { 0 }, | 521 | { 0 }, |
| 522 | }; | 522 | }; |
| 523 | 523 | ||
| 524 | static const StreamType REGD_types[] = { | 524 | static const StreamType REGD_types[] = { |
| 525 | { MKTAG('d','r','a','c'), CODEC_TYPE_VIDEO, CODEC_ID_DIRAC }, | 525 | { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC }, |
| 526 | { MKTAG('A','C','-','3'), CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, | 526 | { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, |
| 527 | { 0 }, | 527 | { 0 }, |
| 528 | }; | 528 | }; |
| 529 | 529 | ||
| 530 | /* descriptor present */ | 530 | /* descriptor present */ |
| 531 | static const StreamType DESC_types[] = { | 531 | static const StreamType DESC_types[] = { |
| 532 | { 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */ | 532 | { 0x6a, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */ |
| 533 | { 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ | 533 | { 0x7a, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ |
| 534 | { 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS }, | 534 | { 0x7b, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, |
| 535 | { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT }, | 535 | { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT }, |
| 536 | { 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ | 536 | { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ |
| 537 | { 0 }, | 537 | { 0 }, |
| 538 | }; | 538 | }; |
| 539 | 539 | ||
| @@ -554,7 +554,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 14 unmodified lines | |||
| 554 | { | 554 | { |
| 555 | av_set_pts_info(st, 33, 1, 90000); | 555 | av_set_pts_info(st, 33, 1, 90000); |
| 556 | st->priv_data = pes; | 556 | st->priv_data = pes; |
| 557 | st->codec->codec_type = CODEC_TYPE_DATA; | 557 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 558 | st->codec->codec_id = CODEC_ID_NONE; | 558 | st->codec->codec_id = CODEC_ID_NONE; |
| 559 | st->need_parsing = AVSTREAM_PARSE_FULL; | 559 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 560 | pes->st = st; | 560 | pes->st = st; |
| @@ -588,7 +588,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 27 unmodified lines | |||
| 588 | 588 | ||
| 589 | av_set_pts_info(sub_st, 33, 1, 90000); | 589 | av_set_pts_info(sub_st, 33, 1, 90000); |
| 590 | sub_st->priv_data = sub_pes; | 590 | sub_st->priv_data = sub_pes; |
| 591 | sub_st->codec->codec_type = CODEC_TYPE_AUDIO; | 591 | sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 592 | sub_st->codec->codec_id = CODEC_ID_AC3; | 592 | sub_st->codec->codec_id = CODEC_ID_AC3; |
| 593 | sub_st->need_parsing = AVSTREAM_PARSE_FULL; | 593 | sub_st->need_parsing = AVSTREAM_PARSE_FULL; |
| 594 | sub_pes->sub_st = pes->sub_st = sub_st; | 594 | sub_pes->sub_st = pes->sub_st = sub_st; |
| @@ -1394,7 +1394,7 @@ static int mpegts_read_header(AVFormatContext *s, · 799 unmodified lines | |||
| 1394 | if (!st) | 1394 | if (!st) |
| 1395 | goto fail; | 1395 | goto fail; |
| 1396 | av_set_pts_info(st, 60, 1, 27000000); | 1396 | av_set_pts_info(st, 60, 1, 27000000); |
| 1397 | st->codec->codec_type = CODEC_TYPE_DATA; | 1397 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 1398 | st->codec->codec_id = CODEC_ID_MPEG2TS; | 1398 | st->codec->codec_id = CODEC_ID_MPEG2TS; |
| 1399 | 1399 | ||
| 1400 | /* we iterate until we find two PCRs to estimate the bitrate */ | 1400 | /* we iterate until we find two PCRs to estimate the bitrate */ |
| @@ -255,7 +255,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 254 unmodified lines | |||
| 255 | 255 | ||
| 256 | /* write optional descriptors here */ | 256 | /* write optional descriptors here */ |
| 257 | switch(st->codec->codec_type) { | 257 | switch(st->codec->codec_type) { |
| 258 | case CODEC_TYPE_AUDIO: | 258 | case AVMEDIA_TYPE_AUDIO: |
| 259 | if (lang && strlen(lang->value) == 3) { | 259 | if (lang && strlen(lang->value) == 3) { |
| 260 | *q++ = 0x0a; /* ISO 639 language descriptor */ | 260 | *q++ = 0x0a; /* ISO 639 language descriptor */ |
| 261 | *q++ = 4; | 261 | *q++ = 4; |
| @@ -265,7 +265,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 3 unmodified lines | |||
| 265 | *q++ = 0; /* undefined type */ | 265 | *q++ = 0; /* undefined type */ |
| 266 | } | 266 | } |
| 267 | break; | 267 | break; |
| 268 | case CODEC_TYPE_SUBTITLE: | 268 | case AVMEDIA_TYPE_SUBTITLE: |
| 269 | { | 269 | { |
| 270 | const char *language; | 270 | const char *language; |
| 271 | language = lang && strlen(lang->value)==3 ? lang->value : "eng"; | 271 | language = lang && strlen(lang->value)==3 ? lang->value : "eng"; |
| @@ -279,7 +279,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 7 unmodified lines | |||
| 279 | put16(&q, 1); /* ancillary page id */ | 279 | put16(&q, 1); /* ancillary page id */ |
| 280 | } | 280 | } |
| 281 | break; | 281 | break; |
| 282 | case CODEC_TYPE_VIDEO: | 282 | case AVMEDIA_TYPE_VIDEO: |
| 283 | if (stream_type == STREAM_TYPE_VIDEO_DIRAC) { | 283 | if (stream_type == STREAM_TYPE_VIDEO_DIRAC) { |
| 284 | *q++ = 0x05; /*MPEG-2 registration descriptor*/ | 284 | *q++ = 0x05; /*MPEG-2 registration descriptor*/ |
| 285 | *q++ = 4; | 285 | *q++ = 4; |
| @@ -424,7 +424,7 @@ static int mpegts_write_header(AVFormatContext *s) · 138 unmodified lines | |||
| 424 | ts_st->first_pts_check = 1; | 424 | ts_st->first_pts_check = 1; |
| 425 | ts_st->cc = 15; | 425 | ts_st->cc = 15; |
| 426 | /* update PCR pid by using the first video stream */ | 426 | /* update PCR pid by using the first video stream */ |
| 427 | if (st->codec->codec_type == CODEC_TYPE_VIDEO && | 427 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && |
| 428 | service->pcr_pid == 0x1fff) { | 428 | service->pcr_pid == 0x1fff) { |
| 429 | service->pcr_pid = ts_st->pid; | 429 | service->pcr_pid = ts_st->pid; |
| 430 | pcr_st = st; | 430 | pcr_st = st; |
| @@ -462,7 +462,7 @@ static int mpegts_write_header(AVFormatContext *s) · 31 unmodified lines | |||
| 462 | /* Arbitrary values, PAT/PMT could be written on key frames */ | 462 | /* Arbitrary values, PAT/PMT could be written on key frames */ |
| 463 | ts->sdt_packet_period = 200; | 463 | ts->sdt_packet_period = 200; |
| 464 | ts->pat_packet_period = 40; | 464 | ts->pat_packet_period = 40; |
| 465 | if (pcr_st->codec->codec_type == CODEC_TYPE_AUDIO) { | 465 | if (pcr_st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 466 | if (!pcr_st->codec->frame_size) { | 466 | if (!pcr_st->codec->frame_size) { |
| 467 | av_log(s, AV_LOG_WARNING, "frame size not set\n"); | 467 | av_log(s, AV_LOG_WARNING, "frame size not set\n"); |
| 468 | service->pcr_packet_period = | 468 | service->pcr_packet_period = |
| @@ -661,18 +661,18 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 192 unmodified lines | |||
| 661 | *q++ = 0x00; | 661 | *q++ = 0x00; |
| 662 | *q++ = 0x01; | 662 | *q++ = 0x01; |
| 663 | private_code = 0; | 663 | private_code = 0; |
| 664 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 664 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 665 | if (st->codec->codec_id == CODEC_ID_DIRAC) { | 665 | if (st->codec->codec_id == CODEC_ID_DIRAC) { |
| 666 | *q++ = 0xfd; | 666 | *q++ = 0xfd; |
| 667 | } else | 667 | } else |
| 668 | *q++ = 0xe0; | 668 | *q++ = 0xe0; |
| 669 | } else if (st->codec->codec_type == CODEC_TYPE_AUDIO && | 669 | } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 670 | (st->codec->codec_id == CODEC_ID_MP2 || | 670 | (st->codec->codec_id == CODEC_ID_MP2 || |
| 671 | st->codec->codec_id == CODEC_ID_MP3)) { | 671 | st->codec->codec_id == CODEC_ID_MP3)) { |
| 672 | *q++ = 0xc0; | 672 | *q++ = 0xc0; |
| 673 | } else { | 673 | } else { |
| 674 | *q++ = 0xbd; | 674 | *q++ = 0xbd; |
| 675 | if (st->codec->codec_type == CODEC_TYPE_SUBTITLE) { | 675 | if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) { |
| 676 | private_code = 0x20; | 676 | private_code = 0x20; |
| 677 | } | 677 | } |
| 678 | } | 678 | } |
| @@ -686,7 +686,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 7 unmodified lines | |||
| 686 | header_len += 5; | 686 | header_len += 5; |
| 687 | flags |= 0x40; | 687 | flags |= 0x40; |
| 688 | } | 688 | } |
| 689 | if (st->codec->codec_type == CODEC_TYPE_VIDEO && | 689 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && |
| 690 | st->codec->codec_id == CODEC_ID_DIRAC) { | 690 | st->codec->codec_id == CODEC_ID_DIRAC) { |
| 691 | /* set PES_extension_flag */ | 691 | /* set PES_extension_flag */ |
| 692 | pes_extension = 1; | 692 | pes_extension = 1; |
| @@ -708,7 +708,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 15 unmodified lines | |||
| 708 | *q++ = len; | 708 | *q++ = len; |
| 709 | val = 0x80; | 709 | val = 0x80; |
| 710 | /* data alignment indicator is required for subtitle data */ | 710 | /* data alignment indicator is required for subtitle data */ |
| 711 | if (st->codec->codec_type == CODEC_TYPE_SUBTITLE) | 711 | if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 712 | val |= 0x04; | 712 | val |= 0x04; |
| 713 | *q++ = val; | 713 | *q++ = val; |
| 714 | *q++ = flags; | 714 | *q++ = flags; |
| @@ -848,7 +848,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) · 133 unmodified lines | |||
| 848 | } | 848 | } |
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | if (st->codec->codec_type != CODEC_TYPE_AUDIO) { | 851 | if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO) { |
| 852 | // for video and subtitle, write a single pes packet | 852 | // for video and subtitle, write a single pes packet |
| 853 | mpegts_write_pes(s, st, buf, size, pts, dts); | 853 | mpegts_write_pes(s, st, buf, size, pts, dts); |
| 854 | av_free(data); | 854 | av_free(data); |
| @@ -80,7 +80,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap) · 79 unmodified lines | |||
| 80 | return AVERROR_NOMEM; | 80 | return AVERROR_NOMEM; |
| 81 | 81 | ||
| 82 | codec = st->codec; | 82 | codec = st->codec; |
| 83 | codec->codec_type = CODEC_TYPE_VIDEO; | 83 | codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 84 | codec->codec_id = CODEC_ID_MIMIC; | 84 | codec->codec_id = CODEC_ID_MIMIC; |
| 85 | codec->codec_tag = MKTAG('M', 'L', '2', '0'); | 85 | codec->codec_tag = MKTAG('M', 'L', '2', '0'); |
| 86 | 86 | ||
| @@ -123,7 +123,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 122 unmodified lines | |||
| 123 | return AVERROR(ENOMEM); | 123 | return AVERROR(ENOMEM); |
| 124 | 124 | ||
| 125 | av_set_pts_info(st, 64, 1, mtv->video_fps); | 125 | av_set_pts_info(st, 64, 1, mtv->video_fps); |
| 126 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 126 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 127 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 127 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 128 | st->codec->codec_tag = MKTAG('R', 'G', 'B', mtv->img_bpp); | 128 | st->codec->codec_tag = MKTAG('R', 'G', 'B', mtv->img_bpp); |
| 129 | st->codec->width = mtv->img_width; | 129 | st->codec->width = mtv->img_width; |
| @@ -140,7 +140,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 10 unmodified lines | |||
| 140 | return AVERROR(ENOMEM); | 140 | return AVERROR(ENOMEM); |
| 141 | 141 | ||
| 142 | av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); | 142 | av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); |
| 143 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 143 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 144 | st->codec->codec_id = CODEC_ID_MP3; | 144 | st->codec->codec_id = CODEC_ID_MP3; |
| 145 | st->codec->bit_rate = mtv->audio_br; | 145 | st->codec->bit_rate = mtv->audio_br; |
| 146 | st->need_parsing = AVSTREAM_PARSE_FULL; | 146 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| @@ -77,14 +77,14 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 76 unmodified lines | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); | 79 | av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
| 80 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 80 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 81 | ast->codec->codec_id = CODEC_ID_PCM_U8; | 81 | ast->codec->codec_id = CODEC_ID_PCM_U8; |
| 82 | ast->codec->channels = 1; | 82 | ast->codec->channels = 1; |
| 83 | ast->codec->bits_per_coded_sample = 8; | 83 | ast->codec->bits_per_coded_sample = 8; |
| 84 | ast->codec->bit_rate = ast->codec->sample_rate * 8; | 84 | ast->codec->bit_rate = ast->codec->sample_rate * 8; |
| 85 | 85 | ||
| 86 | av_set_pts_info(vst, 64, msecs_per_frame, 1000000); | 86 | av_set_pts_info(vst, 64, msecs_per_frame, 1000000); |
| 87 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 87 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 88 | vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; | 88 | vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; |
| 89 | 89 | ||
| 90 | mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24; | 90 | mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24; |
| @@ -25,9 +25,9 @@ · 24 unmodified lines | |||
| 25 | * SMPTE RP224 http://www.smpte-ra.org/mdd/index.html | 25 | * SMPTE RP224 http://www.smpte-ra.org/mdd/index.html |
| 26 | */ | 26 | */ |
| 27 | const MXFCodecUL ff_mxf_data_definition_uls[] = { | 27 | const MXFCodecUL ff_mxf_data_definition_uls[] = { |
| 28 | { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, CODEC_TYPE_VIDEO }, | 28 | { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_VIDEO }, |
| 29 | { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, CODEC_TYPE_AUDIO }, | 29 | { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_AUDIO }, |
| 30 | { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_TYPE_DATA }, | 30 | { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AVMEDIA_TYPE_DATA }, |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | const MXFCodecUL ff_mxf_codec_uls[] = { | 33 | const MXFCodecUL ff_mxf_codec_uls[] = { |
| @@ -795,7 +795,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 794 unmodified lines | |||
| 795 | st->codec->extradata = descriptor->extradata; | 795 | st->codec->extradata = descriptor->extradata; |
| 796 | st->codec->extradata_size = descriptor->extradata_size; | 796 | st->codec->extradata_size = descriptor->extradata_size; |
| 797 | } | 797 | } |
| 798 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 798 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 799 | container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul); | 799 | container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul); |
| 800 | if (st->codec->codec_id == CODEC_ID_NONE) | 800 | if (st->codec->codec_id == CODEC_ID_NONE) |
| 801 | st->codec->codec_id = container_ul->id; | 801 | st->codec->codec_id = container_ul->id; |
| @@ -803,7 +803,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 1 unmodified line | |||
| 803 | st->codec->height = descriptor->height; | 803 | st->codec->height = descriptor->height; |
| 804 | st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */ | 804 | st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */ |
| 805 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 805 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 806 | } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 806 | } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 807 | container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul); | 807 | container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul); |
| 808 | if (st->codec->codec_id == CODEC_ID_NONE) | 808 | if (st->codec->codec_id == CODEC_ID_NONE) |
| 809 | st->codec->codec_id = container_ul->id; | 809 | st->codec->codec_id = container_ul->id; |
| @@ -825,7 +825,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 15 unmodified lines | |||
| 825 | st->need_parsing = AVSTREAM_PARSE_FULL; | 825 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 826 | } | 826 | } |
| 827 | } | 827 | } |
| 828 | if (st->codec->codec_type != CODEC_TYPE_DATA && (*essence_container_ul)[15] > 0x01) { | 828 | if (st->codec->codec_type != AVMEDIA_TYPE_DATA && (*essence_container_ul)[15] > 0x01) { |
| 829 | av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n"); | 829 | av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n"); |
| 830 | st->need_parsing = AVSTREAM_PARSE_FULL; | 830 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 831 | } | 831 | } |
| @@ -1415,7 +1415,7 @@ static int mxf_write_header(AVFormatContext *s) · 1414 unmodified lines | |||
| 1415 | return AVERROR(ENOMEM); | 1415 | return AVERROR(ENOMEM); |
| 1416 | st->priv_data = sc; | 1416 | st->priv_data = sc; |
| 1417 | 1417 | ||
| 1418 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 1418 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1419 | if (i != 0) { | 1419 | if (i != 0) { |
| 1420 | av_log(s, AV_LOG_ERROR, "video stream must be first track\n"); | 1420 | av_log(s, AV_LOG_ERROR, "video stream must be first track\n"); |
| 1421 | return -1; | 1421 | return -1; |
| @@ -1455,7 +1455,7 @@ static int mxf_write_header(AVFormatContext *s) · 33 unmodified lines | |||
| 1455 | mxf->edit_unit_byte_count += 16 + 4 + 4 + samples_per_frame[0]*8*4; | 1455 | mxf->edit_unit_byte_count += 16 + 4 + 4 + samples_per_frame[0]*8*4; |
| 1456 | mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count); | 1456 | mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count); |
| 1457 | } | 1457 | } |
| 1458 | } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 1458 | } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 1459 | if (st->codec->sample_rate != 48000) { | 1459 | if (st->codec->sample_rate != 48000) { |
| 1460 | av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n"); | 1460 | av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n"); |
| 1461 | return -1; | 1461 | return -1; |
| @@ -1717,7 +1717,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 255 unmodified lines | |||
| 1717 | mxf_write_klv_fill(s); | 1717 | mxf_write_klv_fill(s); |
| 1718 | put_buffer(pb, sc->track_essence_element_key, 16); // write key | 1718 | put_buffer(pb, sc->track_essence_element_key, 16); // write key |
| 1719 | if (s->oformat == &mxf_d10_muxer) { | 1719 | if (s->oformat == &mxf_d10_muxer) { |
| 1720 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) | 1720 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 1721 | mxf_write_d10_video_packet(s, st, pkt); | 1721 | mxf_write_d10_video_packet(s, st, pkt); |
| 1722 | else | 1722 | else |
| 1723 | mxf_write_d10_audio_packet(s, st, pkt); | 1723 | mxf_write_d10_audio_packet(s, st, pkt); |
| @@ -50,7 +50,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 49 unmodified lines | |||
| 50 | if (!st) | 50 | if (!st) |
| 51 | return AVERROR(ENOMEM); | 51 | return AVERROR(ENOMEM); |
| 52 | 52 | ||
| 53 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 53 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 54 | st->codec->codec_id = CODEC_ID_MPEG4; | 54 | st->codec->codec_id = CODEC_ID_MPEG4; |
| 55 | st->need_parsing = AVSTREAM_PARSE_FULL; | 55 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 56 | 56 | ||
| @@ -456,7 +456,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) · 455 unmodified lines | |||
| 456 | if (!nst) | 456 | if (!nst) |
| 457 | goto fail; | 457 | goto fail; |
| 458 | st->priv_data = nst; | 458 | st->priv_data = nst; |
| 459 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 459 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 460 | st->codec->codec_tag = vtag; | 460 | st->codec->codec_tag = vtag; |
| 461 | st->codec->codec_id = ff_codec_get_id(nsv_codec_video_tags, vtag); | 461 | st->codec->codec_id = ff_codec_get_id(nsv_codec_video_tags, vtag); |
| 462 | st->codec->width = vwidth; | 462 | st->codec->width = vwidth; |
| @@ -487,7 +487,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) · 24 unmodified lines | |||
| 487 | if (!nst) | 487 | if (!nst) |
| 488 | goto fail; | 488 | goto fail; |
| 489 | st->priv_data = nst; | 489 | st->priv_data = nst; |
| 490 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 490 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 491 | st->codec->codec_tag = atag; | 491 | st->codec->codec_tag = atag; |
| 492 | st->codec->codec_id = ff_codec_get_id(nsv_codec_audio_tags, atag); | 492 | st->codec->codec_id = ff_codec_get_id(nsv_codec_audio_tags, atag); |
| 493 | 493 | ||
| @@ -315,19 +315,19 @@ static int decode_stream_header(NUTContext *nut){ · 314 unmodified lines | |||
| 315 | switch(class) | 315 | switch(class) |
| 316 | { | 316 | { |
| 317 | case 0: | 317 | case 0: |
| 318 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 318 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 319 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp); | 319 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp); |
| 320 | break; | 320 | break; |
| 321 | case 1: | 321 | case 1: |
| 322 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 322 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 323 | st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp); | 323 | st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp); |
| 324 | break; | 324 | break; |
| 325 | case 2: | 325 | case 2: |
| 326 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 326 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 327 | st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp); | 327 | st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp); |
| 328 | break; | 328 | break; |
| 329 | case 3: | 329 | case 3: |
| 330 | st->codec->codec_type = CODEC_TYPE_DATA; | 330 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 331 | break; | 331 | break; |
| 332 | default: | 332 | default: |
| 333 | av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); | 333 | av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); |
| @@ -349,7 +349,7 @@ static int decode_stream_header(NUTContext *nut){ · 15 unmodified lines | |||
| 349 | get_buffer(bc, st->codec->extradata, st->codec->extradata_size); | 349 | get_buffer(bc, st->codec->extradata, st->codec->extradata_size); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | if (st->codec->codec_type == CODEC_TYPE_VIDEO){ | 352 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 353 | GET_V(st->codec->width , tmp > 0) | 353 | GET_V(st->codec->width , tmp > 0) |
| 354 | GET_V(st->codec->height, tmp > 0) | 354 | GET_V(st->codec->height, tmp > 0) |
| 355 | st->sample_aspect_ratio.num= ff_get_v(bc); | 355 | st->sample_aspect_ratio.num= ff_get_v(bc); |
| @@ -359,7 +359,7 @@ static int decode_stream_header(NUTContext *nut){ · 3 unmodified lines | |||
| 359 | return -1; | 359 | return -1; |
| 360 | } | 360 | } |
| 361 | ff_get_v(bc); /* csp type */ | 361 | ff_get_v(bc); /* csp type */ |
| 362 | }else if (st->codec->codec_type == CODEC_TYPE_AUDIO){ | 362 | }else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO){ |
| 363 | GET_V(st->codec->sample_rate , tmp > 0) | 363 | GET_V(st->codec->sample_rate , tmp > 0) |
| 364 | ff_get_v(bc); // samplerate_den | 364 | ff_get_v(bc); // samplerate_den |
| 365 | GET_V(st->codec->channels, tmp > 0) | 365 | GET_V(st->codec->channels, tmp > 0) |
| @@ -152,7 +152,7 @@ static void build_frame_code(AVFormatContext *s){ · 151 unmodified lines | |||
| 152 | int start2= start + (end-start)*stream_id / s->nb_streams; | 152 | int start2= start + (end-start)*stream_id / s->nb_streams; |
| 153 | int end2 = start + (end-start)*(stream_id+1) / s->nb_streams; | 153 | int end2 = start + (end-start)*(stream_id+1) / s->nb_streams; |
| 154 | AVCodecContext *codec = s->streams[stream_id]->codec; | 154 | AVCodecContext *codec = s->streams[stream_id]->codec; |
| 155 | int is_audio= codec->codec_type == CODEC_TYPE_AUDIO; | 155 | int is_audio= codec->codec_type == AVMEDIA_TYPE_AUDIO; |
| 156 | int intra_only= /*codec->intra_only || */is_audio; | 156 | int intra_only= /*codec->intra_only || */is_audio; |
| 157 | int pred_count; | 157 | int pred_count; |
| 158 | 158 | ||
| @@ -394,9 +394,9 @@ static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVStream *st, · 235 unmodified lines | |||
| 394 | AVCodecContext *codec = st->codec; | 394 | AVCodecContext *codec = st->codec; |
| 395 | put_v(bc, i); | 395 | put_v(bc, i); |
| 396 | switch(codec->codec_type){ | 396 | switch(codec->codec_type){ |
| 397 | case CODEC_TYPE_VIDEO: put_v(bc, 0); break; | 397 | case AVMEDIA_TYPE_VIDEO: put_v(bc, 0); break; |
| 398 | case CODEC_TYPE_AUDIO: put_v(bc, 1); break; | 398 | case AVMEDIA_TYPE_AUDIO: put_v(bc, 1); break; |
| 399 | case CODEC_TYPE_SUBTITLE: put_v(bc, 2); break; | 399 | case AVMEDIA_TYPE_SUBTITLE: put_v(bc, 2); break; |
| 400 | default : put_v(bc, 3); break; | 400 | default : put_v(bc, 3); break; |
| 401 | } | 401 | } |
| 402 | put_v(bc, 4); | 402 | put_v(bc, 4); |
| @@ -415,12 +415,12 @@ static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVStream *st, · 12 unmodified lines | |||
| 415 | put_buffer(bc, codec->extradata, codec->extradata_size); | 415 | put_buffer(bc, codec->extradata, codec->extradata_size); |
| 416 | 416 | ||
| 417 | switch(codec->codec_type){ | 417 | switch(codec->codec_type){ |
| 418 | case CODEC_TYPE_AUDIO: | 418 | case AVMEDIA_TYPE_AUDIO: |
| 419 | put_v(bc, codec->sample_rate); | 419 | put_v(bc, codec->sample_rate); |
| 420 | put_v(bc, 1); | 420 | put_v(bc, 1); |
| 421 | put_v(bc, codec->channels); | 421 | put_v(bc, codec->channels); |
| 422 | break; | 422 | break; |
| 423 | case CODEC_TYPE_VIDEO: | 423 | case AVMEDIA_TYPE_VIDEO: |
| 424 | put_v(bc, codec->width); | 424 | put_v(bc, codec->width); |
| 425 | put_v(bc, codec->height); | 425 | put_v(bc, codec->height); |
| 426 | 426 | ||
| @@ -155,7 +155,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { · 154 unmodified lines | |||
| 155 | vst = av_new_stream(s, ctx->v_id); | 155 | vst = av_new_stream(s, ctx->v_id); |
| 156 | if (!vst) | 156 | if (!vst) |
| 157 | return AVERROR(ENOMEM); | 157 | return AVERROR(ENOMEM); |
| 158 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 158 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 159 | vst->codec->codec_id = CODEC_ID_NUV; | 159 | vst->codec->codec_id = CODEC_ID_NUV; |
| 160 | vst->codec->width = width; | 160 | vst->codec->width = width; |
| 161 | vst->codec->height = height; | 161 | vst->codec->height = height; |
| @@ -171,7 +171,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { · 9 unmodified lines | |||
| 171 | ast = av_new_stream(s, ctx->a_id); | 171 | ast = av_new_stream(s, ctx->a_id); |
| 172 | if (!ast) | 172 | if (!ast) |
| 173 | return AVERROR(ENOMEM); | 173 | return AVERROR(ENOMEM); |
| 174 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 174 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 175 | ast->codec->codec_id = CODEC_ID_PCM_S16LE; | 175 | ast->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 176 | ast->codec->channels = 2; | 176 | ast->codec->channels = 2; |
| 177 | ast->codec->sample_rate = 44100; | 177 | ast->codec->sample_rate = 44100; |
| @@ -612,7 +612,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp · 611 unmodified lines | |||
| 612 | 612 | ||
| 613 | // Try seeking to a keyframe first. If this fails (very possible), | 613 | // Try seeking to a keyframe first. If this fails (very possible), |
| 614 | // av_seek_frame will fall back to ignoring keyframes | 614 | // av_seek_frame will fall back to ignoring keyframes |
| 615 | if (s->streams[stream_index]->codec->codec_type == CODEC_TYPE_VIDEO | 615 | if (s->streams[stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO |
| 616 | && !(flags & AVSEEK_FLAG_ANY)) | 616 | && !(flags & AVSEEK_FLAG_ANY)) |
| 617 | os->keyframe_seek = 1; | 617 | os->keyframe_seek = 1; |
| 618 | 618 | ||
| @@ -178,9 +178,9 @@ static int ogg_write_header(AVFormatContext *s) · 177 unmodified lines | |||
| 178 | int i, j; | 178 | int i, j; |
| 179 | for (i = 0; i < s->nb_streams; i++) { | 179 | for (i = 0; i < s->nb_streams; i++) { |
| 180 | AVStream *st = s->streams[i]; | 180 | AVStream *st = s->streams[i]; |
| 181 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) | 181 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 182 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); | 182 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
| 183 | else if (st->codec->codec_type == CODEC_TYPE_VIDEO) | 183 | else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 184 | av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); | 184 | av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
| 185 | if (st->codec->codec_id != CODEC_ID_VORBIS && | 185 | if (st->codec->codec_id != CODEC_ID_VORBIS && |
| 186 | st->codec->codec_id != CODEC_ID_THEORA && | 186 | st->codec->codec_id != CODEC_ID_THEORA && |
| @@ -39,7 +39,7 @@ static int dirac_header(AVFormatContext *s, int idx) · 38 unmodified lines | |||
| 39 | if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) | 39 | if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) |
| 40 | return -1; | 40 | return -1; |
| 41 | 41 | ||
| 42 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 42 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 43 | st->codec->codec_id = CODEC_ID_DIRAC; | 43 | st->codec->codec_id = CODEC_ID_DIRAC; |
| 44 | // dirac in ogg always stores timestamps as though the video were interlaced | 44 | // dirac in ogg always stores timestamps as though the video were interlaced |
| 45 | st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den}; | 45 | st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den}; |
| @@ -77,7 +77,7 @@ static int old_dirac_header(AVFormatContext *s, int idx) · 31 unmodified lines | |||
| 77 | if (buf[0] != 'K') | 77 | if (buf[0] != 'K') |
| 78 | return 0; | 78 | return 0; |
| 79 | 79 | ||
| 80 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 80 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 81 | st->codec->codec_id = CODEC_ID_DIRAC; | 81 | st->codec->codec_id = CODEC_ID_DIRAC; |
| 82 | st->time_base.den = AV_RB32(buf+8); | 82 | st->time_base.den = AV_RB32(buf+8); |
| 83 | st->time_base.num = AV_RB32(buf+12); | 83 | st->time_base.num = AV_RB32(buf+12); |
| @@ -57,7 +57,7 @@ flac_header (AVFormatContext * s, int idx) · 56 unmodified lines | |||
| 57 | 57 | ||
| 58 | ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start); | 58 | ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start); |
| 59 | 59 | ||
| 60 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 60 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 61 | st->codec->codec_id = CODEC_ID_FLAC; | 61 | st->codec->codec_id = CODEC_ID_FLAC; |
| 62 | 62 | ||
| 63 | st->codec->extradata = | 63 | st->codec->extradata = |
| @@ -78,7 +78,7 @@ static int · 14 unmodified lines | |||
| 78 | old_flac_header (AVFormatContext * s, int idx) | 78 | old_flac_header (AVFormatContext * s, int idx) |
| 79 | { | 79 | { |
| 80 | AVStream *st = s->streams[idx]; | 80 | AVStream *st = s->streams[idx]; |
| 81 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 81 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 82 | st->codec->codec_id = CODEC_ID_FLAC; | 82 | st->codec->codec_id = CODEC_ID_FLAC; |
| 83 | 83 | ||
| 84 | return 0; | 84 | return 0; |
| @@ -49,19 +49,19 @@ ogm_header(AVFormatContext *s, int idx) · 48 unmodified lines | |||
| 49 | 49 | ||
| 50 | if(*p == 'v'){ | 50 | if(*p == 'v'){ |
| 51 | int tag; | 51 | int tag; |
| 52 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 52 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 53 | p += 8; | 53 | p += 8; |
| 54 | tag = bytestream_get_le32(&p); | 54 | tag = bytestream_get_le32(&p); |
| 55 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag); | 55 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag); |
| 56 | st->codec->codec_tag = tag; | 56 | st->codec->codec_tag = tag; |
| 57 | } else if (*p == 't') { | 57 | } else if (*p == 't') { |
| 58 | st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 58 | st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 59 | st->codec->codec_id = CODEC_ID_TEXT; | 59 | st->codec->codec_id = CODEC_ID_TEXT; |
| 60 | p += 12; | 60 | p += 12; |
| 61 | } else { | 61 | } else { |
| 62 | uint8_t acid[5]; | 62 | uint8_t acid[5]; |
| 63 | int cid; | 63 | int cid; |
| 64 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 64 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 65 | p += 8; | 65 | p += 8; |
| 66 | bytestream_get_buffer(&p, acid, 4); | 66 | bytestream_get_buffer(&p, acid, 4); |
| 67 | acid[4] = 0; | 67 | acid[4] = 0; |
| @@ -78,7 +78,7 @@ ogm_header(AVFormatContext *s, int idx) · 10 unmodified lines | |||
| 78 | 78 | ||
| 79 | p += 8; /* buffersize + bits_per_sample */ | 79 | p += 8; /* buffersize + bits_per_sample */ |
| 80 | 80 | ||
| 81 | if(st->codec->codec_type == CODEC_TYPE_VIDEO){ | 81 | if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 82 | st->codec->width = bytestream_get_le32(&p); | 82 | st->codec->width = bytestream_get_le32(&p); |
| 83 | st->codec->height = bytestream_get_le32(&p); | 83 | st->codec->height = bytestream_get_le32(&p); |
| 84 | st->codec->time_base.den = spu * 10000000; | 84 | st->codec->time_base.den = spu * 10000000; |
| @@ -117,14 +117,14 @@ ogm_dshow_header(AVFormatContext *s, int idx) · 32 unmodified lines | |||
| 117 | t = AV_RL32(p + 96); | 117 | t = AV_RL32(p + 96); |
| 118 | 118 | ||
| 119 | if(t == 0x05589f80){ | 119 | if(t == 0x05589f80){ |
| 120 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 120 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 121 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68)); | 121 | st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68)); |
| 122 | st->codec->time_base.den = 10000000; | 122 | st->codec->time_base.den = 10000000; |
| 123 | st->codec->time_base.num = AV_RL64(p + 164); | 123 | st->codec->time_base.num = AV_RL64(p + 164); |
| 124 | st->codec->width = AV_RL32(p + 176); | 124 | st->codec->width = AV_RL32(p + 176); |
| 125 | st->codec->height = AV_RL32(p + 180); | 125 | st->codec->height = AV_RL32(p + 180); |
| 126 | } else if(t == 0x05589f81){ | 126 | } else if(t == 0x05589f81){ |
| 127 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 127 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 128 | st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, AV_RL16(p + 124)); | 128 | st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, AV_RL16(p + 124)); |
| 129 | st->codec->channels = AV_RL16(p + 126); | 129 | st->codec->channels = AV_RL16(p + 126); |
| 130 | st->codec->sample_rate = AV_RL32(p + 128); | 130 | st->codec->sample_rate = AV_RL32(p + 128); |
| @@ -33,7 +33,7 @@ static int skeleton_header(AVFormatContext *s, int idx) · 32 unmodified lines | |||
| 33 | int target_idx, start_time; | 33 | int target_idx, start_time; |
| 34 | 34 | ||
| 35 | strcpy(st->codec->codec_name, "skeleton"); | 35 | strcpy(st->codec->codec_name, "skeleton"); |
| 36 | st->codec->codec_type = CODEC_TYPE_DATA; | 36 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 37 | 37 | ||
| 38 | if (os->psize < 8) | 38 | if (os->psize < 8) |
| 39 | return -1; | 39 | return -1; |
| @@ -52,7 +52,7 @@ static int speex_header(AVFormatContext *s, int idx) { · 51 unmodified lines | |||
| 52 | 52 | ||
| 53 | if (spxp->seq == 0) { | 53 | if (spxp->seq == 0) { |
| 54 | int frames_per_packet; | 54 | int frames_per_packet; |
| 55 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 55 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 56 | st->codec->codec_id = CODEC_ID_SPEEX; | 56 | st->codec->codec_id = CODEC_ID_SPEEX; |
| 57 | 57 | ||
| 58 | st->codec->sample_rate = AV_RL32(p + 36); | 58 | st->codec->sample_rate = AV_RL32(p + 36); |
| @@ -104,7 +104,7 @@ theora_header (AVFormatContext * s, int idx) · 103 unmodified lines | |||
| 104 | thp->gpshift = get_bits(&gb, 5); | 104 | thp->gpshift = get_bits(&gb, 5); |
| 105 | thp->gpmask = (1 << thp->gpshift) - 1; | 105 | thp->gpmask = (1 << thp->gpshift) - 1; |
| 106 | 106 | ||
| 107 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 107 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 108 | st->codec->codec_id = CODEC_ID_THEORA; | 108 | st->codec->codec_id = CODEC_ID_THEORA; |
| 109 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 109 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 110 | 110 | ||
| @@ -237,7 +237,7 @@ vorbis_header (AVFormatContext * s, int idx) · 236 unmodified lines | |||
| 237 | if (bytestream_get_byte(&p) != 1) /* framing_flag */ | 237 | if (bytestream_get_byte(&p) != 1) /* framing_flag */ |
| 238 | return -1; | 238 | return -1; |
| 239 | 239 | ||
| 240 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 240 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 241 | st->codec->codec_id = CODEC_ID_VORBIS; | 241 | st->codec->codec_id = CODEC_ID_VORBIS; |
| 242 | 242 | ||
| 243 | st->time_base.num = 1; | 243 | st->time_base.num = 1; |
| @@ -112,7 +112,7 @@ static int oma_read_header(AVFormatContext *s, · 111 unmodified lines | |||
| 112 | return AVERROR(ENOMEM); | 112 | return AVERROR(ENOMEM); |
| 113 | 113 | ||
| 114 | st->start_time = 0; | 114 | st->start_time = 0; |
| 115 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 115 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 116 | st->codec->codec_tag = buf[32]; | 116 | st->codec->codec_tag = buf[32]; |
| 117 | st->codec->codec_id = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag); | 117 | st->codec->codec_id = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag); |
| 118 | 118 | ||
| @@ -65,7 +65,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id) · 64 unmodified lines | |||
| 65 | 65 | ||
| 66 | c = st->codec; | 66 | c = st->codec; |
| 67 | c->codec_id = codec_id; | 67 | c->codec_id = codec_id; |
| 68 | c->codec_type = CODEC_TYPE_AUDIO; | 68 | c->codec_type = AVMEDIA_TYPE_AUDIO; |
| 69 | 69 | ||
| 70 | /* put sample parameters */ | 70 | /* put sample parameters */ |
| 71 | c->bit_rate = 64000; | 71 | c->bit_rate = 64000; |
| @@ -199,7 +199,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id) · 127 unmodified lines | |||
| 199 | 199 | ||
| 200 | c = st->codec; | 200 | c = st->codec; |
| 201 | c->codec_id = codec_id; | 201 | c->codec_id = codec_id; |
| 202 | c->codec_type = CODEC_TYPE_VIDEO; | 202 | c->codec_type = AVMEDIA_TYPE_VIDEO; |
| 203 | 203 | ||
| 204 | /* put sample parameters */ | 204 | /* put sample parameters */ |
| 205 | c->bit_rate = 400000; | 205 | c->bit_rate = 400000; |
| @@ -169,7 +169,7 @@ static int str_read_packet(AVFormatContext *s, · 168 unmodified lines | |||
| 169 | 169 | ||
| 170 | str->channels[channel].video_stream_index = st->index; | 170 | str->channels[channel].video_stream_index = st->index; |
| 171 | 171 | ||
| 172 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 172 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 173 | st->codec->codec_id = CODEC_ID_MDEC; | 173 | st->codec->codec_id = CODEC_ID_MDEC; |
| 174 | st->codec->codec_tag = 0; /* no fourcc */ | 174 | st->codec->codec_tag = 0; /* no fourcc */ |
| 175 | st->codec->width = AV_RL16(§or[0x28]); | 175 | st->codec->width = AV_RL16(§or[0x28]); |
| @@ -216,7 +216,7 @@ static int str_read_packet(AVFormatContext *s, · 40 unmodified lines | |||
| 216 | 216 | ||
| 217 | str->channels[channel].audio_stream_index = st->index; | 217 | str->channels[channel].audio_stream_index = st->index; |
| 218 | 218 | ||
| 219 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 219 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 220 | st->codec->codec_id = CODEC_ID_ADPCM_XA; | 220 | st->codec->codec_id = CODEC_ID_ADPCM_XA; |
| 221 | st->codec->codec_tag = 0; /* no fourcc */ | 221 | st->codec->codec_tag = 0; /* no fourcc */ |
| 222 | st->codec->channels = (fmt&1)?2:1; | 222 | st->codec->channels = (fmt&1)?2:1; |
| @@ -45,7 +45,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 44 unmodified lines | |||
| 45 | 45 | ||
| 46 | if (!(st = av_new_stream(s, 0))) | 46 | if (!(st = av_new_stream(s, 0))) |
| 47 | return AVERROR(ENOMEM); | 47 | return AVERROR(ENOMEM); |
| 48 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 48 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 49 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; | 49 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; |
| 50 | st->need_parsing = AVSTREAM_PARSE_FULL; | 50 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 51 | av_set_pts_info(st, 32, 1, 90000); | 51 | av_set_pts_info(st, 32, 1, 90000); |
| @@ -53,7 +53,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 1 unmodified line | |||
| 53 | 53 | ||
| 54 | if (!(st = av_new_stream(s, 1))) | 54 | if (!(st = av_new_stream(s, 1))) |
| 55 | return AVERROR(ENOMEM); | 55 | return AVERROR(ENOMEM); |
| 56 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 56 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 57 | st->codec->codec_id = CODEC_ID_MP2; | 57 | st->codec->codec_id = CODEC_ID_MP2; |
| 58 | st->need_parsing = AVSTREAM_PARSE_FULL; | 58 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 59 | av_set_pts_info(st, 33, 1, 90000); | 59 | av_set_pts_info(st, 33, 1, 90000); |
| @@ -95,7 +95,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) · 94 unmodified lines | |||
| 95 | s->file_size = get_le32(pb) + 8; | 95 | s->file_size = get_le32(pb) + 8; |
| 96 | url_fskip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version | 96 | url_fskip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version |
| 97 | 97 | ||
| 98 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 98 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 99 | st->codec->channels = 1; | 99 | st->codec->channels = 1; |
| 100 | get_buffer(pb, buf, 16); | 100 | get_buffer(pb, buf, 16); |
| 101 | if (is_qcelp_13k_guid(buf)) { | 101 | if (is_qcelp_13k_guid(buf)) { |
| @@ -56,7 +56,7 @@ static int r3d_read_red1(AVFormatContext *s) · 55 unmodified lines | |||
| 56 | 56 | ||
| 57 | if (!st) | 57 | if (!st) |
| 58 | return AVERROR(ENOMEM); | 58 | return AVERROR(ENOMEM); |
| 59 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 59 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 60 | st->codec->codec_id = CODEC_ID_JPEG2000; | 60 | st->codec->codec_id = CODEC_ID_JPEG2000; |
| 61 | 61 | ||
| 62 | tmp = get_byte(s->pb); // major version | 62 | tmp = get_byte(s->pb); // major version |
| @@ -89,7 +89,7 @@ static int r3d_read_red1(AVFormatContext *s) · 26 unmodified lines | |||
| 89 | AVStream *ast = av_new_stream(s, 1); | 89 | AVStream *ast = av_new_stream(s, 1); |
| 90 | if (!ast) | 90 | if (!ast) |
| 91 | return AVERROR(ENOMEM); | 91 | return AVERROR(ENOMEM); |
| 92 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 92 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 93 | ast->codec->codec_id = CODEC_ID_PCM_S32BE; | 93 | ast->codec->codec_id = CODEC_ID_PCM_S32BE; |
| 94 | ast->codec->channels = tmp; | 94 | ast->codec->channels = tmp; |
| 95 | av_set_pts_info(ast, 32, 1, st->time_base.den); | 95 | av_set_pts_info(ast, 32, 1, st->time_base.den); |
| @@ -74,14 +74,14 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 73 unmodified lines | |||
| 74 | 74 | ||
| 75 | id = s->iformat->value; | 75 | id = s->iformat->value; |
| 76 | if (id == CODEC_ID_RAWVIDEO) { | 76 | if (id == CODEC_ID_RAWVIDEO) { |
| 77 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 77 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 78 | } else { | 78 | } else { |
| 79 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 79 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 80 | } | 80 | } |
| 81 | st->codec->codec_id = id; | 81 | st->codec->codec_id = id; |
| 82 | 82 | ||
| 83 | switch(st->codec->codec_type) { | 83 | switch(st->codec->codec_type) { |
| 84 | case CODEC_TYPE_AUDIO: | 84 | case AVMEDIA_TYPE_AUDIO: |
| 85 | st->codec->sample_rate = ap->sample_rate; | 85 | st->codec->sample_rate = ap->sample_rate; |
| 86 | if(ap->channels) st->codec->channels = ap->channels; | 86 | if(ap->channels) st->codec->channels = ap->channels; |
| 87 | else st->codec->channels = 1; | 87 | else st->codec->channels = 1; |
| @@ -90,7 +90,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 2 unmodified lines | |||
| 90 | st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8; | 90 | st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8; |
| 91 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); | 91 | av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
| 92 | break; | 92 | break; |
| 93 | case CODEC_TYPE_VIDEO: | 93 | case AVMEDIA_TYPE_VIDEO: |
| 94 | if(ap->time_base.num) | 94 | if(ap->time_base.num) |
| 95 | av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); | 95 | av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); |
| 96 | else | 96 | else |
| @@ -253,7 +253,7 @@ static int audio_read_header(AVFormatContext *s, · 156 unmodified lines | |||
| 253 | AVStream *st = av_new_stream(s, 0); | 253 | AVStream *st = av_new_stream(s, 0); |
| 254 | if (!st) | 254 | if (!st) |
| 255 | return AVERROR(ENOMEM); | 255 | return AVERROR(ENOMEM); |
| 256 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 256 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 257 | st->codec->codec_id = s->iformat->value; | 257 | st->codec->codec_id = s->iformat->value; |
| 258 | st->need_parsing = AVSTREAM_PARSE_FULL; | 258 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 259 | /* the parameters will be extracted from the compressed bitstream */ | 259 | /* the parameters will be extracted from the compressed bitstream */ |
| @@ -271,7 +271,7 @@ static int video_read_header(AVFormatContext *s, · 11 unmodified lines | |||
| 271 | if (!st) | 271 | if (!st) |
| 272 | return AVERROR(ENOMEM); | 272 | return AVERROR(ENOMEM); |
| 273 | 273 | ||
| 274 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 274 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 275 | st->codec->codec_id = s->iformat->value; | 275 | st->codec->codec_id = s->iformat->value; |
| 276 | st->need_parsing = AVSTREAM_PARSE_FULL; | 276 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 277 | 277 | ||
| @@ -700,7 +700,7 @@ static int adts_aac_read_header(AVFormatContext *s, · 422 unmodified lines | |||
| 700 | if (!st) | 700 | if (!st) |
| 701 | return AVERROR(ENOMEM); | 701 | return AVERROR(ENOMEM); |
| 702 | 702 | ||
| 703 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 703 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 704 | st->codec->codec_id = s->iformat->value; | 704 | st->codec->codec_id = s->iformat->value; |
| 705 | st->need_parsing = AVSTREAM_PARSE_FULL; | 705 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 706 | 706 | ||
| @@ -546,10 +546,10 @@ static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ · 545 unmodified lines | |||
| 546 | .parse_packet = rdt_parse_packet \ | 546 | .parse_packet = rdt_parse_packet \ |
| 547 | }; | 547 | }; |
| 548 | 548 | ||
| 549 | RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO); | 549 | RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", AVMEDIA_TYPE_VIDEO); |
| 550 | RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", CODEC_TYPE_AUDIO); | 550 | RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", AVMEDIA_TYPE_AUDIO); |
| 551 | RDT_HANDLER(video, "x-pn-realvideo", CODEC_TYPE_VIDEO); | 551 | RDT_HANDLER(video, "x-pn-realvideo", AVMEDIA_TYPE_VIDEO); |
| 552 | RDT_HANDLER(audio, "x-pn-realaudio", CODEC_TYPE_AUDIO); | 552 | RDT_HANDLER(audio, "x-pn-realaudio", AVMEDIA_TYPE_AUDIO); |
| 553 | 553 | ||
| 554 | void av_register_rdt_dynamic_payload_handlers(void) | 554 | void av_register_rdt_dynamic_payload_handlers(void) |
| 555 | { | 555 | { |
| @@ -461,7 +461,7 @@ void ff_get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size) · 460 unmodified lines | |||
| 461 | int id; | 461 | int id; |
| 462 | 462 | ||
| 463 | id = get_le16(pb); | 463 | id = get_le16(pb); |
| 464 | codec->codec_type = CODEC_TYPE_AUDIO; | 464 | codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 465 | codec->codec_tag = id; | 465 | codec->codec_tag = id; |
| 466 | codec->channels = get_le16(pb); | 466 | codec->channels = get_le16(pb); |
| 467 | codec->sample_rate = get_le32(pb); | 467 | codec->sample_rate = get_le32(pb); |
| @@ -527,8 +527,8 @@ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssiz · 59 unmodified lines | |||
| 527 | if(stream->frame_size && stream->sample_rate){ | 527 | if(stream->frame_size && stream->sample_rate){ |
| 528 | *au_scale=stream->frame_size; | 528 | *au_scale=stream->frame_size; |
| 529 | *au_rate= stream->sample_rate; | 529 | *au_rate= stream->sample_rate; |
| 530 | }else if(stream->codec_type == CODEC_TYPE_VIDEO || | 530 | }else if(stream->codec_type == AVMEDIA_TYPE_VIDEO || |
| 531 | stream->codec_type == CODEC_TYPE_SUBTITLE){ | 531 | stream->codec_type == AVMEDIA_TYPE_SUBTITLE){ |
| 532 | *au_scale= stream->time_base.num; | 532 | *au_scale= stream->time_base.num; |
| 533 | *au_rate = stream->time_base.den; | 533 | *au_rate = stream->time_base.den; |
| 534 | }else{ | 534 | }else{ |
| @@ -116,7 +116,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, · 115 unmodified lines | |||
| 116 | if(!st) | 116 | if(!st) |
| 117 | return AVERROR(ENOMEM); | 117 | return AVERROR(ENOMEM); |
| 118 | 118 | ||
| 119 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 119 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 120 | st->codec->codec_id = CODEC_ID_RL2; | 120 | st->codec->codec_id = CODEC_ID_RL2; |
| 121 | st->codec->codec_tag = 0; /* no fourcc */ | 121 | st->codec->codec_tag = 0; /* no fourcc */ |
| 122 | st->codec->width = 320; | 122 | st->codec->width = 320; |
| @@ -145,7 +145,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, · 22 unmodified lines | |||
| 145 | st = av_new_stream(s, 0); | 145 | st = av_new_stream(s, 0); |
| 146 | if (!st) | 146 | if (!st) |
| 147 | return AVERROR(ENOMEM); | 147 | return AVERROR(ENOMEM); |
| 148 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 148 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 149 | st->codec->codec_id = CODEC_ID_PCM_U8; | 149 | st->codec->codec_id = CODEC_ID_PCM_U8; |
| 150 | st->codec->codec_tag = 1; | 150 | st->codec->codec_tag = 1; |
| 151 | st->codec->channels = channels; | 151 | st->codec->channels = channels; |
| @@ -161,7 +161,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb, · 160 unmodified lines | |||
| 161 | url_fskip(pb, header_size + startpos - url_ftell(pb)); | 161 | url_fskip(pb, header_size + startpos - url_ftell(pb)); |
| 162 | st->codec->sample_rate = 8000; | 162 | st->codec->sample_rate = 8000; |
| 163 | st->codec->channels = 1; | 163 | st->codec->channels = 1; |
| 164 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 164 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 165 | st->codec->codec_id = CODEC_ID_RA_144; | 165 | st->codec->codec_id = CODEC_ID_RA_144; |
| 166 | } else { | 166 | } else { |
| 167 | int flavor, sub_packet_h, coded_framesize, sub_packet_size; | 167 | int flavor, sub_packet_h, coded_framesize, sub_packet_size; |
| @@ -195,7 +195,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb, · 27 unmodified lines | |||
| 195 | get_str8(pb, buf, sizeof(buf)); /* desc */ | 195 | get_str8(pb, buf, sizeof(buf)); /* desc */ |
| 196 | get_str8(pb, buf, sizeof(buf)); /* desc */ | 196 | get_str8(pb, buf, sizeof(buf)); /* desc */ |
| 197 | } | 197 | } |
| 198 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 198 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 199 | st->codec->codec_tag = AV_RL32(buf); | 199 | st->codec->codec_tag = AV_RL32(buf); |
| 200 | st->codec->codec_id = ff_codec_get_id(rm_codec_tags, st->codec->codec_tag); | 200 | st->codec->codec_id = ff_codec_get_id(rm_codec_tags, st->codec->codec_tag); |
| 201 | switch (st->codec->codec_id) { | 201 | switch (st->codec->codec_id) { |
| @@ -316,7 +316,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, ByteIOContext *pb, · 114 unmodified lines | |||
| 316 | st->codec->height = get_be16(pb); | 316 | st->codec->height = get_be16(pb); |
| 317 | st->codec->time_base.num= 1; | 317 | st->codec->time_base.num= 1; |
| 318 | fps= get_be16(pb); | 318 | fps= get_be16(pb); |
| 319 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 319 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 320 | get_be32(pb); | 320 | get_be32(pb); |
| 321 | fps2= get_be16(pb); | 321 | fps2= get_be16(pb); |
| 322 | get_be16(pb); | 322 | get_be16(pb); |
| @@ -479,7 +479,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 156 unmodified lines | |||
| 479 | st->duration = duration; | 479 | st->duration = duration; |
| 480 | get_str8(pb, buf, sizeof(buf)); /* desc */ | 480 | get_str8(pb, buf, sizeof(buf)); /* desc */ |
| 481 | get_str8(pb, buf, sizeof(buf)); /* mimetype */ | 481 | get_str8(pb, buf, sizeof(buf)); /* mimetype */ |
| 482 | st->codec->codec_type = CODEC_TYPE_DATA; | 482 | st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 483 | st->priv_data = ff_rm_alloc_rmstream(); | 483 | st->priv_data = ff_rm_alloc_rmstream(); |
| 484 | if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data, | 484 | if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data, |
| 485 | get_be32(pb)) < 0) | 485 | get_be32(pb)) < 0) |
| @@ -725,11 +725,11 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 239 unmodified lines | |||
| 725 | { | 725 | { |
| 726 | RMDemuxContext *rm = s->priv_data; | 726 | RMDemuxContext *rm = s->priv_data; |
| 727 | 727 | ||
| 728 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 728 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 729 | rm->current_stream= st->id; | 729 | rm->current_stream= st->id; |
| 730 | if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq)) | 730 | if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq)) |
| 731 | return -1; //got partial frame | 731 | return -1; //got partial frame |
| 732 | } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 732 | } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 733 | if ((st->codec->codec_id == CODEC_ID_RA_288) || | 733 | if ((st->codec->codec_id == CODEC_ID_RA_288) || |
| 734 | (st->codec->codec_id == CODEC_ID_COOK) || | 734 | (st->codec->codec_id == CODEC_ID_COOK) || |
| 735 | (st->codec->codec_id == CODEC_ID_ATRAC3) || | 735 | (st->codec->codec_id == CODEC_ID_ATRAC3) || |
| @@ -790,7 +790,7 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 54 unmodified lines | |||
| 790 | pkt->stream_index = st->index; | 790 | pkt->stream_index = st->index; |
| 791 | 791 | ||
| 792 | #if 0 | 792 | #if 0 |
| 793 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 793 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 794 | if(st->codec->codec_id == CODEC_ID_RV20){ | 794 | if(st->codec->codec_id == CODEC_ID_RV20){ |
| 795 | int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1); | 795 | int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1); |
| 796 | av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq); | 796 | av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq); |
| @@ -806,7 +806,7 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 9 unmodified lines | |||
| 806 | if (flags & 2) | 806 | if (flags & 2) |
| 807 | pkt->flags |= PKT_FLAG_KEY; | 807 | pkt->flags |= PKT_FLAG_KEY; |
| 808 | 808 | ||
| 809 | return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0; | 809 | return st->codec->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0; |
| 810 | } | 810 | } |
| 811 | 811 | ||
| 812 | int | 812 | int |
| @@ -932,7 +932,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, · 119 unmodified lines | |||
| 932 | return AV_NOPTS_VALUE; | 932 | return AV_NOPTS_VALUE; |
| 933 | 933 | ||
| 934 | st = s->streams[stream_index2]; | 934 | st = s->streams[stream_index2]; |
| 935 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 935 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 936 | h= get_byte(s->pb); len--; | 936 | h= get_byte(s->pb); len--; |
| 937 | if(!(h & 0x40)){ | 937 | if(!(h & 0x40)){ |
| 938 | seq = get_byte(s->pb); len--; | 938 | seq = get_byte(s->pb); len--; |
| @@ -141,7 +141,7 @@ static void rv10_write_header(AVFormatContext *ctx, · 140 unmodified lines | |||
| 141 | 141 | ||
| 142 | stream = &rm->streams[i]; | 142 | stream = &rm->streams[i]; |
| 143 | 143 | ||
| 144 | if (stream->enc->codec_type == CODEC_TYPE_AUDIO) { | 144 | if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 145 | desc = "The Audio Stream"; | 145 | desc = "The Audio Stream"; |
| 146 | mimetype = "audio/x-pn-realaudio"; | 146 | mimetype = "audio/x-pn-realaudio"; |
| 147 | codec_data_size = 73; | 147 | codec_data_size = 73; |
| @@ -177,7 +177,7 @@ static void rv10_write_header(AVFormatContext *ctx, · 29 unmodified lines | |||
| 177 | put_str8(s, mimetype); | 177 | put_str8(s, mimetype); |
| 178 | put_be32(s, codec_data_size); | 178 | put_be32(s, codec_data_size); |
| 179 | 179 | ||
| 180 | if (stream->enc->codec_type == CODEC_TYPE_AUDIO) { | 180 | if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 181 | int coded_frame_size, fscode, sample_rate; | 181 | int coded_frame_size, fscode, sample_rate; |
| 182 | sample_rate = stream->enc->sample_rate; | 182 | sample_rate = stream->enc->sample_rate; |
| 183 | coded_frame_size = (stream->enc->bit_rate * | 183 | coded_frame_size = (stream->enc->bit_rate * |
| @@ -309,7 +309,7 @@ static int rm_write_header(AVFormatContext *s) · 125 unmodified lines | |||
| 309 | stream->enc = codec; | 309 | stream->enc = codec; |
| 310 | 310 | ||
| 311 | switch(codec->codec_type) { | 311 | switch(codec->codec_type) { |
| 312 | case CODEC_TYPE_AUDIO: | 312 | case AVMEDIA_TYPE_AUDIO: |
| 313 | rm->audio_stream = stream; | 313 | rm->audio_stream = stream; |
| 314 | stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size; | 314 | stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size; |
| 315 | /* XXX: dummy values */ | 315 | /* XXX: dummy values */ |
| @@ -317,7 +317,7 @@ static int rm_write_header(AVFormatContext *s) · 1 unmodified line | |||
| 317 | stream->nb_packets = 0; | 317 | stream->nb_packets = 0; |
| 318 | stream->total_frames = stream->nb_packets; | 318 | stream->total_frames = stream->nb_packets; |
| 319 | break; | 319 | break; |
| 320 | case CODEC_TYPE_VIDEO: | 320 | case AVMEDIA_TYPE_VIDEO: |
| 321 | rm->video_stream = stream; | 321 | rm->video_stream = stream; |
| 322 | stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num; | 322 | stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num; |
| 323 | /* XXX: dummy values */ | 323 | /* XXX: dummy values */ |
| @@ -408,7 +408,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int · 84 unmodified lines | |||
| 408 | static int rm_write_packet(AVFormatContext *s, AVPacket *pkt) | 408 | static int rm_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 409 | { | 409 | { |
| 410 | if (s->streams[pkt->stream_index]->codec->codec_type == | 410 | if (s->streams[pkt->stream_index]->codec->codec_type == |
| 411 | CODEC_TYPE_AUDIO) | 411 | AVMEDIA_TYPE_AUDIO) |
| 412 | return rm_write_audio(s, pkt->data, pkt->size, pkt->flags); | 412 | return rm_write_audio(s, pkt->data, pkt->size, pkt->flags); |
| 413 | else | 413 | else |
| 414 | return rm_write_video(s, pkt->data, pkt->size, pkt->flags); | 414 | return rm_write_video(s, pkt->data, pkt->size, pkt->flags); |
| @@ -141,7 +141,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) · 140 unmodified lines | |||
| 141 | vst = av_new_stream(s, 0); | 141 | vst = av_new_stream(s, 0); |
| 142 | if (!vst) | 142 | if (!vst) |
| 143 | return AVERROR(ENOMEM); | 143 | return AVERROR(ENOMEM); |
| 144 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 144 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 145 | vst->codec->codec_tag = read_line_and_int(pb, &error); // video format | 145 | vst->codec->codec_tag = read_line_and_int(pb, &error); // video format |
| 146 | vst->codec->width = read_line_and_int(pb, &error); // video width | 146 | vst->codec->width = read_line_and_int(pb, &error); // video width |
| 147 | vst->codec->height = read_line_and_int(pb, &error); // video height | 147 | vst->codec->height = read_line_and_int(pb, &error); // video height |
| @@ -183,7 +183,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) · 35 unmodified lines | |||
| 183 | ast = av_new_stream(s, 0); | 183 | ast = av_new_stream(s, 0); |
| 184 | if (!ast) | 184 | if (!ast) |
| 185 | return AVERROR(ENOMEM); | 185 | return AVERROR(ENOMEM); |
| 186 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 186 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 187 | ast->codec->codec_tag = audio_format; | 187 | ast->codec->codec_tag = audio_format; |
| 188 | ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate | 188 | ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate |
| 189 | ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels | 189 | ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels |
| @@ -295,7 +295,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) · 105 unmodified lines | |||
| 295 | if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0) | 295 | if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0) |
| 296 | return AVERROR(EIO); | 296 | return AVERROR(EIO); |
| 297 | 297 | ||
| 298 | if (stream->codec->codec_type == CODEC_TYPE_VIDEO && | 298 | if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO && |
| 299 | stream->codec->codec_tag == 124) { | 299 | stream->codec->codec_tag == 124) { |
| 300 | // We have to split Escape 124 frames because there are | 300 | // We have to split Escape 124 frames because there are |
| 301 | // multiple frames per chunk in Escape 124 samples. | 301 | // multiple frames per chunk in Escape 124 samples. |
| @@ -327,7 +327,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) · 25 unmodified lines | |||
| 327 | return AVERROR(EIO); | 327 | return AVERROR(EIO); |
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | if (stream->codec->codec_type == CODEC_TYPE_VIDEO) { | 330 | if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 331 | // frames_per_chunk should always be one here; the header | 331 | // frames_per_chunk should always be one here; the header |
| 332 | // parsing will warn if it isn't. | 332 | // parsing will warn if it isn't. |
| 333 | pkt->duration = rpl->frames_per_chunk; | 333 | pkt->duration = rpl->frames_per_chunk; |
| @@ -35,39 +35,39 @@ static const struct · 34 unmodified lines | |||
| 35 | { | 35 | { |
| 36 | int pt; | 36 | int pt; |
| 37 | const char enc_name[6]; | 37 | const char enc_name[6]; |
| 38 | enum CodecType codec_type; | 38 | enum AVMediaType codec_type; |
| 39 | enum CodecID codec_id; | 39 | enum CodecID codec_id; |
| 40 | int clock_rate; | 40 | int clock_rate; |
| 41 | int audio_channels; | 41 | int audio_channels; |
| 42 | } AVRtpPayloadTypes[]= | 42 | } AVRtpPayloadTypes[]= |
| 43 | { | 43 | { |
| 44 | {0, "PCMU", CODEC_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1}, | 44 | {0, "PCMU", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1}, |
| 45 | {3, "GSM", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 45 | {3, "GSM", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 46 | {4, "G723", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 46 | {4, "G723", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 47 | {5, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 47 | {5, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 48 | {6, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1}, | 48 | {6, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1}, |
| 49 | {7, "LPC", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 49 | {7, "LPC", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 50 | {8, "PCMA", CODEC_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1}, | 50 | {8, "PCMA", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1}, |
| 51 | {9, "G722", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 51 | {9, "G722", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 52 | {10, "L16", CODEC_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2}, | 52 | {10, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2}, |
| 53 | {11, "L16", CODEC_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1}, | 53 | {11, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1}, |
| 54 | {12, "QCELP", CODEC_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1}, | 54 | {12, "QCELP", AVMEDIA_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1}, |
| 55 | {13, "CN", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 55 | {13, "CN", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 56 | {14, "MPA", CODEC_TYPE_AUDIO, CODEC_ID_MP2, -1, -1}, | 56 | {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP2, -1, -1}, |
| 57 | {14, "MPA", CODEC_TYPE_AUDIO, CODEC_ID_MP3, -1, -1}, | 57 | {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3, -1, -1}, |
| 58 | {15, "G728", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 58 | {15, "G728", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 59 | {16, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1}, | 59 | {16, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1}, |
| 60 | {17, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1}, | 60 | {17, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1}, |
| 61 | {18, "G729", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, | 61 | {18, "G729", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1}, |
| 62 | {25, "CelB", CODEC_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1}, | 62 | {25, "CelB", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1}, |
| 63 | {26, "JPEG", CODEC_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1}, | 63 | {26, "JPEG", AVMEDIA_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1}, |
| 64 | {28, "nv", CODEC_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1}, | 64 | {28, "nv", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1}, |
| 65 | {31, "H261", CODEC_TYPE_VIDEO, CODEC_ID_H261, 90000, -1}, | 65 | {31, "H261", AVMEDIA_TYPE_VIDEO, CODEC_ID_H261, 90000, -1}, |
| 66 | {32, "MPV", CODEC_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1}, | 66 | {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1}, |
| 67 | {32, "MPV", CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1}, | 67 | {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1}, |
| 68 | {33, "MP2T", CODEC_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1}, | 68 | {33, "MP2T", AVMEDIA_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1}, |
| 69 | {34, "H263", CODEC_TYPE_VIDEO, CODEC_ID_H263, 90000, -1}, | 69 | {34, "H263", AVMEDIA_TYPE_VIDEO, CODEC_ID_H263, 90000, -1}, |
| 70 | {-1, "", CODEC_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1} | 70 | {-1, "", AVMEDIA_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1} |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) | 73 | int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) |
| @@ -118,7 +118,7 @@ const char *ff_rtp_enc_name(int payload_type) · 44 unmodified lines | |||
| 118 | return ""; | 118 | return ""; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type) | 121 | enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type) |
| 122 | { | 122 | { |
| 123 | int i; | 123 | int i; |
| 124 | 124 | ||
| @@ -66,7 +66,7 @@ const char *ff_rtp_enc_name(int payload_type); · 65 unmodified lines | |||
| 66 | * @return In case of unknown encoding name, CODEC_ID_NONE is returned; | 66 | * @return In case of unknown encoding name, CODEC_ID_NONE is returned; |
| 67 | * otherwise, the codec id is returned | 67 | * otherwise, the codec id is returned |
| 68 | */ | 68 | */ |
| 69 | enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); | 69 | enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type); |
| 70 | 70 | ||
| 71 | #define RTP_PT_PRIVATE 96 | 71 | #define RTP_PT_PRIVATE 96 |
| 72 | #define RTP_VERSION 2 | 72 | #define RTP_VERSION 2 |
| @@ -51,8 +51,8 @@ · 50 unmodified lines | |||
| 51 | /* statistics functions */ | 51 | /* statistics functions */ |
| 52 | RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL; | 52 | RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL; |
| 53 | 53 | ||
| 54 | static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", CODEC_TYPE_VIDEO, CODEC_ID_MPEG4}; | 54 | static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4}; |
| 55 | static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_AAC}; | 55 | static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC}; |
| 56 | 56 | ||
| 57 | void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler) | 57 | void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler) |
| 58 | { | 58 | { |
| @@ -350,7 +350,7 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r · 291 unmodified lines | |||
| 350 | st->need_parsing = AVSTREAM_PARSE_FULL; | 350 | st->need_parsing = AVSTREAM_PARSE_FULL; |
| 351 | break; | 351 | break; |
| 352 | default: | 352 | default: |
| 353 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 353 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 354 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); | 354 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
| 355 | } | 355 | } |
| 356 | break; | 356 | break; |
| @@ -132,7 +132,7 @@ typedef int (*DynamicPayloadPacketHandlerProc) (AVFormatContext *ctx, · 131 unmodified lines | |||
| 132 | struct RTPDynamicProtocolHandler_s { | 132 | struct RTPDynamicProtocolHandler_s { |
| 133 | // fields from AVRtpDynamicPayloadType_s | 133 | // fields from AVRtpDynamicPayloadType_s |
| 134 | const char enc_name[50]; /* XXX: still why 50 ? ;-) */ | 134 | const char enc_name[50]; /* XXX: still why 50 ? ;-) */ |
| 135 | enum CodecType codec_type; | 135 | enum AVMediaType codec_type; |
| 136 | enum CodecID codec_id; | 136 | enum CodecID codec_id; |
| 137 | 137 | ||
| 138 | // may be null | 138 | // may be null |
| @@ -170,7 +170,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index, · 169 unmodified lines | |||
| 170 | 170 | ||
| 171 | RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = { | 171 | RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = { |
| 172 | .enc_name = "AMR", | 172 | .enc_name = "AMR", |
| 173 | .codec_type = CODEC_TYPE_AUDIO, | 173 | .codec_type = AVMEDIA_TYPE_AUDIO, |
| 174 | .codec_id = CODEC_ID_AMR_NB, | 174 | .codec_id = CODEC_ID_AMR_NB, |
| 175 | .parse_sdp_a_line = amr_parse_sdp_line, | 175 | .parse_sdp_a_line = amr_parse_sdp_line, |
| 176 | .parse_packet = amr_handle_packet, | 176 | .parse_packet = amr_handle_packet, |
| @@ -178,7 +178,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = { · 1 unmodified line | |||
| 178 | 178 | ||
| 179 | RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = { | 179 | RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = { |
| 180 | .enc_name = "AMR-WB", | 180 | .enc_name = "AMR-WB", |
| 181 | .codec_type = CODEC_TYPE_AUDIO, | 181 | .codec_type = AVMEDIA_TYPE_AUDIO, |
| 182 | .codec_id = CODEC_ID_AMR_WB, | 182 | .codec_id = CODEC_ID_AMR_WB, |
| 183 | .parse_sdp_a_line = amr_parse_sdp_line, | 183 | .parse_sdp_a_line = amr_parse_sdp_line, |
| 184 | .parse_packet = amr_handle_packet, | 184 | .parse_packet = amr_handle_packet, |
| @@ -277,5 +277,5 @@ RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \ · 276 unmodified lines | |||
| 277 | .parse_packet = asfrtp_parse_packet, \ | 277 | .parse_packet = asfrtp_parse_packet, \ |
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", CODEC_TYPE_VIDEO); | 280 | RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", AVMEDIA_TYPE_VIDEO); |
| 281 | RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", CODEC_TYPE_AUDIO); | 281 | RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", AVMEDIA_TYPE_AUDIO); |
| @@ -94,14 +94,14 @@ static int h263_handle_packet(AVFormatContext *ctx, · 93 unmodified lines | |||
| 94 | 94 | ||
| 95 | RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = { | 95 | RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = { |
| 96 | .enc_name = "H263-1998", | 96 | .enc_name = "H263-1998", |
| 97 | .codec_type = CODEC_TYPE_VIDEO, | 97 | .codec_type = AVMEDIA_TYPE_VIDEO, |
| 98 | .codec_id = CODEC_ID_H263, | 98 | .codec_id = CODEC_ID_H263, |
| 99 | .parse_packet = h263_handle_packet, | 99 | .parse_packet = h263_handle_packet, |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = { | 102 | RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = { |
| 103 | .enc_name = "H263-2000", | 103 | .enc_name = "H263-2000", |
| 104 | .codec_type = CODEC_TYPE_VIDEO, | 104 | .codec_type = AVMEDIA_TYPE_VIDEO, |
| 105 | .codec_id = CODEC_ID_H263, | 105 | .codec_id = CODEC_ID_H263, |
| 106 | .parse_packet = h263_handle_packet, | 106 | .parse_packet = h263_handle_packet, |
| 107 | }; | 107 | }; |
| @@ -411,7 +411,7 @@ This is the structure for expanding on the dynamic rtp protocols (makes everythi · 410 unmodified lines | |||
| 411 | */ | 411 | */ |
| 412 | RTPDynamicProtocolHandler ff_h264_dynamic_handler = { | 412 | RTPDynamicProtocolHandler ff_h264_dynamic_handler = { |
| 413 | .enc_name = "H264", | 413 | .enc_name = "H264", |
| 414 | .codec_type = CODEC_TYPE_VIDEO, | 414 | .codec_type = AVMEDIA_TYPE_VIDEO, |
| 415 | .codec_id = CODEC_ID_H264, | 415 | .codec_id = CODEC_ID_H264, |
| 416 | .parse_sdp_a_line = parse_h264_sdp_line, | 416 | .parse_sdp_a_line = parse_h264_sdp_line, |
| 417 | .open = h264_new_context, | 417 | .open = h264_new_context, |
| @@ -378,7 +378,7 @@ static int theora_parse_sdp_line(AVFormatContext *s, int st_index, · 377 unmodified lines | |||
| 378 | 378 | ||
| 379 | RTPDynamicProtocolHandler ff_theora_dynamic_handler = { | 379 | RTPDynamicProtocolHandler ff_theora_dynamic_handler = { |
| 380 | .enc_name = "theora", | 380 | .enc_name = "theora", |
| 381 | .codec_type = CODEC_TYPE_VIDEO, | 381 | .codec_type = AVMEDIA_TYPE_VIDEO, |
| 382 | .codec_id = CODEC_ID_THEORA, | 382 | .codec_id = CODEC_ID_THEORA, |
| 383 | .parse_sdp_a_line = theora_parse_sdp_line, | 383 | .parse_sdp_a_line = theora_parse_sdp_line, |
| 384 | .open = theora_new_context, | 384 | .open = theora_new_context, |
| @@ -209,7 +209,7 @@ vorbis_handle_packet(AVFormatContext * ctx, · 208 unmodified lines | |||
| 209 | 209 | ||
| 210 | RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = { | 210 | RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = { |
| 211 | .enc_name = "vorbis", | 211 | .enc_name = "vorbis", |
| 212 | .codec_type = CODEC_TYPE_AUDIO, | 212 | .codec_type = AVMEDIA_TYPE_AUDIO, |
| 213 | .codec_id = CODEC_ID_VORBIS, | 213 | .codec_id = CODEC_ID_VORBIS, |
| 214 | .parse_sdp_a_line = NULL, | 214 | .parse_sdp_a_line = NULL, |
| 215 | .open = vorbis_new_context, | 215 | .open = vorbis_new_context, |
| @@ -78,7 +78,7 @@ static int rtp_write_header(AVFormatContext *s1) · 77 unmodified lines | |||
| 78 | 78 | ||
| 79 | s->payload_type = ff_rtp_get_payload_type(st->codec); | 79 | s->payload_type = ff_rtp_get_payload_type(st->codec); |
| 80 | if (s->payload_type < 0) | 80 | if (s->payload_type < 0) |
| 81 | s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO); | 81 | s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO); |
| 82 | 82 | ||
| 83 | s->base_timestamp = ff_random_get_seed(); | 83 | s->base_timestamp = ff_random_get_seed(); |
| 84 | s->timestamp = s->base_timestamp; | 84 | s->timestamp = s->base_timestamp; |
| @@ -102,14 +102,14 @@ static int rtp_write_header(AVFormatContext *s1) · 17 unmodified lines | |||
| 102 | 102 | ||
| 103 | s->max_frames_per_packet = 0; | 103 | s->max_frames_per_packet = 0; |
| 104 | if (s1->max_delay) { | 104 | if (s1->max_delay) { |
| 105 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 105 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 106 | if (st->codec->frame_size == 0) { | 106 | if (st->codec->frame_size == 0) { |
| 107 | av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n"); | 107 | av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n"); |
| 108 | } else { | 108 | } else { |
| 109 | s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN); | 109 | s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN); |
| 110 | } | 110 | } |
| 111 | } | 111 | } |
| 112 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 112 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 113 | /* FIXME: We should round down here... */ | 113 | /* FIXME: We should round down here... */ |
| 114 | s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base); | 114 | s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base); |
| 115 | } | 115 | } |
| @@ -151,7 +151,7 @@ static int rtp_write_header(AVFormatContext *s1) · 35 unmodified lines | |||
| 151 | case CODEC_ID_AAC: | 151 | case CODEC_ID_AAC: |
| 152 | s->num_frames = 0; | 152 | s->num_frames = 0; |
| 153 | default: | 153 | default: |
| 154 | if (st->codec->codec_type == CODEC_TYPE_AUDIO) { | 154 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 155 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); | 155 | av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
| 156 | } | 156 | } |
| 157 | s->buf_ptr = s->buf; | 157 | s->buf_ptr = s->buf; |
| @@ -141,7 +141,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, · 140 unmodified lines | |||
| 141 | get_word_sep(buf, sizeof(buf), "/", &p); | 141 | get_word_sep(buf, sizeof(buf), "/", &p); |
| 142 | i = atoi(buf); | 142 | i = atoi(buf); |
| 143 | switch (codec->codec_type) { | 143 | switch (codec->codec_type) { |
| 144 | case CODEC_TYPE_AUDIO: | 144 | case AVMEDIA_TYPE_AUDIO: |
| 145 | av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name); | 145 | av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name); |
| 146 | codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE; | 146 | codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE; |
| 147 | codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; | 147 | codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; |
| @@ -161,7 +161,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, · 13 unmodified lines | |||
| 161 | av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n", | 161 | av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n", |
| 162 | codec->channels); | 162 | codec->channels); |
| 163 | break; | 163 | break; |
| 164 | case CODEC_TYPE_VIDEO: | 164 | case AVMEDIA_TYPE_VIDEO: |
| 165 | av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); | 165 | av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); |
| 166 | break; | 166 | break; |
| 167 | default: | 167 | default: |
| @@ -343,7 +343,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 175 unmodified lines | |||
| 343 | RTSPState *rt = s->priv_data; | 343 | RTSPState *rt = s->priv_data; |
| 344 | char buf1[64], st_type[64]; | 344 | char buf1[64], st_type[64]; |
| 345 | const char *p; | 345 | const char *p; |
| 346 | enum CodecType codec_type; | 346 | enum AVMediaType codec_type; |
| 347 | int payload_type, i; | 347 | int payload_type, i; |
| 348 | AVStream *st; | 348 | AVStream *st; |
| 349 | RTSPStream *rtsp_st; | 349 | RTSPStream *rtsp_st; |
| @@ -396,11 +396,11 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 46 unmodified lines | |||
| 396 | s1->skip_media = 0; | 396 | s1->skip_media = 0; |
| 397 | get_word(st_type, sizeof(st_type), &p); | 397 | get_word(st_type, sizeof(st_type), &p); |
| 398 | if (!strcmp(st_type, "audio")) { | 398 | if (!strcmp(st_type, "audio")) { |
| 399 | codec_type = CODEC_TYPE_AUDIO; | 399 | codec_type = AVMEDIA_TYPE_AUDIO; |
| 400 | } else if (!strcmp(st_type, "video")) { | 400 | } else if (!strcmp(st_type, "video")) { |
| 401 | codec_type = CODEC_TYPE_VIDEO; | 401 | codec_type = AVMEDIA_TYPE_VIDEO; |
| 402 | } else if (!strcmp(st_type, "application")) { | 402 | } else if (!strcmp(st_type, "application")) { |
| 403 | codec_type = CODEC_TYPE_DATA; | 403 | codec_type = AVMEDIA_TYPE_DATA; |
| 404 | } else { | 404 | } else { |
| 405 | s1->skip_media = 1; | 405 | s1->skip_media = 1; |
| 406 | return; | 406 | return; |
| @@ -1181,7 +1181,7 @@ static int make_setup_request(AVFormatContext *s, const char *host, int port, · 774 unmodified lines | |||
| 1181 | * will return an error. Therefore, we skip those streams. */ | 1181 | * will return an error. Therefore, we skip those streams. */ |
| 1182 | if (rt->server_type == RTSP_SERVER_WMS && | 1182 | if (rt->server_type == RTSP_SERVER_WMS && |
| 1183 | s->streams[rtsp_st->stream_index]->codec->codec_type == | 1183 | s->streams[rtsp_st->stream_index]->codec->codec_type == |
| 1184 | CODEC_TYPE_DATA) | 1184 | AVMEDIA_TYPE_DATA) |
| 1185 | continue; | 1185 | continue; |
| 1186 | snprintf(transport, sizeof(transport) - 1, | 1186 | snprintf(transport, sizeof(transport) - 1, |
| 1187 | "%s/TCP;", trans_pref); | 1187 | "%s/TCP;", trans_pref); |
| @@ -301,13 +301,13 @@ static void sdp_write_media(char *buff, int size, AVCodecContext *c, const char · 300 unmodified lines | |||
| 301 | 301 | ||
| 302 | payload_type = ff_rtp_get_payload_type(c); | 302 | payload_type = ff_rtp_get_payload_type(c); |
| 303 | if (payload_type < 0) { | 303 | if (payload_type < 0) { |
| 304 | payload_type = RTP_PT_PRIVATE + (c->codec_type == CODEC_TYPE_AUDIO); | 304 | payload_type = RTP_PT_PRIVATE + (c->codec_type == AVMEDIA_TYPE_AUDIO); |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | switch (c->codec_type) { | 307 | switch (c->codec_type) { |
| 308 | case CODEC_TYPE_VIDEO : type = "video" ; break; | 308 | case AVMEDIA_TYPE_VIDEO : type = "video" ; break; |
| 309 | case CODEC_TYPE_AUDIO : type = "audio" ; break; | 309 | case AVMEDIA_TYPE_AUDIO : type = "audio" ; break; |
| 310 | case CODEC_TYPE_SUBTITLE: type = "text" ; break; | 310 | case AVMEDIA_TYPE_SUBTITLE: type = "text" ; break; |
| 311 | default : type = "application"; break; | 311 | default : type = "application"; break; |
| 312 | } | 312 | } |
| 313 | 313 | ||
| @@ -133,7 +133,7 @@ static int film_read_header(AVFormatContext *s, · 132 unmodified lines | |||
| 133 | if (!st) | 133 | if (!st) |
| 134 | return AVERROR(ENOMEM); | 134 | return AVERROR(ENOMEM); |
| 135 | film->video_stream_index = st->index; | 135 | film->video_stream_index = st->index; |
| 136 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 136 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 137 | st->codec->codec_id = film->video_type; | 137 | st->codec->codec_id = film->video_type; |
| 138 | st->codec->codec_tag = 0; /* no fourcc */ | 138 | st->codec->codec_tag = 0; /* no fourcc */ |
| 139 | st->codec->width = AV_RB32(&scratch[16]); | 139 | st->codec->width = AV_RB32(&scratch[16]); |
| @@ -145,7 +145,7 @@ static int film_read_header(AVFormatContext *s, · 5 unmodified lines | |||
| 145 | if (!st) | 145 | if (!st) |
| 146 | return AVERROR(ENOMEM); | 146 | return AVERROR(ENOMEM); |
| 147 | film->audio_stream_index = st->index; | 147 | film->audio_stream_index = st->index; |
| 148 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 148 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 149 | st->codec->codec_id = film->audio_type; | 149 | st->codec->codec_id = film->audio_type; |
| 150 | st->codec->codec_tag = 1; | 150 | st->codec->codec_tag = 1; |
| 151 | st->codec->channels = film->audio_channels; | 151 | st->codec->channels = film->audio_channels; |
| @@ -109,7 +109,7 @@ static int vmd_read_header(AVFormatContext *s, · 108 unmodified lines | |||
| 109 | return AVERROR(ENOMEM); | 109 | return AVERROR(ENOMEM); |
| 110 | av_set_pts_info(vst, 33, 1, 10); | 110 | av_set_pts_info(vst, 33, 1, 10); |
| 111 | vmd->video_stream_index = vst->index; | 111 | vmd->video_stream_index = vst->index; |
| 112 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 112 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 113 | vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO; | 113 | vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO; |
| 114 | vst->codec->codec_tag = 0; /* no fourcc */ | 114 | vst->codec->codec_tag = 0; /* no fourcc */ |
| 115 | vst->codec->width = AV_RL16(&vmd->vmd_header[12]); | 115 | vst->codec->width = AV_RL16(&vmd->vmd_header[12]); |
| @@ -129,7 +129,7 @@ static int vmd_read_header(AVFormatContext *s, · 13 unmodified lines | |||
| 129 | if (!st) | 129 | if (!st) |
| 130 | return AVERROR(ENOMEM); | 130 | return AVERROR(ENOMEM); |
| 131 | vmd->audio_stream_index = st->index; | 131 | vmd->audio_stream_index = st->index; |
| 132 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 132 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 133 | st->codec->codec_id = CODEC_ID_VMDAUDIO; | 133 | st->codec->codec_id = CODEC_ID_VMDAUDIO; |
| 134 | st->codec->codec_tag = 0; /* no fourcc */ | 134 | st->codec->codec_tag = 0; /* no fourcc */ |
| 135 | st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1; | 135 | st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1; |
| @@ -74,7 +74,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c) · 73 unmodified lines | |||
| 74 | ast = av_new_stream(s, 0); | 74 | ast = av_new_stream(s, 0); |
| 75 | if (!ast) | 75 | if (!ast) |
| 76 | return -1; | 76 | return -1; |
| 77 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 77 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 78 | ast->codec->codec_id = CODEC_ID_PCM_U8; | 78 | ast->codec->codec_id = CODEC_ID_PCM_U8; |
| 79 | ast->codec->channels = 1; | 79 | ast->codec->channels = 1; |
| 80 | ast->codec->bits_per_coded_sample = c->bits; | 80 | ast->codec->bits_per_coded_sample = c->bits; |
| @@ -118,7 +118,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, ByteIOContext *pb · 37 unmodified lines | |||
| 118 | st = av_new_stream(s, 0); | 118 | st = av_new_stream(s, 0); |
| 119 | if (!st) | 119 | if (!st) |
| 120 | return -1; | 120 | return -1; |
| 121 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 121 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 122 | st->codec->codec_id = CODEC_ID_VB; | 122 | st->codec->codec_id = CODEC_ID_VB; |
| 123 | st->codec->codec_tag = MKTAG('V', 'B', 'V', '1'); | 123 | st->codec->codec_tag = MKTAG('V', 'B', 'V', '1'); |
| 124 | st->codec->width = width; | 124 | st->codec->width = width; |
| @@ -158,7 +158,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) · 157 unmodified lines | |||
| 158 | st->codec->width = smk->width; | 158 | st->codec->width = smk->width; |
| 159 | st->codec->height = smk->height; | 159 | st->codec->height = smk->height; |
| 160 | st->codec->pix_fmt = PIX_FMT_PAL8; | 160 | st->codec->pix_fmt = PIX_FMT_PAL8; |
| 161 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 161 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 162 | st->codec->codec_id = CODEC_ID_SMACKVIDEO; | 162 | st->codec->codec_id = CODEC_ID_SMACKVIDEO; |
| 163 | st->codec->codec_tag = smk->magic; | 163 | st->codec->codec_tag = smk->magic; |
| 164 | /* Smacker uses 100000 as internal timebase */ | 164 | /* Smacker uses 100000 as internal timebase */ |
| @@ -176,7 +176,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) · 11 unmodified lines | |||
| 176 | if(smk->rates[i] & 0xFFFFFF){ | 176 | if(smk->rates[i] & 0xFFFFFF){ |
| 177 | ast[i] = av_new_stream(s, 0); | 177 | ast[i] = av_new_stream(s, 0); |
| 178 | smk->indexes[i] = ast[i]->index; | 178 | smk->indexes[i] = ast[i]->index; |
| 179 | ast[i]->codec->codec_type = CODEC_TYPE_AUDIO; | 179 | ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 180 | if (smk->rates[i] & SMK_AUD_BINKAUD) { | 180 | if (smk->rates[i] & SMK_AUD_BINKAUD) { |
| 181 | ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT; | 181 | ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT; |
| 182 | } else if (smk->rates[i] & SMK_AUD_USEDCT) { | 182 | } else if (smk->rates[i] & SMK_AUD_USEDCT) { |
| @@ -114,7 +114,7 @@ static int sol_read_header(AVFormatContext *s, · 113 unmodified lines | |||
| 114 | st = av_new_stream(s, 0); | 114 | st = av_new_stream(s, 0); |
| 115 | if (!st) | 115 | if (!st) |
| 116 | return -1; | 116 | return -1; |
| 117 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 117 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 118 | st->codec->codec_tag = id; | 118 | st->codec->codec_tag = id; |
| 119 | st->codec->codec_id = codec; | 119 | st->codec->codec_id = codec; |
| 120 | st->codec->channels = channels; | 120 | st->codec->channels = channels; |
| @@ -53,7 +53,7 @@ static int sox_read_header(AVFormatContext *s, · 52 unmodified lines | |||
| 53 | if (!st) | 53 | if (!st) |
| 54 | return AVERROR(ENOMEM); | 54 | return AVERROR(ENOMEM); |
| 55 | 55 | ||
| 56 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 56 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 57 | 57 | ||
| 58 | if (get_le32(pb) == SOX_TAG) { | 58 | if (get_le32(pb) == SOX_TAG) { |
| 59 | st->codec->codec_id = CODEC_ID_PCM_S32LE; | 59 | st->codec->codec_id = CODEC_ID_PCM_S32LE; |
| @@ -97,7 +97,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 96 unmodified lines | |||
| 97 | 97 | ||
| 98 | for (i=0; i<s->nb_streams; i++) { | 98 | for (i=0; i<s->nb_streams; i++) { |
| 99 | st = s->streams[i]; | 99 | st = s->streams[i]; |
| 100 | if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) | 100 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id) |
| 101 | goto skip; | 101 | goto skip; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| @@ -109,7 +109,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines | |||
| 109 | vst = av_new_stream(s, ch_id); | 109 | vst = av_new_stream(s, ch_id); |
| 110 | if (!vst) | 110 | if (!vst) |
| 111 | return -1; | 111 | return -1; |
| 112 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 112 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 113 | vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb)); | 113 | vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb)); |
| 114 | av_set_pts_info(vst, 16, 256, swf->frame_rate); | 114 | av_set_pts_info(vst, 16, 256, swf->frame_rate); |
| 115 | vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; | 115 | vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; |
| @@ -120,7 +120,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines | |||
| 120 | 120 | ||
| 121 | for (i=0; i<s->nb_streams; i++) { | 121 | for (i=0; i<s->nb_streams; i++) { |
| 122 | st = s->streams[i]; | 122 | st = s->streams[i]; |
| 123 | if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1) | 123 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) |
| 124 | goto skip; | 124 | goto skip; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| @@ -131,7 +131,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines | |||
| 131 | if (!ast) | 131 | if (!ast) |
| 132 | return -1; | 132 | return -1; |
| 133 | ast->codec->channels = 1 + (v&1); | 133 | ast->codec->channels = 1 + (v&1); |
| 134 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 134 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 135 | ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15); | 135 | ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15); |
| 136 | ast->need_parsing = AVSTREAM_PARSE_FULL; | 136 | ast->need_parsing = AVSTREAM_PARSE_FULL; |
| 137 | sample_rate_code= (v>>2) & 3; | 137 | sample_rate_code= (v>>2) & 3; |
| @@ -145,7 +145,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 7 unmodified lines | |||
| 145 | len -= 2; | 145 | len -= 2; |
| 146 | for(i=0; i<s->nb_streams; i++) { | 146 | for(i=0; i<s->nb_streams; i++) { |
| 147 | st = s->streams[i]; | 147 | st = s->streams[i]; |
| 148 | if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) { | 148 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id) { |
| 149 | frame = get_le16(pb); | 149 | frame = get_le16(pb); |
| 150 | av_get_packet(pb, pkt, len-2); | 150 | av_get_packet(pb, pkt, len-2); |
| 151 | pkt->pos = pos; | 151 | pkt->pos = pos; |
| @@ -157,7 +157,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines | |||
| 157 | } else if (tag == TAG_STREAMBLOCK) { | 157 | } else if (tag == TAG_STREAMBLOCK) { |
| 158 | for (i = 0; i < s->nb_streams; i++) { | 158 | for (i = 0; i < s->nb_streams; i++) { |
| 159 | st = s->streams[i]; | 159 | st = s->streams[i]; |
| 160 | if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1) { | 160 | if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) { |
| 161 | if (st->codec->codec_id == CODEC_ID_MP3) { | 161 | if (st->codec->codec_id == CODEC_ID_MP3) { |
| 162 | url_fskip(pb, 4); | 162 | url_fskip(pb, 4); |
| 163 | av_get_packet(pb, pkt, len-4); | 163 | av_get_packet(pb, pkt, len-4); |
| @@ -179,7 +179,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 15 unmodified lines | |||
| 179 | vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */ | 179 | vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */ |
| 180 | if (!vst) | 180 | if (!vst) |
| 181 | return -1; | 181 | return -1; |
| 182 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 182 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 183 | vst->codec->codec_id = CODEC_ID_MJPEG; | 183 | vst->codec->codec_id = CODEC_ID_MJPEG; |
| 184 | av_set_pts_info(vst, 64, 256, swf->frame_rate); | 184 | av_set_pts_info(vst, 64, 256, swf->frame_rate); |
| 185 | vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; | 185 | vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; |
| @@ -185,7 +185,7 @@ static int swf_write_header(AVFormatContext *s) · 184 unmodified lines | |||
| 185 | 185 | ||
| 186 | for(i=0;i<s->nb_streams;i++) { | 186 | for(i=0;i<s->nb_streams;i++) { |
| 187 | AVCodecContext *enc = s->streams[i]->codec; | 187 | AVCodecContext *enc = s->streams[i]->codec; |
| 188 | if (enc->codec_type == CODEC_TYPE_AUDIO) { | 188 | if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 189 | if (enc->codec_id == CODEC_ID_MP3) { | 189 | if (enc->codec_id == CODEC_ID_MP3) { |
| 190 | if (!enc->frame_size) { | 190 | if (!enc->frame_size) { |
| 191 | av_log(s, AV_LOG_ERROR, "audio frame size not set\n"); | 191 | av_log(s, AV_LOG_ERROR, "audio frame size not set\n"); |
| @@ -464,7 +464,7 @@ static int swf_write_audio(AVFormatContext *s, · 272 unmodified lines | |||
| 464 | static int swf_write_packet(AVFormatContext *s, AVPacket *pkt) | 464 | static int swf_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 465 | { | 465 | { |
| 466 | AVCodecContext *codec = s->streams[pkt->stream_index]->codec; | 466 | AVCodecContext *codec = s->streams[pkt->stream_index]->codec; |
| 467 | if (codec->codec_type == CODEC_TYPE_AUDIO) | 467 | if (codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 468 | return swf_write_audio(s, codec, pkt->data, pkt->size); | 468 | return swf_write_audio(s, codec, pkt->data, pkt->size); |
| 469 | else | 469 | else |
| 470 | return swf_write_video(s, codec, pkt->data, pkt->size); | 470 | return swf_write_video(s, codec, pkt->data, pkt->size); |
| @@ -480,7 +480,7 @@ static int swf_write_trailer(AVFormatContext *s) · 9 unmodified lines | |||
| 480 | video_enc = NULL; | 480 | video_enc = NULL; |
| 481 | for(i=0;i<s->nb_streams;i++) { | 481 | for(i=0;i<s->nb_streams;i++) { |
| 482 | enc = s->streams[i]->codec; | 482 | enc = s->streams[i]->codec; |
| 483 | if (enc->codec_type == CODEC_TYPE_VIDEO) | 483 | if (enc->codec_type == AVMEDIA_TYPE_VIDEO) |
| 484 | video_enc = enc; | 484 | video_enc = enc; |
| 485 | else | 485 | else |
| 486 | av_fifo_free(swf->audio_fifo); | 486 | av_fifo_free(swf->audio_fifo); |
| @@ -100,7 +100,7 @@ static int thp_read_header(AVFormatContext *s, · 99 unmodified lines | |||
| 100 | /* The denominator and numerator are switched because 1/fps | 100 | /* The denominator and numerator are switched because 1/fps |
| 101 | is required. */ | 101 | is required. */ |
| 102 | av_set_pts_info(st, 64, thp->fps.den, thp->fps.num); | 102 | av_set_pts_info(st, 64, thp->fps.den, thp->fps.num); |
| 103 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 103 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 104 | st->codec->codec_id = CODEC_ID_THP; | 104 | st->codec->codec_id = CODEC_ID_THP; |
| 105 | st->codec->codec_tag = 0; /* no fourcc */ | 105 | st->codec->codec_tag = 0; /* no fourcc */ |
| 106 | st->codec->width = get_be32(pb); | 106 | st->codec->width = get_be32(pb); |
| @@ -120,7 +120,7 @@ static int thp_read_header(AVFormatContext *s, · 13 unmodified lines | |||
| 120 | if (!st) | 120 | if (!st) |
| 121 | return AVERROR(ENOMEM); | 121 | return AVERROR(ENOMEM); |
| 122 | 122 | ||
| 123 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 123 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 124 | st->codec->codec_id = CODEC_ID_ADPCM_THP; | 124 | st->codec->codec_id = CODEC_ID_ADPCM_THP; |
| 125 | st->codec->codec_tag = 0; /* no fourcc */ | 125 | st->codec->codec_tag = 0; /* no fourcc */ |
| 126 | st->codec->channels = get_be32(pb); /* numChannels. */ | 126 | st->codec->channels = get_be32(pb); /* numChannels. */ |
| @@ -212,7 +212,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) · 211 unmodified lines | |||
| 212 | 212 | ||
| 213 | av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); | 213 | av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); |
| 214 | seq->video_stream_index = st->index; | 214 | seq->video_stream_index = st->index; |
| 215 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 215 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 216 | st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO; | 216 | st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO; |
| 217 | st->codec->codec_tag = 0; /* no fourcc */ | 217 | st->codec->codec_tag = 0; /* no fourcc */ |
| 218 | st->codec->width = SEQ_FRAME_W; | 218 | st->codec->width = SEQ_FRAME_W; |
| @@ -225,7 +225,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines | |||
| 225 | 225 | ||
| 226 | av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); | 226 | av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); |
| 227 | seq->audio_stream_index = st->index; | 227 | seq->audio_stream_index = st->index; |
| 228 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 228 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 229 | st->codec->codec_id = CODEC_ID_PCM_S16BE; | 229 | st->codec->codec_id = CODEC_ID_PCM_S16BE; |
| 230 | st->codec->codec_tag = 0; /* no tag */ | 230 | st->codec->codec_tag = 0; /* no tag */ |
| 231 | st->codec->channels = 1; | 231 | st->codec->channels = 1; |
| @@ -109,7 +109,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 108 unmodified lines | |||
| 109 | return -1; | 109 | return -1; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | ast->codec->codec_type = CODEC_TYPE_AUDIO; | 112 | ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 113 | ast->codec->codec_id = CODEC_ID_PCM_U8; | 113 | ast->codec->codec_id = CODEC_ID_PCM_U8; |
| 114 | ast->codec->channels = features & TMV_STEREO ? 2 : 1; | 114 | ast->codec->channels = features & TMV_STEREO ? 2 : 1; |
| 115 | ast->codec->bits_per_coded_sample = 8; | 115 | ast->codec->bits_per_coded_sample = 8; |
| @@ -121,7 +121,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines | |||
| 121 | fps.den = tmv->audio_chunk_size; | 121 | fps.den = tmv->audio_chunk_size; |
| 122 | av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL); | 122 | av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL); |
| 123 | 123 | ||
| 124 | vst->codec->codec_type = CODEC_TYPE_VIDEO; | 124 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 125 | vst->codec->codec_id = CODEC_ID_TMV; | 125 | vst->codec->codec_id = CODEC_ID_TMV; |
| 126 | vst->codec->pix_fmt = PIX_FMT_PAL8; | 126 | vst->codec->pix_fmt = PIX_FMT_PAL8; |
| 127 | vst->codec->width = char_cols * 8; | 127 | vst->codec->width = char_cols * 8; |
| @@ -101,7 +101,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) · 100 unmodified lines | |||
| 101 | } | 101 | } |
| 102 | url_fskip(s->pb, 4); // seektable crc | 102 | url_fskip(s->pb, 4); // seektable crc |
| 103 | 103 | ||
| 104 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 104 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 105 | st->codec->codec_id = CODEC_ID_TTA; | 105 | st->codec->codec_id = CODEC_ID_TTA; |
| 106 | st->codec->channels = channels; | 106 | st->codec->channels = channels; |
| 107 | st->codec->sample_rate = samplerate; | 107 | st->codec->sample_rate = samplerate; |
| @@ -43,7 +43,7 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 42 unmodified lines | |||
| 43 | st = av_new_stream(s, 0); | 43 | st = av_new_stream(s, 0); |
| 44 | if (!st) | 44 | if (!st) |
| 45 | return AVERROR(ENOMEM); | 45 | return AVERROR(ENOMEM); |
| 46 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 46 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 47 | st->codec->codec_id = CODEC_ID_TXD; | 47 | st->codec->codec_id = CODEC_ID_TXD; |
| 48 | st->codec->time_base.den = 5; | 48 | st->codec->time_base.den = 5; |
| 49 | st->codec->time_base.num = 1; | 49 | st->codec->time_base.num = 1; |
| @@ -254,8 +254,8 @@ AVOutputFormat *guess_stream_format(const char *short_name, const char *filename · 253 unmodified lines | |||
| 254 | #endif | 254 | #endif |
| 255 | 255 | ||
| 256 | enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, | 256 | enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, |
| 257 | const char *filename, const char *mime_type, enum CodecType type){ | 257 | const char *filename, const char *mime_type, enum AVMediaType type){ |
| 258 | if(type == CODEC_TYPE_VIDEO){ | 258 | if(type == AVMEDIA_TYPE_VIDEO){ |
| 259 | enum CodecID codec_id= CODEC_ID_NONE; | 259 | enum CodecID codec_id= CODEC_ID_NONE; |
| 260 | 260 | ||
| 261 | #if CONFIG_IMAGE2_MUXER | 261 | #if CONFIG_IMAGE2_MUXER |
| @@ -266,7 +266,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, · 4 unmodified lines | |||
| 266 | if(codec_id == CODEC_ID_NONE) | 266 | if(codec_id == CODEC_ID_NONE) |
| 267 | codec_id= fmt->video_codec; | 267 | codec_id= fmt->video_codec; |
| 268 | return codec_id; | 268 | return codec_id; |
| 269 | }else if(type == CODEC_TYPE_AUDIO) | 269 | }else if(type == AVMEDIA_TYPE_AUDIO) |
| 270 | return fmt->audio_codec; | 270 | return fmt->audio_codec; |
| 271 | else | 271 | else |
| 272 | return CODEC_ID_NONE; | 272 | return CODEC_ID_NONE; |
| @@ -351,25 +351,25 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeDa · 78 unmodified lines | |||
| 351 | pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score); | 351 | pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score); |
| 352 | if (!strcmp(fmt->name, "mp3")) { | 352 | if (!strcmp(fmt->name, "mp3")) { |
| 353 | st->codec->codec_id = CODEC_ID_MP3; | 353 | st->codec->codec_id = CODEC_ID_MP3; |
| 354 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 354 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 355 | } else if (!strcmp(fmt->name, "ac3")) { | 355 | } else if (!strcmp(fmt->name, "ac3")) { |
| 356 | st->codec->codec_id = CODEC_ID_AC3; | 356 | st->codec->codec_id = CODEC_ID_AC3; |
| 357 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 357 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 358 | } else if (!strcmp(fmt->name, "eac3")) { | 358 | } else if (!strcmp(fmt->name, "eac3")) { |
| 359 | st->codec->codec_id = CODEC_ID_EAC3; | 359 | st->codec->codec_id = CODEC_ID_EAC3; |
| 360 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 360 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 361 | } else if (!strcmp(fmt->name, "mpegvideo")) { | 361 | } else if (!strcmp(fmt->name, "mpegvideo")) { |
| 362 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; | 362 | st->codec->codec_id = CODEC_ID_MPEG2VIDEO; |
| 363 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 363 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 364 | } else if (!strcmp(fmt->name, "m4v")) { | 364 | } else if (!strcmp(fmt->name, "m4v")) { |
| 365 | st->codec->codec_id = CODEC_ID_MPEG4; | 365 | st->codec->codec_id = CODEC_ID_MPEG4; |
| 366 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 366 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 367 | } else if (!strcmp(fmt->name, "h264")) { | 367 | } else if (!strcmp(fmt->name, "h264")) { |
| 368 | st->codec->codec_id = CODEC_ID_H264; | 368 | st->codec->codec_id = CODEC_ID_H264; |
| 369 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 369 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 370 | } else if (!strcmp(fmt->name, "dts")) { | 370 | } else if (!strcmp(fmt->name, "dts")) { |
| 371 | st->codec->codec_id = CODEC_ID_DTS; | 371 | st->codec->codec_id = CODEC_ID_DTS; |
| 372 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 372 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 373 | } | 373 | } |
| 374 | } | 374 | } |
| 375 | return !!fmt; | 375 | return !!fmt; |
| @@ -646,13 +646,13 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt) · 270 unmodified lines | |||
| 646 | st= s->streams[pkt->stream_index]; | 646 | st= s->streams[pkt->stream_index]; |
| 647 | 647 | ||
| 648 | switch(st->codec->codec_type){ | 648 | switch(st->codec->codec_type){ |
| 649 | case CODEC_TYPE_VIDEO: | 649 | case AVMEDIA_TYPE_VIDEO: |
| 650 | if(s->video_codec_id) st->codec->codec_id= s->video_codec_id; | 650 | if(s->video_codec_id) st->codec->codec_id= s->video_codec_id; |
| 651 | break; | 651 | break; |
| 652 | case CODEC_TYPE_AUDIO: | 652 | case AVMEDIA_TYPE_AUDIO: |
| 653 | if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id; | 653 | if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id; |
| 654 | break; | 654 | break; |
| 655 | case CODEC_TYPE_SUBTITLE: | 655 | case AVMEDIA_TYPE_SUBTITLE: |
| 656 | if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id; | 656 | if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id; |
| 657 | break; | 657 | break; |
| 658 | } | 658 | } |
| @@ -729,7 +729,7 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 70 unmodified lines | |||
| 729 | *pnum = 0; | 729 | *pnum = 0; |
| 730 | *pden = 0; | 730 | *pden = 0; |
| 731 | switch(st->codec->codec_type) { | 731 | switch(st->codec->codec_type) { |
| 732 | case CODEC_TYPE_VIDEO: | 732 | case AVMEDIA_TYPE_VIDEO: |
| 733 | if(st->time_base.num*1000LL > st->time_base.den){ | 733 | if(st->time_base.num*1000LL > st->time_base.den){ |
| 734 | *pnum = st->time_base.num; | 734 | *pnum = st->time_base.num; |
| 735 | *pden = st->time_base.den; | 735 | *pden = st->time_base.den; |
| @@ -741,7 +741,7 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 5 unmodified lines | |||
| 741 | } | 741 | } |
| 742 | } | 742 | } |
| 743 | break; | 743 | break; |
| 744 | case CODEC_TYPE_AUDIO: | 744 | case AVMEDIA_TYPE_AUDIO: |
| 745 | frame_size = get_audio_frame_size(st->codec, pkt->size); | 745 | frame_size = get_audio_frame_size(st->codec, pkt->size); |
| 746 | if (frame_size < 0) | 746 | if (frame_size < 0) |
| 747 | break; | 747 | break; |
| @@ -754,9 +754,9 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 6 unmodified lines | |||
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | static int is_intra_only(AVCodecContext *enc){ | 756 | static int is_intra_only(AVCodecContext *enc){ |
| 757 | if(enc->codec_type == CODEC_TYPE_AUDIO){ | 757 | if(enc->codec_type == AVMEDIA_TYPE_AUDIO){ |
| 758 | return 1; | 758 | return 1; |
| 759 | }else if(enc->codec_type == CODEC_TYPE_VIDEO){ | 759 | }else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 760 | switch(enc->codec_id){ | 760 | switch(enc->codec_id){ |
| 761 | case CODEC_ID_MJPEG: | 761 | case CODEC_ID_MJPEG: |
| 762 | case CODEC_ID_MJPEGB: | 762 | case CODEC_ID_MJPEGB: |
| @@ -1223,10 +1223,10 @@ int av_find_default_stream_index(AVFormatContext *s) · 460 unmodified lines | |||
| 1223 | return -1; | 1223 | return -1; |
| 1224 | for(i = 0; i < s->nb_streams; i++) { | 1224 | for(i = 0; i < s->nb_streams; i++) { |
| 1225 | st = s->streams[i]; | 1225 | st = s->streams[i]; |
| 1226 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 1226 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 1227 | return i; | 1227 | return i; |
| 1228 | } | 1228 | } |
| 1229 | if (first_audio_index < 0 && st->codec->codec_type == CODEC_TYPE_AUDIO) | 1229 | if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 1230 | first_audio_index = i; | 1230 | first_audio_index = i; |
| 1231 | } | 1231 | } |
| 1232 | return first_audio_index >= 0 ? first_audio_index : 0; | 1232 | return first_audio_index >= 0 ? first_audio_index : 0; |
| @@ -1953,7 +1953,7 @@ static int has_codec_parameters(AVCodecContext *enc) · 720 unmodified lines | |||
| 1953 | { | 1953 | { |
| 1954 | int val; | 1954 | int val; |
| 1955 | switch(enc->codec_type) { | 1955 | switch(enc->codec_type) { |
| 1956 | case CODEC_TYPE_AUDIO: | 1956 | case AVMEDIA_TYPE_AUDIO: |
| 1957 | val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE; | 1957 | val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE; |
| 1958 | if(!enc->frame_size && | 1958 | if(!enc->frame_size && |
| 1959 | (enc->codec_id == CODEC_ID_VORBIS || | 1959 | (enc->codec_id == CODEC_ID_VORBIS || |
| @@ -1964,7 +1964,7 @@ static int has_codec_parameters(AVCodecContext *enc) · 4 unmodified lines | |||
| 1964 | enc->codec_id == CODEC_ID_SPEEX)) | 1964 | enc->codec_id == CODEC_ID_SPEEX)) |
| 1965 | return 0; | 1965 | return 0; |
| 1966 | break; | 1966 | break; |
| 1967 | case CODEC_TYPE_VIDEO: | 1967 | case AVMEDIA_TYPE_VIDEO: |
| 1968 | val = enc->width && enc->pix_fmt != PIX_FMT_NONE; | 1968 | val = enc->width && enc->pix_fmt != PIX_FMT_NONE; |
| 1969 | break; | 1969 | break; |
| 1970 | default: | 1970 | default: |
| @@ -1992,12 +1992,12 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt) · 21 unmodified lines | |||
| 1992 | 1992 | ||
| 1993 | if(!has_codec_parameters(st->codec)){ | 1993 | if(!has_codec_parameters(st->codec)){ |
| 1994 | switch(st->codec->codec_type) { | 1994 | switch(st->codec->codec_type) { |
| 1995 | case CODEC_TYPE_VIDEO: | 1995 | case AVMEDIA_TYPE_VIDEO: |
| 1996 | avcodec_get_frame_defaults(&picture); | 1996 | avcodec_get_frame_defaults(&picture); |
| 1997 | ret = avcodec_decode_video2(st->codec, &picture, | 1997 | ret = avcodec_decode_video2(st->codec, &picture, |
| 1998 | &got_picture, avpkt); | 1998 | &got_picture, avpkt); |
| 1999 | break; | 1999 | break; |
| 2000 | case CODEC_TYPE_AUDIO: | 2000 | case AVMEDIA_TYPE_AUDIO: |
| 2001 | data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); | 2001 | data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); |
| 2002 | samples = av_malloc(data_size); | 2002 | samples = av_malloc(data_size); |
| 2003 | if (!samples) | 2003 | if (!samples) |
| @@ -2129,7 +2129,7 @@ int av_find_stream_info(AVFormatContext *ic) · 125 unmodified lines | |||
| 2129 | st->codec->frame_size = 0; | 2129 | st->codec->frame_size = 0; |
| 2130 | st->codec->channels = 0; | 2130 | st->codec->channels = 0; |
| 2131 | } | 2131 | } |
| 2132 | if(st->codec->codec_type == CODEC_TYPE_VIDEO){ | 2132 | if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 2133 | /* if(!st->time_base.num) | 2133 | /* if(!st->time_base.num) |
| 2134 | st->time_base= */ | 2134 | st->time_base= */ |
| 2135 | if(!st->codec->time_base.num) | 2135 | if(!st->codec->time_base.num) |
| @@ -2171,7 +2171,7 @@ int av_find_stream_info(AVFormatContext *ic) · 35 unmodified lines | |||
| 2171 | break; | 2171 | break; |
| 2172 | /* variable fps and no guess at the real fps */ | 2172 | /* variable fps and no guess at the real fps */ |
| 2173 | if( tb_unreliable(st->codec) && !(st->r_frame_rate.num && st->avg_frame_rate.num) | 2173 | if( tb_unreliable(st->codec) && !(st->r_frame_rate.num && st->avg_frame_rate.num) |
| 2174 | && duration_count[i]<20 && st->codec->codec_type == CODEC_TYPE_VIDEO) | 2174 | && duration_count[i]<20 && st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 2175 | break; | 2175 | break; |
| 2176 | if(st->parser && st->parser->parser->split && !st->codec->extradata) | 2176 | if(st->parser && st->parser->parser->split && !st->codec->extradata) |
| 2177 | break; | 2177 | break; |
| @@ -2243,7 +2243,7 @@ int av_find_stream_info(AVFormatContext *ic) · 65 unmodified lines | |||
| 2243 | if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){ | 2243 | if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){ |
| 2244 | double dur= duration * av_q2d(st->time_base); | 2244 | double dur= duration * av_q2d(st->time_base); |
| 2245 | 2245 | ||
| 2246 | // if(st->codec->codec_type == CODEC_TYPE_VIDEO) | 2246 | // if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 2247 | // av_log(NULL, AV_LOG_ERROR, "%f\n", dur); | 2247 | // av_log(NULL, AV_LOG_ERROR, "%f\n", dur); |
| 2248 | if(duration_count[index] < 2) | 2248 | if(duration_count[index] < 2) |
| 2249 | memset(duration_error[index], 0, sizeof(*duration_error)); | 2249 | memset(duration_error[index], 0, sizeof(*duration_error)); |
| @@ -2293,7 +2293,7 @@ int av_find_stream_info(AVFormatContext *ic) · 43 unmodified lines | |||
| 2293 | av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, | 2293 | av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, |
| 2294 | (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, | 2294 | (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, |
| 2295 | codec_info_duration[i] *(int64_t)st->time_base.num, 60000); | 2295 | codec_info_duration[i] *(int64_t)st->time_base.num, 60000); |
| 2296 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 2296 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 2297 | if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample) | 2297 | if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample) |
| 2298 | st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); | 2298 | st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); |
| 2299 | 2299 | ||
| @@ -2312,7 +2312,7 @@ int av_find_stream_info(AVFormatContext *ic) · 12 unmodified lines | |||
| 2312 | 2312 | ||
| 2313 | for(j=1; j<MAX_STD_TIMEBASES; j++){ | 2313 | for(j=1; j<MAX_STD_TIMEBASES; j++){ |
| 2314 | double error= duration_error[i][j] * get_std_framerate(j); | 2314 | double error= duration_error[i][j] * get_std_framerate(j); |
| 2315 | // if(st->codec->codec_type == CODEC_TYPE_VIDEO) | 2315 | // if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 2316 | // av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) / 12.0/1001, error); | 2316 | // av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) / 12.0/1001, error); |
| 2317 | if(error < best_error){ | 2317 | if(error < best_error){ |
| 2318 | best_error= error; | 2318 | best_error= error; |
| @@ -2334,7 +2334,7 @@ int av_find_stream_info(AVFormatContext *ic) · 15 unmodified lines | |||
| 2334 | st->r_frame_rate.den = st->time_base.num; | 2334 | st->r_frame_rate.den = st->time_base.num; |
| 2335 | } | 2335 | } |
| 2336 | } | 2336 | } |
| 2337 | }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) { | 2337 | }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 2338 | if(!st->codec->bits_per_coded_sample) | 2338 | if(!st->codec->bits_per_coded_sample) |
| 2339 | st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id); | 2339 | st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id); |
| 2340 | } | 2340 | } |
| @@ -2348,7 +2348,7 @@ int av_find_stream_info(AVFormatContext *ic) · 7 unmodified lines | |||
| 2348 | /* correct DTS for B-frame streams with no timestamps */ | 2348 | /* correct DTS for B-frame streams with no timestamps */ |
| 2349 | for(i=0;i<ic->nb_streams;i++) { | 2349 | for(i=0;i<ic->nb_streams;i++) { |
| 2350 | st = ic->streams[i]; | 2350 | st = ic->streams[i]; |
| 2351 | if (st->codec->codec_type == CODEC_TYPE_VIDEO) { | 2351 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 2352 | if(b-frames){ | 2352 | if(b-frames){ |
| 2353 | ppktl = &ic->packet_buffer; | 2353 | ppktl = &ic->packet_buffer; |
| 2354 | while(ppkt1){ | 2354 | while(ppkt1){ |
| @@ -2581,7 +2581,7 @@ int av_write_header(AVFormatContext *s) · 226 unmodified lines | |||
| 2581 | st = s->streams[i]; | 2581 | st = s->streams[i]; |
| 2582 | 2582 | ||
| 2583 | switch (st->codec->codec_type) { | 2583 | switch (st->codec->codec_type) { |
| 2584 | case CODEC_TYPE_AUDIO: | 2584 | case AVMEDIA_TYPE_AUDIO: |
| 2585 | if(st->codec->sample_rate<=0){ | 2585 | if(st->codec->sample_rate<=0){ |
| 2586 | av_log(s, AV_LOG_ERROR, "sample rate not set\n"); | 2586 | av_log(s, AV_LOG_ERROR, "sample rate not set\n"); |
| 2587 | return -1; | 2587 | return -1; |
| @@ -2590,7 +2590,7 @@ int av_write_header(AVFormatContext *s) · 2 unmodified lines | |||
| 2590 | st->codec->block_align = st->codec->channels * | 2590 | st->codec->block_align = st->codec->channels * |
| 2591 | av_get_bits_per_sample(st->codec->codec_id) >> 3; | 2591 | av_get_bits_per_sample(st->codec->codec_id) >> 3; |
| 2592 | break; | 2592 | break; |
| 2593 | case CODEC_TYPE_VIDEO: | 2593 | case AVMEDIA_TYPE_VIDEO: |
| 2594 | if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too? | 2594 | if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too? |
| 2595 | av_log(s, AV_LOG_ERROR, "time base not set\n"); | 2595 | av_log(s, AV_LOG_ERROR, "time base not set\n"); |
| 2596 | return -1; | 2596 | return -1; |
| @@ -2658,10 +2658,10 @@ int av_write_header(AVFormatContext *s) · 61 unmodified lines | |||
| 2658 | st = s->streams[i]; | 2658 | st = s->streams[i]; |
| 2659 | 2659 | ||
| 2660 | switch (st->codec->codec_type) { | 2660 | switch (st->codec->codec_type) { |
| 2661 | case CODEC_TYPE_AUDIO: | 2661 | case AVMEDIA_TYPE_AUDIO: |
| 2662 | den = (int64_t)st->time_base.num * st->codec->sample_rate; | 2662 | den = (int64_t)st->time_base.num * st->codec->sample_rate; |
| 2663 | break; | 2663 | break; |
| 2664 | case CODEC_TYPE_VIDEO: | 2664 | case AVMEDIA_TYPE_VIDEO: |
| 2665 | den = (int64_t)st->time_base.num * st->codec->time_base.den; | 2665 | den = (int64_t)st->time_base.num * st->codec->time_base.den; |
| 2666 | break; | 2666 | break; |
| 2667 | default: | 2667 | default: |
| @@ -2732,7 +2732,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ · 64 unmodified lines | |||
| 2732 | 2732 | ||
| 2733 | /* update pts */ | 2733 | /* update pts */ |
| 2734 | switch (st->codec->codec_type) { | 2734 | switch (st->codec->codec_type) { |
| 2735 | case CODEC_TYPE_AUDIO: | 2735 | case AVMEDIA_TYPE_AUDIO: |
| 2736 | frame_size = get_audio_frame_size(st->codec, pkt->size); | 2736 | frame_size = get_audio_frame_size(st->codec, pkt->size); |
| 2737 | 2737 | ||
| 2738 | /* HACK/FIXME, we skip the initial 0 size packets as they are most | 2738 | /* HACK/FIXME, we skip the initial 0 size packets as they are most |
| @@ -2742,7 +2742,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ · 3 unmodified lines | |||
| 2742 | av_frac_add(&st->pts, (int64_t)st->time_base.den * frame_size); | 2742 | av_frac_add(&st->pts, (int64_t)st->time_base.den * frame_size); |
| 2743 | } | 2743 | } |
| 2744 | break; | 2744 | break; |
| 2745 | case CODEC_TYPE_VIDEO: | 2745 | case AVMEDIA_TYPE_VIDEO: |
| 2746 | av_frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num); | 2746 | av_frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num); |
| 2747 | break; | 2747 | break; |
| 2748 | default: | 2748 | default: |
| @@ -2859,7 +2859,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ · 110 unmodified lines | |||
| 2859 | AVStream *st= s->streams[ pkt->stream_index]; | 2859 | AVStream *st= s->streams[ pkt->stream_index]; |
| 2860 | 2860 | ||
| 2861 | //FIXME/XXX/HACK drop zero sized packets | 2861 | //FIXME/XXX/HACK drop zero sized packets |
| 2862 | if(st->codec->codec_type == CODEC_TYPE_AUDIO && pkt->size==0) | 2862 | if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && pkt->size==0) |
| 2863 | return 0; | 2863 | return 0; |
| 2864 | 2864 | ||
| 2865 | //av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %"PRId64" %"PRId64"\n", pkt->size, pkt->dts, pkt->pts); | 2865 | //av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %"PRId64" %"PRId64"\n", pkt->size, pkt->dts, pkt->pts); |
| @@ -2999,7 +2999,7 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out · 133 unmodified lines | |||
| 2999 | st->sample_aspect_ratio.num, st->sample_aspect_ratio.den, | 2999 | st->sample_aspect_ratio.num, st->sample_aspect_ratio.den, |
| 3000 | display_aspect_ratio.num, display_aspect_ratio.den); | 3000 | display_aspect_ratio.num, display_aspect_ratio.den); |
| 3001 | } | 3001 | } |
| 3002 | if(st->codec->codec_type == CODEC_TYPE_VIDEO){ | 3002 | if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ |
| 3003 | if(st->avg_frame_rate.den && st->avg_frame_rate.num) | 3003 | if(st->avg_frame_rate.den && st->avg_frame_rate.num) |
| 3004 | print_fps(av_q2d(st->avg_frame_rate), "fps"); | 3004 | print_fps(av_q2d(st->avg_frame_rate), "fps"); |
| 3005 | if(st->r_frame_rate.den && st->r_frame_rate.num) | 3005 | if(st->r_frame_rate.den && st->r_frame_rate.num) |
| @@ -58,7 +58,7 @@ static int vc1t_read_header(AVFormatContext *s, · 57 unmodified lines | |||
| 58 | if (!st) | 58 | if (!st) |
| 59 | return -1; | 59 | return -1; |
| 60 | 60 | ||
| 61 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 61 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 62 | st->codec->codec_id = CODEC_ID_WMV3; | 62 | st->codec->codec_id = CODEC_ID_WMV3; |
| 63 | 63 | ||
| 64 | st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE); | 64 | st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE); |
| @@ -54,7 +54,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 53 unmodified lines | |||
| 54 | st = av_new_stream(s, 0); | 54 | st = av_new_stream(s, 0); |
| 55 | if (!st) | 55 | if (!st) |
| 56 | return AVERROR(ENOMEM); | 56 | return AVERROR(ENOMEM); |
| 57 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 57 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 58 | 58 | ||
| 59 | voc->remaining_size = 0; | 59 | voc->remaining_size = 0; |
| 60 | return 0; | 60 | return 0; |
| @@ -33,7 +33,7 @@ static int voc_write_header(AVFormatContext *s) · 32 unmodified lines | |||
| 33 | const int version = 0x0114; | 33 | const int version = 0x0114; |
| 34 | 34 | ||
| 35 | if (s->nb_streams != 1 | 35 | if (s->nb_streams != 1 |
| 36 | || s->streams[0]->codec->codec_type != CODEC_TYPE_AUDIO) | 36 | || s->streams[0]->codec->codec_type != AVMEDIA_TYPE_AUDIO) |
| 37 | return AVERROR_PATCHWELCOME; | 37 | return AVERROR_PATCHWELCOME; |
| 38 | 38 | ||
| 39 | put_buffer(pb, ff_voc_magic, sizeof(ff_voc_magic) - 1); | 39 | put_buffer(pb, ff_voc_magic, sizeof(ff_voc_magic) - 1); |
| @@ -76,7 +76,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 75 unmodified lines | |||
| 76 | 76 | ||
| 77 | header_size = get_be32(s->pb); | 77 | header_size = get_be32(s->pb); |
| 78 | 78 | ||
| 79 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 79 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 80 | st->codec->codec_id = CODEC_ID_TWINVQ; | 80 | st->codec->codec_id = CODEC_ID_TWINVQ; |
| 81 | st->start_time = 0; | 81 | st->start_time = 0; |
| 82 | 82 | ||
| @@ -243,7 +243,7 @@ static int wc3_read_header(AVFormatContext *s, · 242 unmodified lines | |||
| 243 | return AVERROR(ENOMEM); | 243 | return AVERROR(ENOMEM); |
| 244 | av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); | 244 | av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
| 245 | wc3->video_stream_index = st->index; | 245 | wc3->video_stream_index = st->index; |
| 246 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 246 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 247 | st->codec->codec_id = CODEC_ID_XAN_WC3; | 247 | st->codec->codec_id = CODEC_ID_XAN_WC3; |
| 248 | st->codec->codec_tag = 0; /* no fourcc */ | 248 | st->codec->codec_tag = 0; /* no fourcc */ |
| 249 | st->codec->width = wc3->width; | 249 | st->codec->width = wc3->width; |
| @@ -257,7 +257,7 @@ static int wc3_read_header(AVFormatContext *s, · 7 unmodified lines | |||
| 257 | return AVERROR(ENOMEM); | 257 | return AVERROR(ENOMEM); |
| 258 | av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); | 258 | av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
| 259 | wc3->audio_stream_index = st->index; | 259 | wc3->audio_stream_index = st->index; |
| 260 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 260 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 261 | st->codec->codec_id = CODEC_ID_PCM_S16LE; | 261 | st->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 262 | st->codec->codec_tag = 1; | 262 | st->codec->codec_tag = 1; |
| 263 | st->codec->channels = WC3_AUDIO_CHANNELS; | 263 | st->codec->channels = WC3_AUDIO_CHANNELS; |
| @@ -148,7 +148,7 @@ static int wsaud_read_header(AVFormatContext *s, · 147 unmodified lines | |||
| 148 | if (!st) | 148 | if (!st) |
| 149 | return AVERROR(ENOMEM); | 149 | return AVERROR(ENOMEM); |
| 150 | av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); | 150 | av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); |
| 151 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 151 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 152 | st->codec->codec_id = wsaud->audio_type; | 152 | st->codec->codec_id = wsaud->audio_type; |
| 153 | st->codec->codec_tag = 0; /* no tag */ | 153 | st->codec->codec_tag = 0; /* no tag */ |
| 154 | st->codec->channels = wsaud->audio_channels; | 154 | st->codec->channels = wsaud->audio_channels; |
| @@ -226,7 +226,7 @@ static int wsvqa_read_header(AVFormatContext *s, · 71 unmodified lines | |||
| 226 | return AVERROR(ENOMEM); | 226 | return AVERROR(ENOMEM); |
| 227 | av_set_pts_info(st, 33, 1, VQA_FRAMERATE); | 227 | av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
| 228 | wsvqa->video_stream_index = st->index; | 228 | wsvqa->video_stream_index = st->index; |
| 229 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 229 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 230 | st->codec->codec_id = CODEC_ID_WS_VQA; | 230 | st->codec->codec_id = CODEC_ID_WS_VQA; |
| 231 | st->codec->codec_tag = 0; /* no fourcc */ | 231 | st->codec->codec_tag = 0; /* no fourcc */ |
| 232 | 232 | ||
| @@ -251,7 +251,7 @@ static int wsvqa_read_header(AVFormatContext *s, · 18 unmodified lines | |||
| 251 | if (!st) | 251 | if (!st) |
| 252 | return AVERROR(ENOMEM); | 252 | return AVERROR(ENOMEM); |
| 253 | av_set_pts_info(st, 33, 1, VQA_FRAMERATE); | 253 | av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
| 254 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 254 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 255 | if (AV_RL16(&header[0]) == 1) | 255 | if (AV_RL16(&header[0]) == 1) |
| 256 | st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; | 256 | st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; |
| 257 | else | 257 | else |
| @@ -162,7 +162,7 @@ static int wv_read_header(AVFormatContext *s, · 161 unmodified lines | |||
| 162 | st = av_new_stream(s, 0); | 162 | st = av_new_stream(s, 0); |
| 163 | if (!st) | 163 | if (!st) |
| 164 | return -1; | 164 | return -1; |
| 165 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 165 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 166 | st->codec->codec_id = CODEC_ID_WAVPACK; | 166 | st->codec->codec_id = CODEC_ID_WAVPACK; |
| 167 | st->codec->channels = wc->chan; | 167 | st->codec->channels = wc->chan; |
| 168 | st->codec->sample_rate = wc->rate; | 168 | st->codec->sample_rate = wc->rate; |
| @@ -74,7 +74,7 @@ static int xa_read_header(AVFormatContext *s, · 73 unmodified lines | |||
| 74 | if (!st) | 74 | if (!st) |
| 75 | return AVERROR(ENOMEM); | 75 | return AVERROR(ENOMEM); |
| 76 | 76 | ||
| 77 | st->codec->codec_type = CODEC_TYPE_AUDIO; | 77 | st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 78 | st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA; | 78 | st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA; |
| 79 | url_fskip(pb, 4); /* Skip the XA ID */ | 79 | url_fskip(pb, 4); /* Skip the XA ID */ |
| 80 | xa->out_size = get_le32(pb); | 80 | xa->out_size = get_le32(pb); |
| @@ -71,14 +71,14 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap) · 70 unmodified lines | |||
| 71 | 71 | ||
| 72 | // Audio | 72 | // Audio |
| 73 | audio_dec = audio_stream->codec; | 73 | audio_dec = audio_stream->codec; |
| 74 | audio_dec->codec_type = CODEC_TYPE_AUDIO; | 74 | audio_dec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 75 | audio_dec->codec_id = CODEC_ID_ADPCM_IMA_WS; | 75 | audio_dec->codec_id = CODEC_ID_ADPCM_IMA_WS; |
| 76 | audio_dec->channels = 1; | 76 | audio_dec->channels = 1; |
| 77 | audio_dec->sample_rate = 22050; | 77 | audio_dec->sample_rate = 22050; |
| 78 | 78 | ||
| 79 | // Video | 79 | // Video |
| 80 | video_dec = video_stream->codec; | 80 | video_dec = video_stream->codec; |
| 81 | video_dec->codec_type = CODEC_TYPE_VIDEO; | 81 | video_dec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 82 | video_dec->codec_id = CODEC_ID_YOP; | 82 | video_dec->codec_id = CODEC_ID_YOP; |
| 83 | 83 | ||
| 84 | url_fskip(pb, 6); | 84 | url_fskip(pb, 6); |
| @@ -335,7 +335,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) · 334 unmodified lines | |||
| 335 | av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1); | 335 | av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1); |
| 336 | av_set_pts_info(st, 64, rated, raten); | 336 | av_set_pts_info(st, 64, rated, raten); |
| 337 | st->codec->pix_fmt = pix_fmt; | 337 | st->codec->pix_fmt = pix_fmt; |
| 338 | st->codec->codec_type = CODEC_TYPE_VIDEO; | 338 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 339 | st->codec->codec_id = CODEC_ID_RAWVIDEO; | 339 | st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 340 | st->sample_aspect_ratio= (AVRational){aspectn, aspectd}; | 340 | st->sample_aspect_ratio= (AVRational){aspectn, aspectd}; |
| 341 | st->codec->chroma_sample_location = chroma_sample_location; | 341 | st->codec->chroma_sample_location = chroma_sample_location; |