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
3539 mpeg4_count = 0;3539 mpeg4_count = 0;
3540 for(i=0;i<infile->nb_streams;i++) {3540 for(i=0;i<infile->nb_streams;i++) {
3541 st = infile->streams[i];3541 st = infile->streams[i];
3542 if (st->codec->codec_id == CODEC_ID_MPEG4 &&3542 if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
3543 st->codec->extradata_size == 0) {3543 st->codec->extradata_size == 0) {
3544 mpeg4_count++;3544 mpeg4_count++;
3545 }3545 }
@@ -3552,7 +3552,7 @@ static void extract_mpeg4_header(AVFormatContext *infile) · 6 unmodified lines
3552 if (av_read_packet(infile, &pkt) < 0)3552 if (av_read_packet(infile, &pkt) < 0)
3553 break;3553 break;
3554 st = infile->streams[pkt.stream_index];3554 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 &&
3556 st->codec->extradata_size == 0) {3556 st->codec->extradata_size == 0) {
3557 av_freep(&st->codec->extradata);3557 av_freep(&st->codec->extradata);
3558 /* fill extradata with the header */3558 /* fill extradata with the header */
@@ -3866,22 +3866,22 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 307 unmodified lines
3866 memcpy(st->codec, av, sizeof(AVCodecContext));3866 memcpy(st->codec, av, sizeof(AVCodecContext));
3867}3867}
3868 3868
3869static enum CodecID opt_audio_codec(const char *arg)3869static enum AVCodecID opt_audio_codec(const char *arg)
3870{3870{
3871 AVCodec *p= avcodec_find_encoder_by_name(arg);3871 AVCodec *p= avcodec_find_encoder_by_name(arg);
3872 3872
3873 if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)3873 if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
3874 return CODEC_ID_NONE;3874 return AV_CODEC_ID_NONE;
3875 3875
3876 return p->id;3876 return p->id;
3877}3877}
3878 3878
3879static enum CodecID opt_video_codec(const char *arg)3879static enum AVCodecID opt_video_codec(const char *arg)
3880{3880{
3881 AVCodec *p= avcodec_find_encoder_by_name(arg);3881 AVCodec *p= avcodec_find_encoder_by_name(arg);
3882 3882
3883 if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)3883 if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
3884 return CODEC_ID_NONE;3884 return AV_CODEC_ID_NONE;
3885 3885
3886 return p->id;3886 return p->id;
3887}3887}
@@ -3924,7 +3924,7 @@ static int avserver_opt_default(const char *opt, const char *arg, · 36 unmodified lines
3924 3924
3925static int avserver_opt_preset(const char *arg,3925static int avserver_opt_preset(const char *arg,
3926 AVCodecContext *avctx, int type,3926 AVCodecContext *avctx, int type,
3927 enum CodecID *audio_id, enum CodecID *video_id)3927 enum AVCodecID *audio_id, enum AVCodecID *video_id)
3928{3928{
3929 FILE *f=NULL;3929 FILE *f=NULL;
3930 char filename[1000], tmp[1000], tmp2[1000], line[1000];3930 char filename[1000], tmp[1000], tmp2[1000], line[1000];
@@ -4006,7 +4006,7 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
4006 FFStream **last_stream, *stream, *redirect;4006 FFStream **last_stream, *stream, *redirect;
4007 FFStream **last_feed, *feed, *s;4007 FFStream **last_feed, *feed, *s;
4008 AVCodecContext audio_enc, video_enc;4008 AVCodecContext audio_enc, video_enc;
4009 enum CodecID audio_id, video_id;4009 enum AVCodecID audio_id, video_id;
4010 4010
4011 f = fopen(filename, "r");4011 f = fopen(filename, "r");
4012 if (!f) {4012 if (!f) {
@@ -4023,8 +4023,8 @@ static int parse_ffconfig(const char *filename) · 10 unmodified lines
4023 stream = NULL;4023 stream = NULL;
4024 feed = NULL;4024 feed = NULL;
4025 redirect = NULL;4025 redirect = NULL;
4026 audio_id = CODEC_ID_NONE;4026 audio_id = AV_CODEC_ID_NONE;
4027 video_id = CODEC_ID_NONE;4027 video_id = AV_CODEC_ID_NONE;
4028 4028
4029#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)4029#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)
4030 for(;;) {4030 for(;;) {
@@ -4216,8 +4216,8 @@ static int parse_ffconfig(const char *filename) · 185 unmodified lines
4216 stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);4216 stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);
4217 avcodec_get_context_defaults3(&video_enc, NULL);4217 avcodec_get_context_defaults3(&video_enc, NULL);
4218 avcodec_get_context_defaults3(&audio_enc, NULL);4218 avcodec_get_context_defaults3(&audio_enc, NULL);
4219 audio_id = CODEC_ID_NONE;4219 audio_id = AV_CODEC_ID_NONE;
4220 video_id = CODEC_ID_NONE;4220 video_id = AV_CODEC_ID_NONE;
4221 if (stream->fmt) {4221 if (stream->fmt) {
4222 audio_id = stream->fmt->audio_codec;4222 audio_id = stream->fmt->audio_codec;
4223 video_id = stream->fmt->video_codec;4223 video_id = stream->fmt->video_codec;
@@ -4299,13 +4299,13 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
4299 } else if (!av_strcasecmp(cmd, "AudioCodec")) {4299 } else if (!av_strcasecmp(cmd, "AudioCodec")) {
4300 get_arg(arg, sizeof(arg), &p);4300 get_arg(arg, sizeof(arg), &p);
4301 audio_id = opt_audio_codec(arg);4301 audio_id = opt_audio_codec(arg);
4302 if (audio_id == CODEC_ID_NONE) {4302 if (audio_id == AV_CODEC_ID_NONE) {
4303 ERROR("Unknown AudioCodec: %s\n", arg);4303 ERROR("Unknown AudioCodec: %s\n", arg);
4304 }4304 }
4305 } else if (!av_strcasecmp(cmd, "VideoCodec")) {4305 } else if (!av_strcasecmp(cmd, "VideoCodec")) {
4306 get_arg(arg, sizeof(arg), &p);4306 get_arg(arg, sizeof(arg), &p);
4307 video_id = opt_video_codec(arg);4307 video_id = opt_video_codec(arg);
4308 if (video_id == CODEC_ID_NONE) {4308 if (video_id == AV_CODEC_ID_NONE) {
4309 ERROR("Unknown VideoCodec: %s\n", arg);4309 ERROR("Unknown VideoCodec: %s\n", arg);
4310 }4310 }
4311 } else if (!av_strcasecmp(cmd, "MaxTime")) {4311 } else if (!av_strcasecmp(cmd, "MaxTime")) {
@@ -4496,9 +4496,9 @@ static int parse_ffconfig(const char *filename) · 184 unmodified lines
4496 if (stream)4496 if (stream)
4497 video_enc.dark_masking = atof(arg);4497 video_enc.dark_masking = atof(arg);
4498 } else if (!av_strcasecmp(cmd, "NoVideo")) {4498 } else if (!av_strcasecmp(cmd, "NoVideo")) {
4499 video_id = CODEC_ID_NONE;4499 video_id = AV_CODEC_ID_NONE;
4500 } else if (!av_strcasecmp(cmd, "NoAudio")) {4500 } else if (!av_strcasecmp(cmd, "NoAudio")) {
4501 audio_id = CODEC_ID_NONE;4501 audio_id = AV_CODEC_ID_NONE;
4502 } else if (!av_strcasecmp(cmd, "ACL")) {4502 } else if (!av_strcasecmp(cmd, "ACL")) {
4503 parse_acl_row(stream, feed, NULL, p, filename, line_num);4503 parse_acl_row(stream, feed, NULL, p, filename, line_num);
4504 } else if (!av_strcasecmp(cmd, "DynamicACL")) {4504 } else if (!av_strcasecmp(cmd, "DynamicACL")) {
@@ -4536,12 +4536,12 @@ static int parse_ffconfig(const char *filename) · 31 unmodified lines
4536 ERROR("No corresponding <Stream> for </Stream>\n");4536 ERROR("No corresponding <Stream> for </Stream>\n");
4537 } else {4537 } else {
4538 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {4538 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) {
4540 audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;4540 audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
4541 audio_enc.codec_id = audio_id;4541 audio_enc.codec_id = audio_id;
4542 add_codec(stream, &audio_enc);4542 add_codec(stream, &audio_enc);
4543 }4543 }
4544 if (video_id != CODEC_ID_NONE) {4544 if (video_id != AV_CODEC_ID_NONE) {
4545 video_enc.codec_type = AVMEDIA_TYPE_VIDEO;4545 video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
4546 video_enc.codec_id = video_id;4546 video_enc.codec_id = video_id;
4547 add_codec(stream, &video_enc);4547 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