00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVFORMAT_RAWDEC_H
00023 #define AVFORMAT_RAWDEC_H
00024
00025 #include "avformat.h"
00026 #include "libavutil/log.h"
00027 #include "libavutil/opt.h"
00028
00029 typedef struct FFRawVideoDemuxerContext {
00030 const AVClass *class;
00031 char *video_size;
00032 char *pixel_format;
00033 char *framerate;
00034 } FFRawVideoDemuxerContext;
00035
00036 extern const AVOption ff_rawvideo_options[];
00037
00038 int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt);
00039
00040 int ff_raw_audio_read_header(AVFormatContext *s);
00041
00042 int ff_raw_video_read_header(AVFormatContext *s);
00043
00044 #define FF_RAWVIDEO_DEMUXER_CLASS(name)\
00045 static const AVClass name ## _demuxer_class = {\
00046 .class_name = #name " demuxer",\
00047 .item_name = av_default_item_name,\
00048 .option = ff_rawvideo_options,\
00049 .version = LIBAVUTIL_VERSION_INT,\
00050 };
00051
00052 #define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\
00053 FF_RAWVIDEO_DEMUXER_CLASS(shortname)\
00054 AVInputFormat ff_ ## shortname ## _demuxer = {\
00055 .name = #shortname,\
00056 .long_name = NULL_IF_CONFIG_SMALL(longname),\
00057 .read_probe = probe,\
00058 .read_header = ff_raw_video_read_header,\
00059 .read_packet = ff_raw_read_partial_packet,\
00060 .extensions = ext,\
00061 .flags = AVFMT_GENERIC_INDEX,\
00062 .raw_codec_id = id,\
00063 .priv_data_size = sizeof(FFRawVideoDemuxerContext),\
00064 .priv_class = &shortname ## _demuxer_class,\
00065 };
00066
00067 #endif