summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-05 11:11:04 +0200
committerAnton Khirnov <anton@khirnov.net>2012-08-07 16:00:24 +0200
commit36ef5369ee9b336febc2c270f8718cec4476cb85 (patch)
treed186adbb488e7f002aa894743b1ce0e8925520e6 /libavdevice
parent104e10fb426f903ba9157fdbfe30292d0e4c3d72 (diff)
downloadffmpeg-36ef5369ee9b336febc2c270f8718cec4476cb85.tar.gz
Replace all CODEC_ID_* with AV_CODEC_ID_*
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/alsa-audio-common.c72
-rw-r--r--libavdevice/alsa-audio-dec.c2
-rw-r--r--libavdevice/alsa-audio-enc.c4
-rw-r--r--libavdevice/alsa-audio.h10
-rw-r--r--libavdevice/bktr.c2
-rw-r--r--libavdevice/fbdev.c2
-rw-r--r--libavdevice/jack_audio.c4
-rw-r--r--libavdevice/libcdio.c4
-rw-r--r--libavdevice/libdc1394.c2
-rw-r--r--libavdevice/oss_audio.c10
-rw-r--r--libavdevice/pulse.c28
-rw-r--r--libavdevice/sndio_common.c2
-rw-r--r--libavdevice/sndio_common.h2
-rw-r--r--libavdevice/sndio_enc.c4
-rw-r--r--libavdevice/v4l2.c54
-rw-r--r--libavdevice/vfwcap.c12
-rw-r--r--libavdevice/x11grab.c2
17 files changed, 108 insertions, 108 deletions
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index cfee28c516..b48e007fb3 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -38,26 +38,26 @@
static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)
{
switch(codec_id) {
- case CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;
- case CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;
- case CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;
- case CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;
- case CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;
- case CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;
- case CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;
- case CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;
- case CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;
- case CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;
- case CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;
- case CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;
- case CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;
- case CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;
- case CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;
- case CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;
- case CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;
- case CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;
- case CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;
- case CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;
+ case AV_CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;
+ case AV_CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;
+ case AV_CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;
+ case AV_CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;
+ case AV_CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;
+ case AV_CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;
+ case AV_CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;
+ case AV_CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;
+ case AV_CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;
+ case AV_CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;
+ case AV_CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;
+ case AV_CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;
+ case AV_CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;
+ case AV_CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;
+ case AV_CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;
+ case AV_CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;
+ case AV_CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;
+ case AV_CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;
+ case AV_CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;
+ case AV_CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;
default: return SND_PCM_FORMAT_UNKNOWN;
}
}
@@ -156,20 +156,20 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout,
return 0;
switch (codec_id) {
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_U8:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_U16LE:
- case CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_U32LE:
- case CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_U32LE:
+ case AV_CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;
default: return AVERROR(ENOSYS);
}
@@ -185,7 +185,7 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout,
av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
unsigned int *sample_rate,
- int channels, enum CodecID *codec_id)
+ int channels, enum AVCodecID *codec_id)
{
AlsaData *s = ctx->priv_data;
const char *audio_device;
@@ -199,7 +199,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
if (ctx->filename[0] == 0) audio_device = "default";
else audio_device = ctx->filename;
- if (*codec_id == CODEC_ID_NONE)
+ if (*codec_id == AV_CODEC_ID_NONE)
*codec_id = DEFAULT_CODEC_ID;
format = codec_id_to_pcm_format(*codec_id);
if (format == SND_PCM_FORMAT_UNKNOWN) {
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index b6a7ac20fe..60f996e94a 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -57,7 +57,7 @@ static av_cold int audio_read_header(AVFormatContext *s1)
AlsaData *s = s1->priv_data;
AVStream *st;
int ret;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
snd_pcm_sw_params_t *sw_params;
st = avformat_new_stream(s1, NULL);
diff --git a/libavdevice/alsa-audio-enc.c b/libavdevice/alsa-audio-enc.c
index 95887c19ed..bb4575fa02 100644
--- a/libavdevice/alsa-audio-enc.c
+++ b/libavdevice/alsa-audio-enc.c
@@ -47,7 +47,7 @@ static av_cold int audio_write_header(AVFormatContext *s1)
AlsaData *s = s1->priv_data;
AVStream *st;
unsigned int sample_rate;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int res;
st = s1->streams[0];
@@ -106,7 +106,7 @@ AVOutputFormat ff_alsa_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
.priv_data_size = sizeof(AlsaData),
.audio_codec = DEFAULT_CODEC_ID,
- .video_codec = CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = ff_alsa_close,
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index ee43463696..a0e81d9e3e 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -38,7 +38,7 @@
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
-#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
#define ALSA_BUFFER_SIZE_MAX 32768
@@ -62,15 +62,15 @@ typedef struct {
* @param sample_rate in: requested sample rate;
* out: actually selected sample rate
* @param channels number of channels
- * @param codec_id in: requested CodecID or CODEC_ID_NONE;
- * out: actually selected CodecID, changed only if
- * CODEC_ID_NONE was requested
+ * @param codec_id in: requested AVCodecID or AV_CODEC_ID_NONE;
+ * out: actually selected AVCodecID, changed only if
+ * AV_CODEC_ID_NONE was requested
*
* @return 0 if OK, AVERROR_xxx on error
*/
int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
unsigned int *sample_rate,
- int channels, enum CodecID *codec_id);
+ int channels, enum AVCodecID *codec_id);
/**
* Close the ALSA PCM.
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 42ee0b317d..cf5197286c 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -283,7 +283,7 @@ static int grab_read_header(AVFormatContext *s1)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->pix_fmt = PIX_FMT_YUV420P;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = width;
st->codec->height = height;
st->codec->time_base.den = framerate.num;
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 9de1a3b555..376d104e07 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -160,7 +160,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
}
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = fbdev->width;
st->codec->height = fbdev->height;
st->codec->pix_fmt = pix_fmt;
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 7b2ceef1bb..eade2b6b89 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -245,9 +245,9 @@ static int audio_read_header(AVFormatContext *context)
stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
#if HAVE_BIGENDIAN
- stream->codec->codec_id = CODEC_ID_PCM_F32BE;
+ stream->codec->codec_id = AV_CODEC_ID_PCM_F32BE;
#else
- stream->codec->codec_id = CODEC_ID_PCM_F32LE;
+ stream->codec->codec_id = AV_CODEC_ID_PCM_F32LE;
#endif
stream->codec->sample_rate = self->sample_rate;
stream->codec->channels = self->nports;
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index ae2b7d4e29..b93899642c 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -83,9 +83,9 @@ static av_cold int read_header(AVFormatContext *ctx)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (s->drive->bigendianp)
- st->codec->codec_id = CODEC_ID_PCM_S16BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
else
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
st->codec->sample_rate = 44100;
st->codec->channels = 2;
if (s->drive->audio_last_sector != CDIO_INVALID_LSN &&
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 934e128f68..1444c32d1b 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -168,7 +168,7 @@ static inline int dc1394_read_common(AVFormatContext *c,
}
avpriv_set_pts_info(vst, 64, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_RAWVIDEO;
+ vst->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
vst->codec->time_base.den = framerate.num;
vst->codec->time_base.num = framerate.den;
vst->codec->width = fmt->width;
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index ef0ace94f0..34c782e936 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -49,7 +49,7 @@ typedef struct {
int sample_rate;
int channels;
int frame_size; /* in bytes ! */
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
unsigned int flip_left : 1;
uint8_t buffer[AUDIO_BLOCK_SIZE];
int buffer_ptr;
@@ -104,10 +104,10 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi
switch(tmp) {
case AFMT_S16_LE:
- s->codec_id = CODEC_ID_PCM_S16LE;
+ s->codec_id = AV_CODEC_ID_PCM_S16LE;
break;
case AFMT_S16_BE:
- s->codec_id = CODEC_ID_PCM_S16BE;
+ s->codec_id = AV_CODEC_ID_PCM_S16BE;
break;
default:
av_log(s1, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n");
@@ -314,8 +314,8 @@ AVOutputFormat ff_oss_muxer = {
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
- .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = audio_write_trailer,
diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c
index da6ee72e8e..3ddd6b6d03 100644
--- a/libavdevice/pulse.c
+++ b/libavdevice/pulse.c
@@ -33,7 +33,7 @@
#include "libavformat/internal.h"
#include "libavutil/opt.h"
-#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
typedef struct PulseData {
AVClass *class;
@@ -51,17 +51,17 @@ typedef struct PulseData {
static pa_sample_format_t codec_id_to_pulse_format(int codec_id) {
switch (codec_id) {
- case CODEC_ID_PCM_U8: return PA_SAMPLE_U8;
- case CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;
- case CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;
- case CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;
- case CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;
- case CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;
- case CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;
- case CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;
- case CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;
- case CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;
- case CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;
+ case AV_CODEC_ID_PCM_U8: return PA_SAMPLE_U8;
+ case AV_CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;
+ case AV_CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;
+ case AV_CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;
+ case AV_CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;
+ case AV_CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;
+ case AV_CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;
+ case AV_CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;
+ case AV_CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;
+ case AV_CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;
+ case AV_CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;
default: return PA_SAMPLE_INVALID;
}
}
@@ -72,8 +72,8 @@ static av_cold int pulse_read_header(AVFormatContext *s)
AVStream *st;
char *device = NULL;
int ret;
- enum CodecID codec_id =
- s->audio_codec_id == CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;
+ enum AVCodecID codec_id =
+ s->audio_codec_id == AV_CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;
const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id),
pd->sample_rate,
pd->channels };
diff --git a/libavdevice/sndio_common.c b/libavdevice/sndio_common.c
index 56c37c76b7..1bea6c5be1 100644
--- a/libavdevice/sndio_common.c
+++ b/libavdevice/sndio_common.c
@@ -84,7 +84,7 @@ av_cold int ff_sndio_open(AVFormatContext *s1, int is_output,
}
}
- s->codec_id = par.le ? CODEC_ID_PCM_S16LE : CODEC_ID_PCM_S16BE;
+ s->codec_id = par.le ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S16BE;
s->channels = is_output ? par.pchan : par.rchan;
s->sample_rate = par.rate;
s->bps = par.bps;
diff --git a/libavdevice/sndio_common.h b/libavdevice/sndio_common.h
index e23b96d146..dc75237b86 100644
--- a/libavdevice/sndio_common.h
+++ b/libavdevice/sndio_common.h
@@ -31,7 +31,7 @@
typedef struct {
AVClass *class;
struct sio_hdl *hdl;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int64_t hwpos;
int64_t softpos;
uint8_t *buffer;
diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c
index 49a52b355e..6f69b9e501 100644
--- a/libavdevice/sndio_enc.c
+++ b/libavdevice/sndio_enc.c
@@ -84,8 +84,8 @@ AVOutputFormat ff_sndio_muxer = {
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
- .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = audio_write_trailer,
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 2154b63aa2..d156cab1e8 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -85,27 +85,27 @@ struct buff_data {
struct fmt_map {
enum PixelFormat ff_fmt;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
uint32_t v4l2_fmt;
};
static struct fmt_map fmt_conversion_table[] = {
//ff_fmt codec_id v4l2_fmt
- { PIX_FMT_YUV420P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },
- { PIX_FMT_YUV422P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },
- { PIX_FMT_YUYV422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },
- { PIX_FMT_UYVY422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
- { PIX_FMT_YUV411P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
- { PIX_FMT_YUV410P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
- { PIX_FMT_RGB555, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
- { PIX_FMT_RGB565, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
- { PIX_FMT_BGR24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },
- { PIX_FMT_RGB24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },
- { PIX_FMT_BGRA, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },
- { PIX_FMT_GRAY8, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },
- { PIX_FMT_NV12, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },
- { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },
- { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },
+ { PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },
+ { PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },
+ { PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },
+ { PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
+ { PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
+ { PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
+ { PIX_FMT_RGB555, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
+ { PIX_FMT_RGB565, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
+ { PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },
+ { PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },
+ { PIX_FMT_BGRA, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },
+ { PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },
+ { PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },
+ { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },
+ { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },
};
static int device_open(AVFormatContext *ctx)
@@ -220,12 +220,12 @@ static int first_field(int fd)
return 1;
}
-static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id)
+static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum AVCodecID codec_id)
{
int i;
for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
- if ((codec_id == CODEC_ID_NONE ||
+ if ((codec_id == AV_CODEC_ID_NONE ||
fmt_conversion_table[i].codec_id == codec_id) &&
(pix_fmt == PIX_FMT_NONE ||
fmt_conversion_table[i].ff_fmt == pix_fmt)) {
@@ -236,7 +236,7 @@ static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id)
return 0;
}
-static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id)
+static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id)
{
int i;
@@ -250,7 +250,7 @@ static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id)
return PIX_FMT_NONE;
}
-static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt)
+static enum AVCodecID fmt_v4l2codec(uint32_t v4l2_fmt)
{
int i;
@@ -260,7 +260,7 @@ static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt)
}
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE
@@ -294,7 +294,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type)
struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) {
- enum CodecID codec_id = fmt_v4l2codec(vfd.pixelformat);
+ enum AVCodecID codec_id = fmt_v4l2codec(vfd.pixelformat);
enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id);
vfd.index++;
@@ -648,7 +648,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
enum PixelFormat pix_fmt,
int *width,
int *height,
- enum CodecID *codec_id)
+ enum AVCodecID *codec_id)
{
uint32_t desired_format = fmt_ff2v4l(pix_fmt, s1->video_codec_id);
@@ -658,7 +658,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
desired_format = 0;
for (i = 0; i<FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
- if (s1->video_codec_id == CODEC_ID_NONE ||
+ if (s1->video_codec_id == AV_CODEC_ID_NONE ||
fmt_conversion_table[i].codec_id == s1->video_codec_id) {
desired_format = fmt_conversion_table[i].v4l2_fmt;
if (device_init(s1, width, height, desired_format) >= 0) {
@@ -671,7 +671,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
if (desired_format != 0) {
*codec_id = fmt_v4l2codec(desired_format);
- assert(*codec_id != CODEC_ID_NONE);
+ assert(*codec_id != AV_CODEC_ID_NONE);
}
return desired_format;
@@ -683,7 +683,7 @@ static int v4l2_read_header(AVFormatContext *s1)
AVStream *st;
int res = 0;
uint32_t desired_format;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
enum PixelFormat pix_fmt = PIX_FMT_NONE;
st = avformat_new_stream(s1, NULL);
@@ -782,7 +782,7 @@ static int v4l2_read_header(AVFormatContext *s1)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = codec_id;
- if (codec_id == CODEC_ID_RAWVIDEO)
+ if (codec_id == AV_CODEC_ID_RAWVIDEO)
st->codec->codec_tag =
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
st->codec->width = s->width;
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 44cb813bd9..cead0ec972 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -75,16 +75,16 @@ static enum PixelFormat vfw_pixfmt(DWORD biCompression, WORD biBitCount)
return PIX_FMT_NONE;
}
-static enum CodecID vfw_codecid(DWORD biCompression)
+static enum AVCodecID vfw_codecid(DWORD biCompression)
{
switch(biCompression) {
case MKTAG('d', 'v', 's', 'd'):
- return CODEC_ID_DVVIDEO;
+ return AV_CODEC_ID_DVVIDEO;
case MKTAG('M', 'J', 'P', 'G'):
case MKTAG('m', 'j', 'p', 'g'):
- return CODEC_ID_MJPEG;
+ return AV_CODEC_ID_MJPEG;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
#define dstruct(pctx, sname, var, type) \
@@ -378,7 +378,7 @@ static int vfw_read_header(AVFormatContext *s)
codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
if(codec->pix_fmt == PIX_FMT_NONE) {
codec->codec_id = vfw_codecid(biCompression);
- if(codec->codec_id == CODEC_ID_NONE) {
+ if(codec->codec_id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_ERROR, "Unknown compression type. "
"Please report verbose (-v 9) debug information.\n");
vfw_read_close(s);
@@ -386,7 +386,7 @@ static int vfw_read_header(AVFormatContext *s)
}
codec->bits_per_coded_sample = biBitCount;
} else {
- codec->codec_id = CODEC_ID_RAWVIDEO;
+ codec->codec_id = AV_CODEC_ID_RAWVIDEO;
if(biCompression == BI_RGB) {
codec->bits_per_coded_sample = biBitCount;
codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index d7c8c8f548..40b5ada5da 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -314,7 +314,7 @@ x11grab_read_header(AVFormatContext *s1)
x11grab->use_shm = use_shm;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = x11grab->width;
st->codec->height = x11grab->height;
st->codec->pix_fmt = input_pixfmt;