summaryrefslogtreecommitdiffstats
path: root/libavformat/rawdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rawdec.h')
-rw-r--r--libavformat/rawdec.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h
index a989ea9..3eed6e7 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);
@@ -41,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 */
OpenPOWER on IntegriCloud