Commit d2a067d1 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

give AVInput/OutputFormat structs consistent names

Originally committed as revision 5697 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 21227514
......@@ -1790,7 +1790,7 @@ static int decode_thread(void *arg)
}
is->ic = ic;
#ifdef CONFIG_NETWORK
use_play = (ic->iformat == &rtsp_demux);
use_play = (ic->iformat == &rtsp_demuxer);
#else
use_play = 0;
#endif
......@@ -1884,7 +1884,7 @@ static int decode_thread(void *arg)
else
av_read_play(ic);
}
if (is->paused && ic->iformat == &rtsp_demux) {
if (is->paused && ic->iformat == &rtsp_demuxer) {
/* wait 10 ms to avoid trying to get another packet */
/* XXX: horrible */
SDL_Delay(10);
......
......@@ -1624,7 +1624,7 @@ static void compute_stats(HTTPContext *c)
strcpy(eosf - 4, ".asx");
} else if (strcmp(eosf - 3, ".rm") == 0) {
strcpy(eosf - 3, ".ram");
} else if (stream->fmt == &rtp_mux) {
} else if (stream->fmt == &rtp_muxer) {
/* generate a sample RTSP director if
unicast. Generate an SDP redirector if
multicast */
......@@ -2720,7 +2720,7 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url)
path++;
for(stream = first_stream; stream != NULL; stream = stream->next) {
if (!stream->is_feed && stream->fmt == &rtp_mux &&
if (!stream->is_feed && stream->fmt == &rtp_muxer &&
!strcmp(path, stream->filename)) {
goto found;
}
......@@ -2795,7 +2795,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
/* now check each stream */
for(stream = first_stream; stream != NULL; stream = stream->next) {
if (!stream->is_feed && stream->fmt == &rtp_mux) {
if (!stream->is_feed && stream->fmt == &rtp_muxer) {
/* accept aggregate filenames only if single stream */
if (!strcmp(path, stream->filename)) {
if (stream->nb_streams != 1) {
......@@ -3130,7 +3130,7 @@ static int rtp_new_av_stream(HTTPContext *c,
ctx = av_alloc_format_context();
if (!ctx)
return -1;
ctx->oformat = &rtp_mux;
ctx->oformat = &rtp_muxer;
st = av_mallocz(sizeof(AVStream));
if (!st)
......@@ -3350,7 +3350,7 @@ static void build_file_streams(void)
/* try to open the file */
/* open stream */
stream->ap_in = av_mallocz(sizeof(AVFormatParameters));
if (stream->fmt == &rtp_mux) {
if (stream->fmt == &rtp_muxer) {
/* specific case : if transport stream output to RTP,
we use a raw transport stream reader */
stream->ap_in->mpeg2ts_raw = 1;
......
......@@ -318,7 +318,7 @@ static int fourxm_read_close(AVFormatContext *s)
return 0;
}
static AVInputFormat fourxm_iformat = {
static AVInputFormat fourxm_demuxer = {
"4xm",
"4X Technologies format",
sizeof(FourxmDemuxContext),
......@@ -330,6 +330,6 @@ static AVInputFormat fourxm_iformat = {
int fourxm_init(void)
{
av_register_input_format(&fourxm_iformat);
av_register_input_format(&fourxm_demuxer);
return 0;
}
......@@ -107,7 +107,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
static AVOutputFormat adts_oformat = {
static AVOutputFormat adts_muxer = {
"adts",
"ADTS AAC",
"audio/aac",
......@@ -122,6 +122,6 @@ static AVOutputFormat adts_oformat = {
int ff_adts_init(void)
{
av_register_output_format(&adts_oformat);
av_register_output_format(&adts_muxer);
return 0;
}
......@@ -429,7 +429,7 @@ static int aiff_read_seek(AVFormatContext *s,
}
static AVInputFormat aiff_iformat = {
static AVInputFormat aiff_demuxer = {
"aiff",
"Audio IFF",
0,
......@@ -441,7 +441,7 @@ static AVInputFormat aiff_iformat = {
};
#ifdef CONFIG_MUXERS
static AVOutputFormat aiff_oformat = {
static AVOutputFormat aiff_muxer = {
"aiff",
"Audio IFF",
"audio/aiff",
......@@ -457,9 +457,9 @@ static AVOutputFormat aiff_oformat = {
int ff_aiff_init(void)
{
av_register_input_format(&aiff_iformat);
av_register_input_format(&aiff_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&aiff_oformat);
av_register_output_format(&aiff_muxer);
#endif //CONFIG_MUXERS
return 0;
}
......
......@@ -2,11 +2,11 @@
#define ALLFORMATS_H
/* mpeg.c */
extern AVInputFormat mpegps_demux;
extern AVInputFormat mpegps_demuxer;
int mpegps_init(void);
/* mpegts.c */
extern AVInputFormat mpegts_demux;
extern AVInputFormat mpegts_demuxer;
int mpegts_init(void);
/* rm.c */
......@@ -87,7 +87,7 @@ int ff_dv_init(void);
int ffm_init(void);
/* rtsp.c */
extern AVInputFormat redir_demux;
extern AVInputFormat redir_demuxer;
int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f);
/* 4xm.c */
......
......@@ -215,7 +215,7 @@ static int amr_read_close(AVFormatContext *s)
return 0;
}
static AVInputFormat amr_iformat = {
static AVInputFormat amr_demuxer = {
"amr",
"3gpp amr file format",
0, /*priv_data_size*/
......@@ -226,7 +226,7 @@ static AVInputFormat amr_iformat = {
};
#ifdef CONFIG_MUXERS
static AVOutputFormat amr_oformat = {
static AVOutputFormat amr_muxer = {
"amr",
"3gpp amr file format",
"audio/amr",
......@@ -242,9 +242,9 @@ static AVOutputFormat amr_oformat = {
int amr_init(void)
{
av_register_input_format(&amr_iformat);
av_register_input_format(&amr_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&amr_oformat);
av_register_output_format(&amr_muxer);
#endif
return 0;
}
......@@ -823,7 +823,7 @@ static int asf_write_trailer(AVFormatContext *s)
return 0;
}
AVOutputFormat asf_oformat = {
AVOutputFormat asf_muxer = {
"asf",
"asf format",
"video/x-ms-asf",
......@@ -841,7 +841,7 @@ AVOutputFormat asf_oformat = {
.flags = AVFMT_GLOBALHEADER,
};
AVOutputFormat asf_stream_oformat = {
AVOutputFormat asf_stream_muxer = {
"asf_stream",
"asf format",
"video/x-ms-asf",
......
......@@ -840,7 +840,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
return 0;
}
static AVInputFormat asf_iformat = {
static AVInputFormat asf_demuxer = {
"asf",
"asf format",
sizeof(ASFContext),
......@@ -853,16 +853,16 @@ static AVInputFormat asf_iformat = {
};
#ifdef CONFIG_MUXERS
extern AVOutputFormat asf_oformat;
extern AVOutputFormat asf_stream_oformat;
extern AVOutputFormat asf_muxer;
extern AVOutputFormat asf_stream_muxer;
#endif //CONFIG_MUXERS
int asf_init(void)
{
av_register_input_format(&asf_iformat);
av_register_input_format(&asf_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&asf_oformat);
av_register_output_format(&asf_stream_oformat);
av_register_output_format(&asf_muxer);
av_register_output_format(&asf_stream_muxer);
#endif //CONFIG_MUXERS
return 0;
}
......@@ -178,7 +178,7 @@ static int au_read_close(AVFormatContext *s)
return 0;
}
static AVInputFormat au_iformat = {
static AVInputFormat au_demuxer = {
"au",
"SUN AU Format",
0,
......@@ -190,7 +190,7 @@ static AVInputFormat au_iformat = {
};
#ifdef CONFIG_MUXERS
static AVOutputFormat au_oformat = {
static AVOutputFormat au_muxer = {
"au",
"SUN AU Format",
"audio/basic",
......@@ -206,9 +206,9 @@ static AVOutputFormat au_oformat = {
int au_init(void)
{
av_register_input_format(&au_iformat);
av_register_input_format(&au_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&au_oformat);
av_register_output_format(&au_muxer);
#endif //CONFIG_MUXERS
return 0;
}
......@@ -313,7 +313,7 @@ static int audio_read_close(AVFormatContext *s1)
return 0;
}
static AVInputFormat audio_in_format = {
static AVInputFormat audio_demuxer = {
"audio_device",
"audio grab and output",
sizeof(AudioData),
......@@ -324,7 +324,7 @@ static AVInputFormat audio_in_format = {
.flags = AVFMT_NOFILE,
};
static AVOutputFormat audio_out_format = {
static AVOutputFormat audio_muxer = {
"audio_device",
"audio grab and output",
"",
......@@ -347,7 +347,7 @@ static AVOutputFormat audio_out_format = {
int audio_init(void)
{
av_register_input_format(&audio_in_format);
av_register_output_format(&audio_out_format);
av_register_input_format(&audio_demuxer);
av_register_output_format(&audio_muxer);
return 0;
}
......@@ -399,7 +399,7 @@ extern AVImageFormat *first_image_format;
#include "rtsp.h"
/* yuv4mpeg.c */
extern AVOutputFormat yuv4mpegpipe_oformat;
extern AVOutputFormat yuv4mpegpipe_muxer;
/* utils.c */
void av_register_input_format(AVInputFormat *format);
......
......@@ -923,7 +923,7 @@ static int avi_probe(AVProbeData *p)
return 0;
}
static AVInputFormat avi_iformat = {
static AVInputFormat avi_demuxer = {
"avi",
"avi format",
sizeof(AVIContext),
......@@ -936,6 +936,6 @@ static AVInputFormat avi_iformat = {
int avidec_init(void)
{
av_register_input_format(&avi_iformat);
av_register_input_format(&avi_demuxer);
return 0;
}
......@@ -762,7 +762,7 @@ static int avi_write_trailer(AVFormatContext *s)
return res;
}
static AVOutputFormat avi_oformat = {
static AVOutputFormat avi_muxer = {
"avi",
"avi format",
"video/x-msvideo",
......@@ -777,7 +777,7 @@ static AVOutputFormat avi_oformat = {
int avienc_init(void)
{
av_register_output_format(&avi_oformat);
av_register_output_format(&avi_muxer);
return 0;
}
#endif //CONFIG_MUXERS
......@@ -217,7 +217,7 @@ static int avs_read_close(AVFormatContext * s)
return 0;
}
static AVInputFormat avs_iformat = {
static AVInputFormat avs_demuxer = {
"avs",
"avs format",
sizeof(avs_format_t),
......@@ -232,7 +232,7 @@ static AVInputFormat avs_iformat = {
int avs_init(void)
{
#ifdef CONFIG_DEMUXERS
av_register_input_format(&avs_iformat);
av_register_input_format(&avs_demuxer);
#endif /* CONFIG_DEMUXERS */
return 0;
}
......@@ -419,7 +419,7 @@ static int audio_read_close(AVFormatContext *s1)
return 0;
}
static AVInputFormat audio_in_format = {
static AVInputFormat audio_demuxer = {
"audio_device",
"audio grab and output",
sizeof(AudioData),
......@@ -431,7 +431,7 @@ static AVInputFormat audio_in_format = {
AVFMT_NOFILE,
};
AVOutputFormat audio_out_format = {
AVOutputFormat audio_muxer = {
"audio_device",
"audio grab and output",
"",
......@@ -454,8 +454,8 @@ extern "C" {
int audio_init(void)
{
main_thid = find_thread(NULL);
av_register_input_format(&audio_in_format);
av_register_output_format(&audio_out_format);
av_register_input_format(&audio_demuxer);
av_register_output_format(&audio_muxer);
return 0;
}
......
......@@ -101,7 +101,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
return 0;
}
static AVOutputFormat crc_format = {
static AVOutputFormat crc_muxer = {
"crc",
"crc testing format",
NULL,
......@@ -114,7 +114,7 @@ static AVOutputFormat crc_format = {
crc_write_trailer,
};
static AVOutputFormat framecrc_format = {
static AVOutputFormat framecrc_muxer = {
"framecrc",
"framecrc testing format",
NULL,
......@@ -129,8 +129,8 @@ static AVOutputFormat framecrc_format = {
int crc_init(void)
{
av_register_output_format(&crc_format);
av_register_output_format(&framecrc_format);
av_register_output_format(&crc_muxer);
av_register_output_format(&framecrc_muxer);
return 0;
}
#endif /* CONFIG_MUXERS */
......@@ -43,7 +43,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
return ret;
}
static AVInputFormat daud_iformat = {
static AVInputFormat daud_demuxer = {
"daud",
"D-Cinema audio format",
0,
......@@ -57,7 +57,7 @@ static AVInputFormat daud_iformat = {
int daud_init(void)
{
av_register_input_format(&daud_iformat);
av_register_input_format(&daud_demuxer);
return 0;
}
......@@ -180,7 +180,7 @@ static int dc1394_close(AVFormatContext * context)
return 0;
}
static AVInputFormat dc1394_format = {
static AVInputFormat dc1394_demuxer = {
.name = "dc1394",
.long_name = "dc1394 A/V grab",
.priv_data_size = sizeof(struct dc1394_data),
......@@ -192,6 +192,6 @@ static AVInputFormat dc1394_format = {
int dc1394_init(void)
{
av_register_input_format(&dc1394_format);
av_register_input_format(&dc1394_demuxer);
return 0;
}
......@@ -1000,7 +1000,7 @@ static int dv_write_trailer(struct AVFormatContext *s)
}
#endif /* CONFIG_MUXERS */
static AVInputFormat dv_iformat = {
static AVInputFormat dv_demuxer = {
"dv",
"DV video format",
sizeof(RawDVContext),
......@@ -1013,7 +1013,7 @@ static AVInputFormat dv_iformat = {
};
#ifdef CONFIG_MUXERS
static AVOutputFormat dv_oformat = {
static AVOutputFormat dv_muxer = {
"dv",
"DV video format",
NULL,
......@@ -1029,9 +1029,9 @@ static AVOutputFormat dv_oformat = {
int ff_dv_init(void)
{
av_register_input_format(&dv_iformat);
av_register_input_format(&dv_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&dv_oformat);
av_register_output_format(&dv_muxer);
#endif
return 0;
}
......@@ -227,7 +227,7 @@ static int dv1394_close(AVFormatContext * context)
return 0;
}
static AVInputFormat dv1394_format = {
static AVInputFormat dv1394_demuxer = {
.name = "dv1394",
.long_name = "dv1394 A/V grab",
.priv_data_size = sizeof(struct dv1394_data),
......@@ -239,6 +239,6 @@ static AVInputFormat dv1394_format = {
int dv1394_init(void)
{
av_register_input_format(&dv1394_format);
av_register_input_format(&dv1394_demuxer);
return 0;
}
......@@ -278,7 +278,7 @@ static int ea_read_close(AVFormatContext *s)
return 0;
}
static AVInputFormat ea_iformat = {
static AVInputFormat ea_demuxer = {
"ea",
"Electronic Arts Multimedia Format",
sizeof(EaDemuxContext),
......@@ -290,6 +290,6 @@ static AVInputFormat ea_iformat = {
int ea_init(void)
{
av_register_input_format(&ea_iformat);
av_register_input_format(&ea_demuxer);
return 0;
}
......@@ -761,7 +761,7 @@ static int ffm_probe(AVProbeData *p)
return 0;
}
static AVInputFormat ffm_iformat = {
static AVInputFormat ffm_demuxer = {
"ffm",
"ffm format",
sizeof(FFMContext),
......@@ -773,7 +773,7 @@ static AVInputFormat ffm_iformat = {
};
#ifdef CONFIG_MUXERS
static AVOutputFormat ffm_oformat = {
static AVOutputFormat ffm_muxer = {
"ffm",
"ffm format",
"",
......@@ -790,9 +790,9 @@ static AVOutputFormat ffm_oformat = {
int ffm_init(void)
{
av_register_input_format(&ffm_iformat);
av_register_input_format(&ffm_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&ffm_oformat);
av_register_output_format(&ffm_muxer);
#endif //CONFIG_MUXERS
return 0;
}
......@@ -208,7 +208,7 @@ static int flic_read_close(AVFormatContext *s)
return 0;
}
static AVInputFormat flic_iformat = {
static AVInputFormat flic_demuxer = {
"flic",
"FLI/FLC/FLX animation format",
sizeof(FlicDemuxContext),
......@@ -220,6 +220,6 @@ static AVInputFormat flic_iformat = {
int flic_init(void)
{
av_register_input_format(&flic_iformat);
av_register_input_format(&flic_demuxer);
return 0;
}
......@@ -211,7 +211,7 @@ static int flv_read_close(AVFormatContext *s)
return 0;
}
AVInputFormat flv_iformat = {
AVInputFormat flv_demuxer = {
"flv",
"flv format",
0,
......@@ -225,6 +225,6 @@ AVInputFormat flv_iformat = {
int flvdec_init(void)
{
av_register_input_format(&flv_iformat);
av_register_input_format(&flv_demuxer);
return 0;
}
......@@ -167,7 +167,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
static AVOutputFormat flv_oformat = {
static AVOutputFormat flv_muxer = {
"flv",
"flv format",
"video/x-flv",
......@@ -186,6 +186,6 @@ static AVOutputFormat flv_oformat = {
int flvenc_init(void)
{
av_register_output_format(&flv_oformat);
av_register_output_format(&flv_muxer);
return 0;
}
......@@ -414,7 +414,7 @@ int gif_write(ByteIOContext *pb, AVImageInfo *info)
return 0;
}
static AVOutputFormat gif_oformat = {
static AVOutputFormat gif_muxer = {
"gif",
"GIF Animation",
"image/gif",
......@@ -427,11 +427,11 @@ static AVOutputFormat gif_oformat = {
gif_write_trailer,
};
extern AVInputFormat gif_iformat;
extern AVInputFormat gif_demuxer;
int gif_init(void)
{
av_register_output_format(&gif_oformat);
av_register_input_format(&gif_iformat);
av_register_output_format(&gif_muxer);
av_register_input_format(&gif_demuxer);
return 0;
}
......@@ -619,7 +619,7 @@ static int gif_read(ByteIOContext *f,
return 0;