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
00028 typedef struct RawAudioDemuxerContext {
00029 AVClass *class;
00030 int sample_rate;
00031 int channels;
00032 } RawAudioDemuxerContext;
00033
00034 typedef struct FFRawVideoDemuxerContext {
00035 const AVClass *class;
00036 char *video_size;
00037 char *pixel_format;
00038 char *framerate;
00039 } FFRawVideoDemuxerContext;
00040
00041 extern const AVClass ff_rawaudio_demuxer_class;
00042 extern const AVClass ff_rawvideo_demuxer_class;
00043
00044 int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap);
00045
00046 int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt);
00047
00048 int ff_raw_audio_read_header(AVFormatContext *s, AVFormatParameters *ap);
00049
00050 int ff_raw_video_read_header(AVFormatContext *s, AVFormatParameters *ap);
00051
00052 #define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\
00053 AVInputFormat ff_ ## shortname ## _demuxer = {\
00054 .name = #shortname,\
00055 .long_name = NULL_IF_CONFIG_SMALL(longname),\
00056 .read_probe = probe,\
00057 .read_header = ff_raw_video_read_header,\
00058 .read_packet = ff_raw_read_partial_packet,\
00059 .extensions = ext,\
00060 .flags = AVFMT_GENERIC_INDEX,\
00061 .value = id,\
00062 .priv_data_size = sizeof(FFRawVideoDemuxerContext),\
00063 .priv_class = &ff_rawvideo_demuxer_class,\
00064 };
00065
00066 #endif