Alphabetically order AVInputFormat/AVOutputFormat declarations.

Originally committed as revision 14100 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Biurrun 2008-07-07 11:11:08 +00:00
parent 900eb63dd3
commit 76d3242835
1 changed files with 220 additions and 219 deletions

View File

@ -56,6 +56,11 @@ static int roq_write_header(struct AVFormatContext *s)
return 0; return 0;
} }
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
return 0;
}
static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{ {
put_buffer(s->pb, pkt->data, pkt->size); put_buffer(s->pb, pkt->data, pkt->size);
@ -152,6 +157,30 @@ static int raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
return ret; return ret;
} }
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int packet_size, ret, width, height;
AVStream *st = s->streams[0];
width = st->codec->width;
height = st->codec->height;
packet_size = avpicture_get_size(st->codec->pix_fmt, width, height);
if (packet_size < 0)
return -1;
ret= av_get_packet(s->pb, pkt, packet_size);
pkt->pts=
pkt->dts= pkt->pos / packet_size;
pkt->stream_index = 0;
if (ret != packet_size) {
return AVERROR(EIO);
} else {
return 0;
}
}
// http://www.artificis.hu/files/texts/ingenient.txt // http://www.artificis.hu/files/texts/ingenient.txt
static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt)
{ {
@ -427,57 +456,18 @@ static int flac_probe(AVProbeData *p)
/* Note: Do not forget to add new entries to the Makefile as well. */ /* Note: Do not forget to add new entries to the Makefile as well. */
AVInputFormat shorten_demuxer = { AVInputFormat aac_demuxer = {
"shn", "aac",
NULL_IF_CONFIG_SMALL("raw Shorten"), NULL_IF_CONFIG_SMALL("ADTS AAC"),
0, 0,
NULL, NULL,
audio_read_header, audio_read_header,
raw_read_partial_packet, raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX, .flags= AVFMT_GENERIC_INDEX,
.extensions = "shn", .extensions = "aac",
.value = CODEC_ID_SHORTEN, .value = CODEC_ID_AAC,
}; };
AVInputFormat mlp_demuxer = {
"mlp",
NULL_IF_CONFIG_SMALL("raw MLP"),
0,
NULL,
audio_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "mlp",
.value = CODEC_ID_MLP,
};
AVInputFormat flac_demuxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
0,
flac_probe,
audio_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "flac",
.value = CODEC_ID_FLAC,
};
#ifdef CONFIG_MUXERS
AVOutputFormat flac_muxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
"audio/x-flac",
"flac",
0,
CODEC_ID_FLAC,
CODEC_ID_NONE,
flac_write_header,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
#ifdef CONFIG_AC3_DEMUXER #ifdef CONFIG_AC3_DEMUXER
AVInputFormat ac3_demuxer = { AVInputFormat ac3_demuxer = {
"ac3", "ac3",
@ -505,20 +495,6 @@ AVOutputFormat ac3_muxer = {
raw_write_packet, raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS, .flags= AVFMT_NOTIMESTAMPS,
}; };
AVOutputFormat dts_muxer = {
"dts",
NULL_IF_CONFIG_SMALL("raw DTS"),
"audio/x-dca",
"dts",
0,
CODEC_ID_DTS,
CODEC_ID_NONE,
NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
AVInputFormat dirac_demuxer = { AVInputFormat dirac_demuxer = {
@ -559,18 +535,48 @@ AVInputFormat dts_demuxer = {
.value = CODEC_ID_DTS, .value = CODEC_ID_DTS,
}; };
AVInputFormat aac_demuxer = { #ifdef CONFIG_MUXERS
"aac", AVOutputFormat dts_muxer = {
NULL_IF_CONFIG_SMALL("ADTS AAC"), "dts",
NULL_IF_CONFIG_SMALL("raw DTS"),
"audio/x-dca",
"dts",
0, 0,
CODEC_ID_DTS,
CODEC_ID_NONE,
NULL, NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif
AVInputFormat flac_demuxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
0,
flac_probe,
audio_read_header, audio_read_header,
raw_read_partial_packet, raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX, .flags= AVFMT_GENERIC_INDEX,
.extensions = "aac", .extensions = "flac",
.value = CODEC_ID_AAC, .value = CODEC_ID_FLAC,
}; };
#ifdef CONFIG_MUXERS
AVOutputFormat flac_muxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
"audio/x-flac",
"flac",
0,
CODEC_ID_FLAC,
CODEC_ID_NONE,
flac_write_header,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
AVInputFormat gsm_demuxer = { AVInputFormat gsm_demuxer = {
"gsm", "gsm",
NULL_IF_CONFIG_SMALL("GSM"), NULL_IF_CONFIG_SMALL("GSM"),
@ -583,21 +589,6 @@ AVInputFormat gsm_demuxer = {
.value = CODEC_ID_GSM, .value = CODEC_ID_GSM,
}; };
#ifdef CONFIG_ROQ_MUXER
AVOutputFormat roq_muxer =
{
"RoQ",
NULL_IF_CONFIG_SMALL("id RoQ format"),
NULL,
"roq",
0,
CODEC_ID_ROQ_DPCM,
CODEC_ID_ROQ,
roq_write_header,
raw_write_packet,
};
#endif //CONFIG_ROQ_MUXER
AVInputFormat h261_demuxer = { AVInputFormat h261_demuxer = {
"h261", "h261",
NULL_IF_CONFIG_SMALL("raw H.261"), NULL_IF_CONFIG_SMALL("raw H.261"),
@ -652,33 +643,6 @@ AVOutputFormat h263_muxer = {
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
AVInputFormat m4v_demuxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
0,
mpeg4video_probe, /** probing for mpeg4 data */
video_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "m4v", //FIXME remove after writing mpeg4_probe
.value = CODEC_ID_MPEG4,
};
#ifdef CONFIG_MUXERS
AVOutputFormat m4v_muxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
NULL,
"m4v",
0,
CODEC_ID_NONE,
CODEC_ID_MPEG4,
NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
AVInputFormat h264_demuxer = { AVInputFormat h264_demuxer = {
"h264", "h264",
NULL_IF_CONFIG_SMALL("raw H.264 video format"), NULL_IF_CONFIG_SMALL("raw H.264 video format"),
@ -706,15 +670,82 @@ AVOutputFormat h264_muxer = {
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
AVInputFormat mpegvideo_demuxer = { AVInputFormat ingenient_demuxer = {
"mpegvideo", "ingenient",
NULL_IF_CONFIG_SMALL("MPEG video"), NULL_IF_CONFIG_SMALL("Ingenient MJPEG"),
0, 0,
mpegvideo_probe, NULL,
video_read_header,
ingenient_read_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "cgi", // FIXME
.value = CODEC_ID_MJPEG,
};
AVInputFormat m4v_demuxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
0,
mpeg4video_probe, /** probing for mpeg4 data */
video_read_header, video_read_header,
raw_read_partial_packet, raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX, .flags= AVFMT_GENERIC_INDEX,
.value = CODEC_ID_MPEG1VIDEO, .extensions = "m4v", //FIXME remove after writing mpeg4_probe
.value = CODEC_ID_MPEG4,
};
#ifdef CONFIG_MUXERS
AVOutputFormat m4v_muxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
NULL,
"m4v",
0,
CODEC_ID_NONE,
CODEC_ID_MPEG4,
NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
AVInputFormat mjpeg_demuxer = {
"mjpeg",
NULL_IF_CONFIG_SMALL("MJPEG video"),
0,
NULL,
video_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "mjpg,mjpeg",
.value = CODEC_ID_MJPEG,
};
#ifdef CONFIG_MUXERS
AVOutputFormat mjpeg_muxer = {
"mjpeg",
NULL_IF_CONFIG_SMALL("MJPEG video"),
"video/x-mjpeg",
"mjpg,mjpeg",
0,
CODEC_ID_NONE,
CODEC_ID_MJPEG,
NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
AVInputFormat mlp_demuxer = {
"mlp",
NULL_IF_CONFIG_SMALL("raw MLP"),
0,
NULL,
audio_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "mlp",
.value = CODEC_ID_MLP,
}; };
#ifdef CONFIG_MUXERS #ifdef CONFIG_MUXERS
@ -747,45 +778,90 @@ AVOutputFormat mpeg2video_muxer = {
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
AVInputFormat mjpeg_demuxer = { AVInputFormat mpegvideo_demuxer = {
"mjpeg", "mpegvideo",
NULL_IF_CONFIG_SMALL("MJPEG video"), NULL_IF_CONFIG_SMALL("MPEG video"),
0, 0,
NULL, mpegvideo_probe,
video_read_header, video_read_header,
raw_read_partial_packet, raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX, .flags= AVFMT_GENERIC_INDEX,
.extensions = "mjpg,mjpeg", .value = CODEC_ID_MPEG1VIDEO,
.value = CODEC_ID_MJPEG,
};
AVInputFormat ingenient_demuxer = {
"ingenient",
NULL_IF_CONFIG_SMALL("Ingenient MJPEG"),
0,
NULL,
video_read_header,
ingenient_read_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "cgi", // FIXME
.value = CODEC_ID_MJPEG,
}; };
#ifdef CONFIG_MUXERS #ifdef CONFIG_MUXERS
AVOutputFormat mjpeg_muxer = { AVOutputFormat null_muxer = {
"mjpeg", "null",
NULL_IF_CONFIG_SMALL("MJPEG video"), NULL_IF_CONFIG_SMALL("null video format"),
"video/x-mjpeg", NULL,
"mjpg,mjpeg", NULL,
0,
#ifdef WORDS_BIGENDIAN
CODEC_ID_PCM_S16BE,
#else
CODEC_ID_PCM_S16LE,
#endif
CODEC_ID_RAWVIDEO,
NULL,
null_write_packet,
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
AVInputFormat rawvideo_demuxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
0,
NULL,
raw_read_header,
rawvideo_read_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "yuv,cif,qcif,rgb",
.value = CODEC_ID_RAWVIDEO,
};
#ifdef CONFIG_MUXERS
AVOutputFormat rawvideo_muxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
NULL,
"yuv,rgb",
0, 0,
CODEC_ID_NONE, CODEC_ID_NONE,
CODEC_ID_MJPEG, CODEC_ID_RAWVIDEO,
NULL, NULL,
raw_write_packet, raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS, .flags= AVFMT_NOTIMESTAMPS,
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
#ifdef CONFIG_ROQ_MUXER
AVOutputFormat roq_muxer =
{
"RoQ",
NULL_IF_CONFIG_SMALL("id RoQ format"),
NULL,
"roq",
0,
CODEC_ID_ROQ_DPCM,
CODEC_ID_ROQ,
roq_write_header,
raw_write_packet,
};
#endif //CONFIG_ROQ_MUXER
AVInputFormat shorten_demuxer = {
"shn",
NULL_IF_CONFIG_SMALL("raw Shorten"),
0,
NULL,
audio_read_header,
raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "shn",
.value = CODEC_ID_SHORTEN,
};
AVInputFormat vc1_demuxer = { AVInputFormat vc1_demuxer = {
"vc1", "vc1",
NULL_IF_CONFIG_SMALL("raw VC-1"), NULL_IF_CONFIG_SMALL("raw VC-1"),
@ -852,101 +928,26 @@ AVOutputFormat pcm_ ## name ## _muxer = {\
#endif #endif
PCMDEF(s16le, "PCM signed 16 bit little-endian format",
LE_DEF("sw"), CODEC_ID_PCM_S16LE)
PCMDEF(s16be, "PCM signed 16 bit big-endian format", PCMDEF(s16be, "PCM signed 16 bit big-endian format",
BE_DEF("sw"), CODEC_ID_PCM_S16BE) BE_DEF("sw"), CODEC_ID_PCM_S16BE)
PCMDEF(u16le, "PCM unsigned 16 bit little-endian format", PCMDEF(s16le, "PCM signed 16 bit little-endian format",
LE_DEF("uw"), CODEC_ID_PCM_U16LE) LE_DEF("sw"), CODEC_ID_PCM_S16LE)
PCMDEF(u16be, "PCM unsigned 16 bit big-endian format",
BE_DEF("uw"), CODEC_ID_PCM_U16BE)
PCMDEF(s8, "PCM signed 8 bit format", PCMDEF(s8, "PCM signed 8 bit format",
"sb", CODEC_ID_PCM_S8) "sb", CODEC_ID_PCM_S8)
PCMDEF(u16be, "PCM unsigned 16 bit big-endian format",
BE_DEF("uw"), CODEC_ID_PCM_U16BE)
PCMDEF(u16le, "PCM unsigned 16 bit little-endian format",
LE_DEF("uw"), CODEC_ID_PCM_U16LE)
PCMDEF(u8, "PCM unsigned 8 bit format", PCMDEF(u8, "PCM unsigned 8 bit format",
"ub", CODEC_ID_PCM_U8) "ub", CODEC_ID_PCM_U8)
PCMDEF(mulaw, "PCM mu-law format",
"ul", CODEC_ID_PCM_MULAW)
PCMDEF(alaw, "PCM A-law format", PCMDEF(alaw, "PCM A-law format",
"al", CODEC_ID_PCM_ALAW) "al", CODEC_ID_PCM_ALAW)
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) PCMDEF(mulaw, "PCM mu-law format",
{ "ul", CODEC_ID_PCM_MULAW)
int packet_size, ret, width, height;
AVStream *st = s->streams[0];
width = st->codec->width;
height = st->codec->height;
packet_size = avpicture_get_size(st->codec->pix_fmt, width, height);
if (packet_size < 0)
return -1;
ret= av_get_packet(s->pb, pkt, packet_size);
pkt->pts=
pkt->dts= pkt->pos / packet_size;
pkt->stream_index = 0;
if (ret != packet_size) {
return AVERROR(EIO);
} else {
return 0;
}
}
AVInputFormat rawvideo_demuxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
0,
NULL,
raw_read_header,
rawvideo_read_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "yuv,cif,qcif,rgb",
.value = CODEC_ID_RAWVIDEO,
};
#ifdef CONFIG_MUXERS
AVOutputFormat rawvideo_muxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
NULL,
"yuv,rgb",
0,
CODEC_ID_NONE,
CODEC_ID_RAWVIDEO,
NULL,
raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
#ifdef CONFIG_MUXERS
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
return 0;
}
AVOutputFormat null_muxer = {
"null",
NULL_IF_CONFIG_SMALL("null video format"),
NULL,
NULL,
0,
#ifdef WORDS_BIGENDIAN
CODEC_ID_PCM_S16BE,
#else
CODEC_ID_PCM_S16LE,
#endif
CODEC_ID_RAWVIDEO,
NULL,
null_write_packet,
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS