From 973f686a6c4f7c3b9120a1e22cb7c0159ea9aee2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 24 May 2011 07:43:01 +0200 Subject: rawdec: add video_size private option. --- libavformat/rawdec.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavformat/rawdec.h') diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h index e473eb2..517efd4 100644 --- a/libavformat/rawdec.h +++ b/libavformat/rawdec.h @@ -31,7 +31,13 @@ typedef struct RawAudioDemuxerContext { int channels; } RawAudioDemuxerContext; +typedef struct FFRawVideoDemuxerContext { + const AVClass *class; /**< Class for private options. */ + char *video_size; /**< String describing video size, set by a private option. */ +} FFRawVideoDemuxerContext; + extern const AVClass ff_rawaudio_demuxer_class; +extern const AVClass ff_rawvideo_demuxer_class; int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap); -- cgit v1.1 From fa4924a35818b2564050119ed7c14cbdd2b56065 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 25 May 2011 08:14:13 +0200 Subject: rawdec: factor video demuxer definitions into a macro. --- libavformat/rawdec.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libavformat/rawdec.h') diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h index 517efd4..99beadd 100644 --- a/libavformat/rawdec.h +++ b/libavformat/rawdec.h @@ -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 */ -- cgit v1.1