Commit fa4924a3 authored by Anton Khirnov's avatar Anton Khirnov

rawdec: factor video demuxer definitions into a macro.

parent 4779f593
......@@ -65,13 +65,4 @@ static int cavsvideo_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_cavsvideo_demuxer = {
"cavsvideo",
NULL_IF_CONFIG_SMALL("raw Chinese AVS video"),
0,
cavsvideo_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.value = CODEC_ID_CAVS,
};
FF_DEF_RAWVIDEO_DEMUXER(cavsvideo, "raw Chinese AVS video", cavsvideo_probe, NULL, CODEC_ID_CAVS)
......@@ -31,13 +31,4 @@ static int dirac_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_dirac_demuxer = {
"dirac",
NULL_IF_CONFIG_SMALL("raw Dirac"),
0,
dirac_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.value = CODEC_ID_DIRAC,
};
FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, CODEC_ID_DIRAC)
......@@ -42,13 +42,4 @@ static int dnxhd_probe(AVProbeData *p)
return AVPROBE_SCORE_MAX;
}
AVInputFormat ff_dnxhd_demuxer = {
"dnxhd",
NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
0,
dnxhd_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.value = CODEC_ID_DNXHD,
};
FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, CODEC_ID_DNXHD)
......@@ -62,14 +62,4 @@ static int h261_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_h261_demuxer = {
"h261",
NULL_IF_CONFIG_SMALL("raw H.261"),
0,
h261_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "h261",
.value = CODEC_ID_H261,
};
FF_DEF_RAWVIDEO_DEMUXER(h261, "raw H.261", h261_probe, "h261", CODEC_ID_H261)
......@@ -64,14 +64,4 @@ static int h263_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_h263_demuxer = {
"h263",
NULL_IF_CONFIG_SMALL("raw H.263"),
0,
h263_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
// .extensions = "h263", //FIXME remove after writing mpeg4_probe
.value = CODEC_ID_H263,
};
FF_DEF_RAWVIDEO_DEMUXER(h263, "raw H.263", h263_probe, NULL, CODEC_ID_H263)
......@@ -67,14 +67,4 @@ static int h264_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_h264_demuxer = {
"h264",
NULL_IF_CONFIG_SMALL("raw H.264 video format"),
0,
h264_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "h26l,h264,264", //FIXME remove after writing mpeg4_probe
.value = CODEC_ID_H264,
};
FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video format", h264_probe, "h26l,h264,264", CODEC_ID_H264)
......@@ -49,14 +49,4 @@ static int mpeg4video_probe(AVProbeData *probe_packet)
return 0;
}
AVInputFormat ff_m4v_demuxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
0,
mpeg4video_probe, /** probing for MPEG-4 data */
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "m4v",
.value = CODEC_ID_MPEG4,
};
FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video format", mpeg4video_probe, "m4v", CODEC_ID_MPEG4)
......@@ -55,13 +55,4 @@ static int mpegvideo_probe(AVProbeData *p)
return 0;
}
AVInputFormat ff_mpegvideo_demuxer = {
"mpegvideo",
NULL_IF_CONFIG_SMALL("raw MPEG video"),
0,
mpegvideo_probe,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.value = CODEC_ID_MPEG1VIDEO,
};
FF_DEF_RAWVIDEO_DEMUXER(mpegvideo, "raw MPEG video", mpegvideo_probe, NULL, CODEC_ID_MPEG1VIDEO)
......@@ -229,17 +229,7 @@ AVInputFormat ff_gsm_demuxer = {
#endif
#if CONFIG_MJPEG_DEMUXER
AVInputFormat ff_mjpeg_demuxer = {
"mjpeg",
NULL_IF_CONFIG_SMALL("raw MJPEG video"),
0,
NULL,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "mjpg,mjpeg",
.value = CODEC_ID_MJPEG,
};
FF_DEF_RAWVIDEO_DEMUXER(mjpeg, "raw MJPEG video", NULL, "mjpg,mjpeg", CODEC_ID_MJPEG)
#endif
#if CONFIG_MLP_DEMUXER
......@@ -285,14 +275,5 @@ AVInputFormat ff_shorten_demuxer = {
#endif
#if CONFIG_VC1_DEMUXER
AVInputFormat ff_vc1_demuxer = {
"vc1",
NULL_IF_CONFIG_SMALL("raw VC-1"),
0,
NULL /* vc1_probe */,
ff_raw_video_read_header,
ff_raw_read_partial_packet,
.extensions = "vc1",
.value = CODEC_ID_VC1,
};
FF_DEF_RAWVIDEO_DEMUXER(vc1, "raw VC-1", NULL, "vc1", CODEC_ID_VC1)
#endif
......@@ -47,4 +47,16 @@ int ff_raw_audio_read_header(AVFormatContext *s, AVFormatParameters *ap);
int ff_raw_video_read_header(AVFormatContext *s, AVFormatParameters *ap);
#define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\
AVInputFormat ff_ ## shortname ## _demuxer = {\
.name = #shortname,\
.long_name = NULL_IF_CONFIG_SMALL(longname),\
.read_probe = probe,\
.read_header = ff_raw_video_read_header,\
.read_packet = ff_raw_read_partial_packet,\
.extensions = ext,\
.flags = AVFMT_GENERIC_INDEX,\
.value = id,\
};
#endif /* AVFORMAT_RAWDEC_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment