History

Replace all CODEC_ID_* with AV_CODEC_ID_*

Anton Khirnov committed 14 years ago

Commit 36ef5361 parent 104e10f582 files · +3512 −3512Browse files

Showing the changes to avserver.c (1 of 582 files). Show all

Unified · Split

avserver.c+18−18
@@ -3539,7 +3539,7 @@ static void extract_mpeg4_header(AVFormatContext *infile) · 3538 unmodified lines
35393539 mpeg4_count = 0;
35403540 for(i=0;i<infile->nb_streams;i++) {
35413541 st = infile->streams[i];
3542− if (st->codec->codec_id == CODEC_ID_MPEG4 &&
3542+ if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
35433543 st->codec->extradata_size == 0) {
35443544 mpeg4_count++;
35453545 }
@@ -3552,7 +3552,7 @@ static void extract_mpeg4_header(AVFormatContext *infile) · 6 unmodified lines
35523552 if (av_read_packet(infile, &pkt) < 0)
35533553 break;
35543554 st = infile->streams[pkt.stream_index];
3555− if (st->codec->codec_id == CODEC_ID_MPEG4 &&
3555+ if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
35563556 st->codec->extradata_size == 0) {
35573557 av_freep(&st->codec->extradata);
35583558 /* fill extradata with the header */
@@ -3866,22 +3866,22 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 307 unmodified lines
38663866 memcpy(st->codec, av, sizeof(AVCodecContext));
38673867 }
38683868
3869−static enum CodecID opt_audio_codec(const char *arg)
3869+static enum AVCodecID opt_audio_codec(const char *arg)
38703870 {
38713871 AVCodec *p= avcodec_find_encoder_by_name(arg);
38723872
38733873 if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
3874− return CODEC_ID_NONE;
3874+ return AV_CODEC_ID_NONE;
38753875
38763876 return p->id;
38773877 }
38783878
3879−static enum CodecID opt_video_codec(const char *arg)
3879+static enum AVCodecID opt_video_codec(const char *arg)
38803880 {
38813881 AVCodec *p= avcodec_find_encoder_by_name(arg);
38823882
38833883 if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
3884− return CODEC_ID_NONE;
3884+ return AV_CODEC_ID_NONE;
38853885
38863886 return p->id;
38873887 }
@@ -3924,7 +3924,7 @@ static int avserver_opt_default(const char *opt, const char *arg, · 36 unmodified lines
39243924
39253925 static int avserver_opt_preset(const char *arg,
39263926 AVCodecContext *avctx, int type,
3927− enum CodecID *audio_id, enum CodecID *video_id)
3927+ enum AVCodecID *audio_id, enum AVCodecID *video_id)
39283928 {
39293929 FILE *f=NULL;
39303930 char filename[1000], tmp[1000], tmp2[1000], line[1000];
@@ -4006,7 +4006,7 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
40064006 FFStream **last_stream, *stream, *redirect;
40074007 FFStream **last_feed, *feed, *s;
40084008 AVCodecContext audio_enc, video_enc;
4009− enum CodecID audio_id, video_id;
4009+ enum AVCodecID audio_id, video_id;
40104010
40114011 f = fopen(filename, "r");
40124012 if (!f) {
@@ -4023,8 +4023,8 @@ static int parse_ffconfig(const char *filename) · 10 unmodified lines
40234023 stream = NULL;
40244024 feed = NULL;
40254025 redirect = NULL;
4026− audio_id = CODEC_ID_NONE;
4027− video_id = CODEC_ID_NONE;
4026+ audio_id = AV_CODEC_ID_NONE;
4027+ video_id = AV_CODEC_ID_NONE;
40284028
40294029 #define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)
40304030 for(;;) {
@@ -4216,8 +4216,8 @@ static int parse_ffconfig(const char *filename) · 185 unmodified lines
42164216 stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);
42174217 avcodec_get_context_defaults3(&video_enc, NULL);
42184218 avcodec_get_context_defaults3(&audio_enc, NULL);
4219− audio_id = CODEC_ID_NONE;
4220− video_id = CODEC_ID_NONE;
4219+ audio_id = AV_CODEC_ID_NONE;
4220+ video_id = AV_CODEC_ID_NONE;
42214221 if (stream->fmt) {
42224222 audio_id = stream->fmt->audio_codec;
42234223 video_id = stream->fmt->video_codec;
@@ -4299,13 +4299,13 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
42994299 } else if (!av_strcasecmp(cmd, "AudioCodec")) {
43004300 get_arg(arg, sizeof(arg), &p);
43014301 audio_id = opt_audio_codec(arg);
4302− if (audio_id == CODEC_ID_NONE) {
4302+ if (audio_id == AV_CODEC_ID_NONE) {
43034303 ERROR("Unknown AudioCodec: %s\n", arg);
43044304 }
43054305 } else if (!av_strcasecmp(cmd, "VideoCodec")) {
43064306 get_arg(arg, sizeof(arg), &p);
43074307 video_id = opt_video_codec(arg);
4308− if (video_id == CODEC_ID_NONE) {
4308+ if (video_id == AV_CODEC_ID_NONE) {
43094309 ERROR("Unknown VideoCodec: %s\n", arg);
43104310 }
43114311 } else if (!av_strcasecmp(cmd, "MaxTime")) {
@@ -4496,9 +4496,9 @@ static int parse_ffconfig(const char *filename) · 184 unmodified lines
44964496 if (stream)
44974497 video_enc.dark_masking = atof(arg);
44984498 } else if (!av_strcasecmp(cmd, "NoVideo")) {
4499− video_id = CODEC_ID_NONE;
4499+ video_id = AV_CODEC_ID_NONE;
45004500 } else if (!av_strcasecmp(cmd, "NoAudio")) {
4501− audio_id = CODEC_ID_NONE;
4501+ audio_id = AV_CODEC_ID_NONE;
45024502 } else if (!av_strcasecmp(cmd, "ACL")) {
45034503 parse_acl_row(stream, feed, NULL, p, filename, line_num);
45044504 } else if (!av_strcasecmp(cmd, "DynamicACL")) {
@@ -4536,12 +4536,12 @@ static int parse_ffconfig(const char *filename) · 31 unmodified lines
45364536 ERROR("No corresponding <Stream> for </Stream>\n");
45374537 } else {
45384538 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
4539− if (audio_id != CODEC_ID_NONE) {
4539+ if (audio_id != AV_CODEC_ID_NONE) {
45404540 audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
45414541 audio_enc.codec_id = audio_id;
45424542 add_codec(stream, &audio_enc);
45434543 }
4544− if (video_id != CODEC_ID_NONE) {
4544+ if (video_id != AV_CODEC_ID_NONE) {
45454545 video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
45464546 video_enc.codec_id = video_id;
45474547 add_codec(stream, &video_enc);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

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

Repository code

Go to file
t